Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 forward = ???;
- Vector3 rotation(forward.z, forward.y, -forward.x);
- Vector3 up = Normalize(Cross(forward, rotation));
- Matrix4 matrix =
- {
- rotation.x, rotation.y, rotation.z, 0.0f,
- up.x, up.y, up.z, 0.0f,
- forward.x, forward.y, forward.z, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f
- };
- *(Matrix4*)&mw::myRBD->Rotation = matrix;
- Matrix4ToQuaternion(&matrix, &mw::myRBD->Orientation);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement