[Solved] Converting a Vector3f to a Quaternion

Hello everyone,
I’m currently reworking the bazooka for my game to switch from a BetterCharacterControl usage to RigidBodyControl.
But I’m struggling with the rotation as I don’t know how to do that with a rigidbody.
I have access to all three camera angles, and I need the projectile to be facing the way the camera does?
How would I do this?

You might need to provide a little more information.

Direction the camera is facing as a Vector3f:
camera.getDirection()

Rotation of the camera as a Quaternion:
camera.getRotation()

Nothing uses Euler angles on its own because they are ambiguous and inaccurate… though you can convert a Quaternion to euler angles if you really need it for something. Javadoc is your friend there.

1 Like

.getRotation() solved it.
Thanks.