Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // We want the rotation, but we've got multiple rotations, so combine them
- let pre_rotation = Quaternion::from(Euler::new(
- Deg(properties.pre_rotation[0]), Deg(properties.pre_rotation[1]), Deg(properties.pre_rotation[2])
- ));
- let rotation = Quaternion::from(Euler::new(
- Deg(properties.rotation[0]), Deg(properties.rotation[1]), Deg(properties.rotation[2])
- ));
- let post_rotation = Quaternion::from(Euler::new(
- Deg(properties.post_rotation[0]), Deg(properties.post_rotation[1]), Deg(properties.post_rotation[2])
- ));
- let total_rotation = Euler::from(post_rotation * rotation * pre_rotation);
- let rotation = Vector3::new(
- total_rotation.x.0,
- total_rotation.y.0,
- total_rotation.z.0,
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement