rate up
0
rate down
Stop object from sliding backwards on slope
I have followed along with tutorial 31 for DX11 "Sliding Camera Collision Detection", and have a working implementation. However I was curious if someone could point me in the right direction as to what it is I would need to do to keep the object from sliding backwards due to gravity when not moving? The tutorial mentions this as an exercise, which I have been trying to come up with a solution to, but my math skills are lacking so I'm unsure if there is an easy way to accomplish this that I'm just not seeing? Right now what I'm thinking is to incorporate a raycast downwards from the object and only apply gravity when the intersection point of the ray is x distance from a triangle...which seems like it might be overkill? Any recommendations greatly appreciated!
Sign in to answer!