changed: removed old raycasts (deprecated by environment observers)

This commit is contained in:
Chris
2025-08-01 11:48:48 -04:00
parent 78498e5212
commit 6ebfd4ef2b

View File

@@ -38,19 +38,19 @@ public class PlayerMovement : MonoBehaviour
// }
// }
void FixedUpdate(){
LayerMask environmentLayer = LayerMask.NameToLayer("Environment");
if (Physics.Raycast(transform.position + Vector3.up, transform.forward, out forwardRay, 2.5f, ~environmentLayer)){
thisPlayer.controls.graph.SendEvent("ForwardRay", true, null);
}
if (Physics.Raycast(transform.position + Vector3.up, transform.position + Vector3.left, out leftRay, maxDistance: 2f, ~environmentLayer )) {
thisPlayer.controls.graph.SendEvent("LeftRay", true, null);
}
if (Physics.Raycast(transform.position + Vector3.up, transform.position + Vector3.right, out rightRay, maxDistance: 2f, ~environmentLayer )) {
thisPlayer.controls.graph.SendEvent("RightRay", true, null);
}
}
// void FixedUpdate(){
// LayerMask environmentLayer = LayerMask.NameToLayer("Environment");
//
// if (Physics.Raycast(transform.position + Vector3.up, transform.forward, out forwardRay, 2.5f, ~environmentLayer)){
// thisPlayer.controls.graph.SendEvent("ForwardRay", true, null);
// }
//
// if (Physics.Raycast(transform.position + Vector3.up, transform.position + Vector3.left, out leftRay, maxDistance: 2f, ~environmentLayer )) {
// thisPlayer.controls.graph.SendEvent("LeftRay", true, null);
// }
//
// if (Physics.Raycast(transform.position + Vector3.up, transform.position + Vector3.right, out rightRay, maxDistance: 2f, ~environmentLayer )) {
// thisPlayer.controls.graph.SendEvent("RightRay", true, null);
// }
// }
}