Hey there,
So I’m using raycasting to make custom 2d collisions with 3d objects (yay platformer). I’m curious if there is a good way of doing this while remaining framerate independent. For example, if my rays have a distance of 0.5, normally they will work fine when the framerate is stable (if movement is based off of deltaTime). But, if the framerate skips, the movement increases, which allows the objects to breach that 0.5 ray distance, and do things like go through walls.
I’m thinking that I may also have to multiply the rays by deltaTime…but it doesn’t seem that simple…The object needs to know it has physically moved past the point where the ray wouldn’t check collision…
Currently I have simply removed the deltaTime, and am no longer framerate independent, but I know that my objects won’t go through walls.
Any suggestions on a way to use raycasting intelligently so that I can stay framerate independent?
Thanks.