Flying in one direction while rotating on all axes?

Hi folks, so I am attempting to replicate the ‘drfit’ feature (seen in games such as House of the Dying Sun/Elite Dangerous/ Star citizen) whereby holding a key down will cause my ship to continue flying in its original direction but will be free to rotate on all axes. I’d like to do this without using physics if possible.

Right now I have a decent flight model setup, and feel like I’m missing a fairly obvious piece to make this work.

Does anyone have any ideas?

You should have a Root Collision that is used for movement. That being the case simply rotate the child mesh and camera.

Hi RevOverDrive,

This is all I see in the BP. Is this correct?

Capture

What’s the parent actor?

Plane mesh. This is the place holder mesh for my spacecraft. Is that what you mean?
Basically, I just dragged and dropped this BP into the map.

No Top right of the editor when the class is focused.

image

Ah! Got it. The parent actor is BP Flying Pawn. It is from the old flying UFO BP.

Open the UFO class. It should have a collision component as root. This is what’s being “moved” to fly. The plane mesh is a child that just follows along.

That being the case you would simply just rotate the plane mesh relatively.

Set Relative Rotation.

I’ll give it a shot tonight. Thanks!

Unfortunately, it didn’t work. The rotation of the component still caused the root to move in the direction it was pointing. There has to be a way to ‘lock’ the forward vector, while rotating a component.

I tried storing the forward vector as a constant, but that didn’t work. I also tried to use plane constraints and they failed too.

@Rev0verDrive I solved it!!! I just implemented an inertial drifting system. You just set the inertia to be high and you can toggle back to zero inertia with a button press!
I now have a great inertial drifting system (de-coupled flight / flight assist off) that works flawlessly. Feels good with a controller, for sure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.