How do I set the rotation of an object to always be 90 degrees in relation to another object?

Yes. This should work.

Sorry can’t get it to work, I use ue4, does that have anything to do with it?

It doesn’t. If you could share what it’s doing perhaps I could help.

the red arrow here should act like you’re yellow arrow, but is always facing towards the X world direction

Add a Scene Component to the actor and place the arrow you want to move as a child. Manually rotate the arrow so it faces right, then apply the rotation to the scene component, not the arrow, just like in my picture.

okay that works, but if the actor rotate, the arrow still rotate around the world X axis, instead of, is there a way to make it rotate around the blue arrow on the enemy?

Are you using Set Relative Rotation?

Yes

Can you share a video?

Share a picture of your BP.


that’s all there is

Ok. Try only rotating the scene component, not the arrow.

oh the Arrow in the screenshot is the blue one that that just shows where the enemy is going

Then I got lost here.

the Scene Component you wanted me to put the arrow on is the Scene node, so the arrow that matters is a child of that

Well here’s the asset if you wanna check it out
TrackingRotatingCube.uasset (112.4 KB)

I don’t know how to import that type of file

Oops- wrong thing. Updated

have tried to import it but nothing appears

Make sure you’re using 5.2.1 or newer

1 Like