Skip to content

Is there any way to get angular rotation relative to an object? #393

@Xeraster

Description

@Xeraster

I'm trying to make a space ship game. My flight assist needs to be able to get the ship's angular velocity for pitch, yaw and roll. There is a nice little function called getAngularVelocity() for this. The only problem is this value is unsuitable for what i'm trying to do as it only gives absolute angular velocity and not relative to the ship's orientation.

I really need the pitch velocity to be in one axis, the roll velocity to be in another separate axis and the yaw velocity to be in a third separate axis, relative to the "front" (i guess) of the ship.

I've been trying to find some way, any way to convert this to relative/local angular velocities. I've messed with euler angle conversion/rotation functions, I've messed with both reactphysics3d quaternions and irrlicht quaternions. There just doesn't seem to be a way to convert absolute angular velocity to the angular velocity relative to the "cockpit" or "cockpit chair" of the ship.

I've been studying quaternions for the last few days trying to make sense of it but i'm getting nowhere. Does anyone know how I can get this working?

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions