added UFO skywalk animation and bolt car teleport button
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using static MouseLook;
|
||||
|
||||
@@ -101,6 +102,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(0, 0, haltspeed)); // Smoothly halt in 1 second
|
||||
_tireSound.Stop();
|
||||
_stopSound.Play();
|
||||
@@ -108,6 +110,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(targetSpeed, targetRotationSpeed, haltspeed)); // Smoothly resume speed in 1 second
|
||||
_stopSound.Stop();
|
||||
_tireSound.Play();
|
||||
|
||||
Reference in New Issue
Block a user