Hey , i’m trying to make a prakour game and i’m using raytracing to check if the player is near an obstacle , everything works but when you try to jump near a sharp corner , the animation looks really weird.
My question is how can i prevent the player jumping in sharp corners (if for example it’s a regular box)?
Attached 2 pictures that show it in action.
If needed i can upload a short clip to show the problem more clearly.
Hi man,
What do you mean with “sharp” ?
If you dont want jump upon boxes that are not perpendicular to you, you can check
the normal …of the impact point… of the raytrace !
Hey , thanks for the reply . Well i mean i wanna prevent the player from jumping corners in general (doesn’t matter which corner it is) Also , it would be amazing if you could show an example because i’m pretty much new to whole of this RayTracing thing.
Before jumping you can check what is in your direction ,
You can cast a linetrace ,than break the result to read the impact-normal
For example
you can check if that vector is perpendicular with some other vectore nodes,
or just do a *-1, to have the reversed vector
and check if is == equal to your forward vector,
tweaking the threshold you can get something decent