Finished up improving static object colliders. Added network improvements to interactions, still half-baked.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using FishNet.Object;
|
||||
using FMOD.Studio;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using FMOD.Studio;
|
||||
|
||||
using static MouseLook;
|
||||
|
||||
public class CarDrivingRoutine : MonoBehaviour
|
||||
public class CarDrivingRoutine : NetworkBehaviour
|
||||
{
|
||||
public AudioSource _stopSound;
|
||||
public AudioSource _tireSound;
|
||||
@@ -124,7 +124,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{;
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
if (other.GetComponentInParent<XRPlayerMirror>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(0, 0, haltspeed)); // Smoothly halt in 1 second
|
||||
_tireSound.Stop();
|
||||
_stopSound.Play();
|
||||
@@ -135,7 +135,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
if (other.GetComponentInParent<XRPlayerMirror>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(targetSpeed, targetRotationSpeed, haltspeed)); // Smoothly resume speed in 1 second
|
||||
_stopSound.Stop();
|
||||
_tireSound.Play();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class Carbehavior : MonoBehaviour
|
||||
public class Carbehavior : NetworkBehaviour
|
||||
{
|
||||
public AudioSource _carAlarm;
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using _PROJECT.NewHandPresence;
|
||||
using FishNet.Object;
|
||||
using FMODUnity;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Content.Interaction;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
using FMODUnity;
|
||||
|
||||
public class PassangerSeat : LocomotionProvider
|
||||
public class PassangerSeat : NetworkBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public GameObject ExitSpot;
|
||||
@@ -45,7 +46,6 @@ public class PassangerSeat : LocomotionProvider
|
||||
player.transform.localPosition = -cameraShift;
|
||||
player.transform.localRotation = Quaternion.identity;
|
||||
cameraTransform.localRotation = this.transform.rotation;
|
||||
BeginLocomotion();
|
||||
disablePlayerLocomotion(player);
|
||||
}
|
||||
private void disablePlayerLocomotion(XROrigin player)
|
||||
@@ -70,7 +70,6 @@ public class PassangerSeat : LocomotionProvider
|
||||
public void ExitCar()
|
||||
{
|
||||
if (currentPassanger == null) return;
|
||||
EndLocomotion();
|
||||
enablePlayerLocomotion(currentPassanger);
|
||||
|
||||
TutorialController cameraChild = currentPassanger.GetComponentInChildren<TutorialController>();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Waypoint : MonoBehaviour
|
||||
public class Waypoint : NetworkBehaviour
|
||||
{
|
||||
public float DesiredRotation = 0;
|
||||
public Waypoint Next;
|
||||
|
||||
Reference in New Issue
Block a user