Sunday, February 23, 2014

Passing through

I fixed a bug today where the colliders would sometimes pass slightly into one another.
Variations in framerate would make the raycasts not able to keep up.
I fixed this by checking how far we wanted to go, and if the wall was close enough that we only could move part of the way we scale the vector meant to stop the movement to remove only the excess that would cause us to move into the wall. Earlier the script only stopped you if you were actually touching the wall. The collisions are much closer to perfect now, and framerate independent.

No comments:

Post a Comment