Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float howeverFarTheFloorShouldBe = 5f;
- var hits = Physics.RaycastAll(PlayerGameObject.transform.position, Vector3.down, howeverFarTheFloorShouldBe);
- foreach (var hit in hits)
- {
- if (hit.collider.gameObject != PlayerGameObject && hit.collider.CompareTag("FloorTag"))
- {
- //then do jump stuff
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement