Does anyone know the formula for angular velocity?

I’ve been using trial and error for months and haven’t been able to figure how to get angular velocity in the format UE4 wants for the Set Physics Angular Velocity function.

This questions seems to come up on the forums, but nobody seems to post the answer.

``````
FQuat Orientation = GetComponentQuat();
FQuat DeltaQ = OldOrientation.Inverse() * Orientation;
FVector Axis;
float Angle;
DeltaQ.ToAxisAndAngle(Axis, Angle);
AngularVelocity = Orientation.RotateVector((Axis * Angle) / DeltaTime);
OldOrientation = Orientation;

``````

hi, trying to do this in blueprints (ue5)
(btw, i didn’t need to rotate vector)
i almost got it, but the values are a bit off
it’s difficult to explain
(i’ll post my blueprint graph later today)

X=1 Y=0 Z=0 ← normal *
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=-1 Y=-15 Z=-30 ← random hitch **
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0
X=1 Y=0 Z=0

• identical value as of using “get physics linear velocity”

** any idea why?