Compare commits
No commits in common. "7cdb281c2366f9fae3ac13d0dcf408788c66c26d" and "f42fc6463c5131466934525aad9bcc70f7b4cd3f" have entirely different histories.
7cdb281c23
...
f42fc6463c
@ -242,15 +242,7 @@ namespace FishNet.Discovery
|
|||||||
//
|
//
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
Debug.Log("NetworkDiscovery is searching");
|
Debug.Log("NetworkDiscovery is searching");
|
||||||
=======
|
|
||||||
// Debug.Log("NetworkDiscovery is searching on port " + port);
|
|
||||||
>>>>>>> master
|
|
||||||
=======
|
|
||||||
// Debug.Log("NetworkDiscovery is searching on port " + port);
|
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
if (InstanceFinder.IsClient)
|
if (InstanceFinder.IsClient)
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
<<<<<<<< HEAD:Assets/Prefabs.meta
|
|
||||||
guid: f5d758e3acccf474babdbe217a2702ba
|
guid: f5d758e3acccf474babdbe217a2702ba
|
||||||
========
|
|
||||||
guid: b75b31ee55930864c993630f33293a65
|
|
||||||
>>>>>>>> master:Assets/_PROJECT/Components/Bolt.meta
|
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
<<<<<<<< HEAD:Assets/Scripts.meta
|
|
||||||
guid: 8f19a044f4ee30042a6ad8c58d595f40
|
guid: 8f19a044f4ee30042a6ad8c58d595f40
|
||||||
========
|
|
||||||
guid: d130522c3b40916429cacacf79ffbc9b
|
|
||||||
>>>>>>>> master:Assets/_PROJECT/Components/Bolt/Intercation Logic.meta
|
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
<<<<<<< HEAD
|
|
||||||
using Unity.XR.CoreUtils;
|
using Unity.XR.CoreUtils;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static MouseLook;
|
using static MouseLook;
|
||||||
=======
|
|
||||||
using UnityEngine;
|
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
public class CarDrivingRoutine : MonoBehaviour
|
public class CarDrivingRoutine : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -14,7 +10,6 @@ public class CarDrivingRoutine : MonoBehaviour
|
|||||||
public AudioSource _tireSound;
|
public AudioSource _tireSound;
|
||||||
public Waypoint _waypoint;
|
public Waypoint _waypoint;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
public float StraightSpeed = 5f; // Movement speed
|
public float StraightSpeed = 5f; // Movement speed
|
||||||
public float rotationSpeed = 5f; // Rotation speed
|
public float rotationSpeed = 5f; // Rotation speed
|
||||||
public float waypointProximityThreshold = 0.5f; // Distance to consider "close enough" to a waypoint
|
public float waypointProximityThreshold = 0.5f; // Distance to consider "close enough" to a waypoint
|
||||||
@ -33,29 +28,16 @@ public class CarDrivingRoutine : MonoBehaviour
|
|||||||
targetSpeed = StraightSpeed;
|
targetSpeed = StraightSpeed;
|
||||||
targetRotationSpeed = rotationSpeed;
|
targetRotationSpeed = rotationSpeed;
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
public float speed = 5f; // Movement speed
|
|
||||||
public float rotationSpeed = 5f; // Rotation speed
|
|
||||||
public float waypointProximityThreshold = 0.5f; // Distance to consider "close enough" to a waypoint
|
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
//if (hasPedestrianInFront) return;
|
//if (hasPedestrianInFront) return;
|
||||||
if (_waypoint == null) return; // Just in case.
|
if (_waypoint == null) return; // Just in case.
|
||||||
|
|
||||||
// Move towards the waypoint
|
// Move towards the waypoint
|
||||||
Vector3 targetPosition = _waypoint.transform.position;
|
Vector3 targetPosition = _waypoint.transform.position;
|
||||||
float step = StraightSpeed * Time.deltaTime;
|
float step = StraightSpeed * Time.deltaTime;
|
||||||
=======
|
|
||||||
if (_waypoint == null) return;
|
|
||||||
|
|
||||||
// Move towards the waypoint
|
|
||||||
Vector3 targetPosition = _waypoint.transform.position;
|
|
||||||
float step = speed * Time.deltaTime;
|
|
||||||
>>>>>>> master
|
|
||||||
transform.position = Vector3.MoveTowards(transform.position, targetPosition, step);
|
transform.position = Vector3.MoveTowards(transform.position, targetPosition, step);
|
||||||
|
|
||||||
// Rotate towards the desired rotation
|
// Rotate towards the desired rotation
|
||||||
@ -63,7 +45,6 @@ public class CarDrivingRoutine : MonoBehaviour
|
|||||||
Quaternion desiredRotation = Quaternion.Euler(0, targetRotation, 0);
|
Quaternion desiredRotation = Quaternion.Euler(0, targetRotation, 0);
|
||||||
transform.rotation = Quaternion.RotateTowards(transform.rotation, desiredRotation, rotationSpeed * Time.deltaTime);
|
transform.rotation = Quaternion.RotateTowards(transform.rotation, desiredRotation, rotationSpeed * Time.deltaTime);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
rollTires(); // Just an aesthetic improvement.
|
rollTires(); // Just an aesthetic improvement.
|
||||||
|
|
||||||
if (Quaternion.Angle(transform.rotation, desiredRotation) > 1f) // If the car is turning.
|
if (Quaternion.Angle(transform.rotation, desiredRotation) > 1f) // If the car is turning.
|
||||||
@ -85,15 +66,12 @@ public class CarDrivingRoutine : MonoBehaviour
|
|||||||
isTurning = false;
|
isTurning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> master
|
|
||||||
// Check if close enough to the waypoint
|
// Check if close enough to the waypoint
|
||||||
if (Vector3.Distance(transform.position, targetPosition) <= waypointProximityThreshold &&
|
if (Vector3.Distance(transform.position, targetPosition) <= waypointProximityThreshold &&
|
||||||
Quaternion.Angle(transform.rotation, desiredRotation) <= 1f)
|
Quaternion.Angle(transform.rotation, desiredRotation) <= 1f)
|
||||||
{
|
{
|
||||||
// Proceed to the next waypoint
|
// Proceed to the next waypoint
|
||||||
_waypoint = _waypoint.Next;
|
_waypoint = _waypoint.Next;
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,18 +138,4 @@ public class CarDrivingRoutine : MonoBehaviour
|
|||||||
StraightSpeed = targetStraightSpeed;
|
StraightSpeed = targetStraightSpeed;
|
||||||
rotationSpeed = targetRotationSpeed;
|
rotationSpeed = targetRotationSpeed;
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
if (_waypoint == null)
|
|
||||||
{
|
|
||||||
// Optional: Play stop sound when no more waypoints
|
|
||||||
_stopSound?.Play();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Optional: Play tire sound when moving to the next waypoint
|
|
||||||
_tireSound?.Play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>>>>>>> master
|
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,6 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 876842842715561968}
|
m_GameObject: {fileID: 876842842715561968}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
<<<<<<< HEAD
|
|
||||||
m_Script: {fileID: 11500000, guid: 98cc0a7a6d6d7314c8e390e45a9e1483, type: 3}
|
m_Script: {fileID: 11500000, guid: 98cc0a7a6d6d7314c8e390e45a9e1483, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
@ -73,12 +72,6 @@ MonoBehaviour:
|
|||||||
port: 1
|
port: 1
|
||||||
discoveryInterval: 0
|
discoveryInterval: 0
|
||||||
automatic: 0
|
automatic: 0
|
||||||
=======
|
|
||||||
m_Script: {fileID: 11500000, guid: 2883099670a13fa4397b2335c51bc792, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
networkDiscovery: {fileID: 3580593382982171501}
|
|
||||||
>>>>>>> master
|
|
||||||
--- !u!114 &3580593382982171501
|
--- !u!114 &3580593382982171501
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -88,17 +81,10 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 876842842715561968}
|
m_GameObject: {fileID: 876842842715561968}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
<<<<<<< HEAD
|
|
||||||
m_Script: {fileID: 11500000, guid: 846c98250226ef949b5c0c499e9334da, type: 3}
|
m_Script: {fileID: 11500000, guid: 846c98250226ef949b5c0c499e9334da, type: 3}
|
||||||
=======
|
|
||||||
m_Script: {fileID: 11500000, guid: 81d12db8c9730a74a923496476cfbf80, type: 3}
|
|
||||||
>>>>>>> master
|
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
secret: deltavr
|
networkDiscovery: {fileID: 4784684551416650039}
|
||||||
port: 0
|
|
||||||
discoveryInterval: 0
|
|
||||||
automatic: 0
|
|
||||||
--- !u!114 &3642215892935434233
|
--- !u!114 &3642215892935434233
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
BIN
Assets/_PROJECT/Other/Delta Hoone/Ground Levelled.fbx
(Stored with Git LFS)
BIN
Assets/_PROJECT/Other/Delta Hoone/Ground Levelled.fbx
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_PROJECT/Other/Delta Hoone/Ground.fbx
(Stored with Git LFS)
BIN
Assets/_PROJECT/Other/Delta Hoone/Ground.fbx
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/_PROJECT/Scenes/DeltaBuilding_base.unity
(Stored with Git LFS)
BIN
Assets/_PROJECT/Scenes/DeltaBuilding_base.unity
(Stored with Git LFS)
Binary file not shown.
BIN
ProjectSettings/AudioManager.asset
(Stored with Git LFS)
BIN
ProjectSettings/AudioManager.asset
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user