How to counter angular momentum with torque

So my ultimate goal is to make some “ai” script that can drive inertial spaceship (for now asteroids like in 2d only). And indeed it is very tricky.

@Nawrot Have you dipped your toes in this experimental (1.0 though!) plugin:


New (?) quat spring:


Asking as I can’t even get the legacy torque to work in UE5. There’s some magical dampening happening, seemingly out of nowhere:

This is what is being accumulated:

The moment you stop applying torque, it all stops immediately. Linear is not affected by this, only angular…


The real culprit is the new chaos solver putting rigid body to sleep a wee bit to early:

image

This works.

1 Like

I did not touch this subject in year or even more. Problem with all physics in unreal is that damping, it is lazy coder solution.

I want my code to calculate force needed to stop, not push break pedal. (damping). One example where it will fail is collision with another object while damping “old motion” you get hit, get new momentum, and it is already dampened, because actor was stopping “old velocity”. In such case just forget whole physics engine and do simple math with infinite inertia objects.

I got some C++ code for it, but have no time to test it, so it sits there.

ps.
My whole messing with physics and inertia movement is bacause i want to prototype such game in 2d or 3d space with inertial movement, just to see if such gameplay would be any fun. Like asteroids, but realistic (simulated) physics in 2d.

pps:
Why we cannot have realistic space battles that are fun, like ever:

1 Like

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