mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-26 02:00:54 -05:00
Fixed PlayerMovevment Bug
This commit is contained in:
parent
de0f6c1a0b
commit
ae287e391a
|
|
@ -14,7 +14,6 @@ public class Boulder : NetworkBehaviour
|
|||
|
||||
void OnTriggerEnter(Collider other) {
|
||||
if (other.tag == "Player") {
|
||||
//Debug.Log("Crunch");
|
||||
GameObject player = other.gameObject;//Turns the collider into a game object
|
||||
Vector3 Dir = boulder.velocity;//Finds the bolder's velocity
|
||||
float Power = boulder.velocity.magnitude;// * 250;//Finds the power of the boulder by using it's velocity and a scaler
|
||||
|
|
@ -38,7 +37,6 @@ public class Boulder : NetworkBehaviour
|
|||
|
||||
IEnumerator DespawnCounter(int time) {
|
||||
for (int i = time; i > 0; i--) {
|
||||
Debug.LogError(i);
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ public class PlayerMovement : NetworkBehaviour
|
|||
//Apply Impact for when force needs to be applied without ragdolling
|
||||
public void AddImpact(Vector3 dir, float force)
|
||||
{
|
||||
//if (!IsLocalPlayer) { return; }
|
||||
if (!IsLocalPlayer) { return; }
|
||||
|
||||
//Normalize direction multiply by force and add it to the impact
|
||||
dir.Normalize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user