Hi, I have an actor with a physical body (just a collision box as a root, so that I can apply forces to it).
The Idea was to get the current velocity, transform it to a local space, reduce x,y,z by different amounts (bigger drag sideways), transform back to the world space and set the new velocity back.
So far, I’ve tried several ways of doing it, but each is failing. (more info here: [Solved] Axis specific Velocity Reduction - issue possibly in setLinearVelocity/math/local global - Blueprint - Epic Developer Community Forums)
The issue is that the velocity should be always smaller than the original one, but that isn’t always the case. When debugging, I’ve reduced local velocity, but the global one, after transform has gotten larger (possible bug? maybe?) and the outcome is that I am able to leave the “possibility space” as shown here:
I apply random force and get the initial velocity, which is shown by the blue arrow and the blue box. The black arrow represents the current velocity and you can clearly see, how the velocity doesn’t just get smaller, but actually gets bigger and leaves its possibility space. In the end, the ship moves in the opposite direction of the original velocity… this happens while I lerp the local velocity to zero.
What am I doing wrong?
The core, minimal code is this: