Hi everybody!
I’m here with something that i can’t even start.
I wanna do my character (player) rotate but not on itself, but around something, like exchange the rotation around character’s Z, to another object’s Z.
Can y`all give me a light on how to start it?
Thank you very much.
So like a moon rotating a planet? That is pretty easy.
You get the connecting vector from the planet to the moon (i use that as substitutes for your objects).
You get it by moonPosition - planetPosition.
Then you get the Up axis of the planet, or the axis around which the moon rotates if you know what I mean.
Then you call the function RotateAngleAxis, with that you can rotate the vector around this up axis by some angle.
There you have to take certain rotation rate, multiply it with DeltaTime to compensate for different FPS and then calculate the new vector now rotate by some angle.
Then your new moon position is the following: planetPosition + rotatedVector
Wow, thank you very much!
I will try it and hope soon come with my BP here.
I’m still really beginner so will take some time to figureout what you said and make it a BP. But yey, thanks!