Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Xeraster opened this issue Aug 1, 2024 · 0 comments
Closed

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

Xeraster opened this issue Aug 1, 2024 · 0 comments
Assignees

Comments

@Xeraster
Copy link

Xeraster commented Aug 1, 2024

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?

@DanielChappuis DanielChappuis self-assigned this Aug 27, 2024
Repository owner locked and limited conversation to collaborators Aug 27, 2024
@DanielChappuis DanielChappuis converted this issue into discussion #394 Aug 27, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants