How to Rotate while keeping orientation (prevent actor from flip)

Hi Unrealistas,

i want to ask for help concerning a rotational issue.
I have a moving actor (ball) rotating around a platform. The platform is rotating in place (keep location) and follows the ball, so that the ball is always above the platform.
When the ball gets to the top or bottom (0° or 180°) position the platform always flips the orientation.
The similar happens, when i rotate the ball to the back and front of the platform.
How can i prevent this flip (the red side should be on the front all the time, so there should be no rotation on the (relative) z-axis of the actor.

What i see in the viewport details is that the actor only rotates on y- and z-axis. The x-axis stays at ±0

When i try to lock any axis of the static mesh component, everything stays the same (due to lock the childs axis and rotating the actor).
When i try to rotate the static mesh component, the issue keeps the same.

Any help appreciated.

Both ways i tried (find look at rotation and get unit direction) do the same.
Thanx in advance.
Raphael
P.S.: How can i upload video clips in this forum. And what format, size etc is supported?

Hey @cr4p!

So usually what I’d recommend is locking the Y and Z axes as you only need X here. I’m not sure what you mean by locking any axis makes it unable to rotate though?

You could try breaking your “Rotation from X Vector” (right click, break struct pin), doing the same on “Set Actor Rotation”, and plugging X to X and leaving Y and Z at 0?

Give that a shot and see what we get! :slight_smile:

First of all thank you for reply.
And here are the results:
When i lock any (or all) axis of the static mesh than nothing changes (that is what i meant with “stays the same”)
The static mesh is child of the Default Scene Root. When i make the mesh the root, i couldn’t lock the axis, because that is not possible on scene root component.
And i want to turn the actor in my blueprint and not the component.

When i split the xVector and send only the x-values the actor doesn’t move anylonger. (due to the fact, that the xVector returns 0 on the x-axis)

I want the platform to face the ball without rotating around the platforms z axis.
The ball can go anywhere in space. It shall not circle around the platform. It is to be controlled and shall guide the platforms direction. So if it would be a camera it would show an upright picture to the left and would look upside down to the right.
So the red side of the platform shall always be turned to the camera.

And yes i have to limit the rotation in the one axis (towards the camera) to prevent the platform from performing a full turn on the axis running on the green-red-border.

Hey @cr4p, sorry for the late reply!

Hmm. Judging by your video, the thing is, the platform will, no matter what, end up flipped due to the ball being able to move in all three axes. It’s not flipping- it’s facing the ball with true accuracy. I was thinking this was in a 2D game with 3D assets, but obviously that’s not the case.

Normally, you should lock the Z axis to keep it from spinning, and leave the X and Y open (maybe with a -90 min, 90 max degree clamp on both. But I think it would be good, and very helpful, if you could show the blueprint for your platform and show the arrows telling us what the rotation axes are on it, before suggesting anything further. :slight_smile: