Align character to floor angle.
Hi, I've been trying to make a 360 movement player (360 movement being that he can move like Sonic) however I've faced a problem. I've reached the point at which the player correctly sticks to the ground plane he is on however it only works if he is on a ground plane that is less than 90 degrees.
Let me explain how i managed to make this, basically i set the movement mode of the player to flying, i created custom gravity using force, and for the gravity direction, i set the gravity to push the player onto the plane he is on (basically rotate the gravity to match the player's rotation). I used this for the floor detection:
It worked fine until i reached a plane that is steeper than 85-90 degrees, the player instead of rotating to stand on the plane rotates the other direction.
I have provided a video so you can see what i mean: https://youtu.be/Hipk_znel38
The clip in the video was slowed down so you can see better the rotation of the player at the top left.
Is this happening because of the rotation code or is it happening due another thing?
I'm pretty bad at vector and rotation math so I really need help with this...
Thanks in advance!
asked Dec 04 '16 at 09:27 AM in Blueprint Scripting
Never mind, after a lot of searching i found the answer in this answer hub, i have no idea why it was so hard to come by however here is the link if anybody else needs the same question answered. The player now correctly stays on the ceiling. https://answers.unrealengine.com/questions/172027/tilting-character-to-surface-lost-in-vector-math-h.html
answered Dec 04 '16 at 11:34 AM
this might help. https://forums.unrealengine.com/showthread.php?57376-Dynamic-gravity-for-characters Actually with BP only I don't know whether it is possible . There is a whole thread dedicated to this but i am sorry i do not remember who started it or what its name was . if I remember I shall post the thread link too.
answered Dec 04 '16 at 11:08 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here