changed: removed old raycasts (deprecated by environment observers)
This commit is contained in:
@@ -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);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user