Hello,
I’m making an FPS controller, and in this part of script, I’m trying to achieve that when the player jumps and is moving some direction, he will continue moving in that direction, but only if nothing’s in his way.
So I used Rays and Physics.Raycast(ray, length)
, but it didn’t seem to work, so I permitted infinite Physics.Raycast(ray)
, but it didn’t work either.
So, I have two questions:
- How long is actually the
length
of ray? Just say something like: “The length 1 is as long as the default primitive Unity cube game object.” - Why doesn’t this work?
Thanks.