Rotate controller around point?

Hello,

Would someone be able to explain how I would be able to rotate my controller to a right angle point?

See the attached image. My controller in top of the object. I raycast to get the point on the right side of the ground - now I want to rotate my controller around to the normal of the impact point.

Thanks!

Hi @Dohnuty!

It sound like you are trying to pull off an effect similar to a Mario Galaxy style planet gravity, is that correct? If not, could you elaborate a bit on how this is going to be used in your game so we can narrow down how to best tackle the implementation of the feature you are needing?

In case that is the solution you were looking for, here is a tutorial on how to pull of that Mario Galaxy gravity from a non-Epic related creator:

Unreal Engine 4 - Planetary Character Part 1: Staying Upright!

Any additional information you can provide will be a big help in solving your problem!

Thank you for the fast reply!

In my project there is no gravity, I have the movement set to flying. The best way I can describe it would be the old PS1 game Kula World, how it rotates around each block.

https://www.youtube.com/watch?v=HQU_aTgHvRU

So in my project once it reaches the edge, I wish for the controller to rotate around to the impact point. In the image I provided, the forward vector of the controller would now be facing down. Hope this helps!

1 Like