Fixed PlayerMovevment Bug

This commit is contained in:
Julia Butenhoff 2021-12-13 12:24:29 -06:00
parent de0f6c1a0b
commit ae287e391a
2 changed files with 1 additions and 3 deletions

View File

@ -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);
}

View File

@ -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();