I’ve bumped into a problem I’m really struggling with and without fully tearing my hair out I’ve come to the conclusion I’ll need some help.

I’m trying to get my actor - a ship in a topdown game - to rotate around its own axis. No matter what I try it gets all funky after its rotation. AFAIK I’ll need my ship to be top of the hierarchy to keep its collisions to behave, otherwise I could’ve possibly added another transform above it and rotate that (?). I’ve tried plenty of things, I’d also like to drive the rotation with a timeline so I can tweak it easier.

Once you run the project there’ll be print statements describing the problem but I’ve attached my current event to drive the rotate-around-ship-axis (UP arrow) if anyone can immediately see what I’m doing wrong.

Hopefully there’s an easy solution for those more skillful than me. Here’s a link to the project (4.21):

Thanks so much for any help!

I know this post is a bit oldish now but I’m still looking into this in case anyone stumbles upon my post here.

Can you describe what final effect/goal you want? I don’t understand what you’re trying to do besides spin the boat, which you appear to be doing fine.

But by rotating only the static mesh with a relative rotation, basic all you’re doing is offsetting the static mesh rotation, while the the actor/blueprint is not rotated. So I can see how that might be what you call funky.

It sounds more like you want to rotate the entire actor, so it should be Set Actor Rotation with target as empty/self.

Thanks for trying to help! I tried actor instead with the same problem, but I believe I didn’t do a good job describing my problem unless one downloads the project (which can be a hassle), so I’ll try again:

This is how I’m steering the ship - around its X axis. My ship is moving forwards based on where it’s pointing towards, so taking the vectors based on the X axis and moving the ship forwards from there.

I’d like to add a banking motion to the ship, essentially a rotation around its own axis.

I can’t get this to work, and I believe it has to do with the Z axis possibly not changing after I’ve rotated the ship around the X axis:

If I don’t rotate the ship and try to bank around Z with rotation X = 0 it looks better but the steering controls get reversed after a 180 degree spin.

Essentially I just want a ship that can move forward and bank correctly, with collisions working. I’m forced to use the ship geo as the root item if I want collisions, otherwise I could’ve tried breaking the hierarchy up and using steering on the parent and banking on the child or something.

Thanks again!

Pardon a small bump here but am still struggling, I’m just wanting to rotate around these two axis (X and Z) at the same time but it’s not behaving in the same way as doing the same as it would in e.g Maya or any other 3d package.

The problem lies in UE always having each axis in world space, meaning if I rotate X 45 degrees, then rotation in Z will be in world space and the X rotation will not have offset any of the other axis as I’d have expected in other packages. I’m sure this is good for game rotations (avoiding gimbal locks) but it means I don’t have a single banking (around its own axis) axis.

There must be a simple solution to this?