Interpolate Local Transform into World Transform with Local Rotation offset? Delayed transform change relative to localrotation for drifting behavior via worldtransform?

Hey all, first original project here. Basically, I want to feed directional input thats local transform into world transform offsets for movement, but for the local transform’s coords to be offset by the rotation?

In the video, its feeding the X axis info from local into world and its just moving along world X which isn't very useful.

I get that I could use add local transform to do this normally but I want there to be a kind of driftiness to it, so it takes a while to update? Eventually I want to add some post-stall maneuvering. I can’t really do this with local since applied transform offsets instantly change with the direction.

A big part of the reasoning is I’ll be adding a 3rd person controller mode thats vertically stabilized and I want the inertia of the aircraft to carry into that of the 3rd person mode which then will obviously slow down with drag and whatnot. Thats not what I’m here to ask, but its so you can get a sense of why I’m doing things this way and thrusters aren’t really friendly for that sort of thing. I’d love to know how to figure out what my direction of inertia as a vector is as well as my velocity if those are also things I can get away with asking?



I know this is kind of a big ask and I feel very cheeky for flat out asking “how do the thing” but at the same time, I don’t really come from a programming background out of some very simple VB and Javascript stuff and I have no experience with the math involved in 3D stuff. That being said, if you can recommend some reading material to get started on understanding the linear algebra involved in direct relation to working in Unreal, I would be incredibly grateful.

I tried Unity a year ago and hated it. As for Unreal, I haven’t been able to put it down since I installed it. I think I’m in love.

Thanks again for reading this and doubly so if you reply!

EDIT:


I’ve managed to successfully translate the actor direction to world direction. Now I need to figure out how to make it lag behind and be updated, akin to inertia and drifting.

Baby steps!

Update: My solution was to create an array of my up, right and forward vectors in order to determine what they were previously and use these when calculating my motion constants, then to create a function to split the vector strut of each and interpolate between my current get actor (direction) vector and the current location in my array minus a given value which I change. Altering one of the two changes the smoothness and the other, how far the motion lags behind.

1 Like