Hi,
I am porting a previously existing game over to Ogre. I want to basically copy the rotation matrix of the games current camera (which is maintained by the game) and brute force the ogre camera to copy its rotation (the position was easy )
Their doesnt appear to be a setRotation. Anyone have any ideas on this?
Cheers
Swuth
How to force the rotation of the camera based on a matrix?
-
- Bronze Sponsor
- Posts: 53
- Joined: Wed Mar 25, 2015 10:01 pm
-
- Greenskin
- Posts: 140
- Joined: Sun Feb 03, 2013 6:32 pm
- x 8
Re: How to force the rotation of the camera based on a matri
You can form a Quaternion using a rotation matrix to use in Camera::setOrientation() call: http://www.ogre3d.org/docs/api/1.9/clas ... 67f89a15b1
Check out my projects: https://github.com/NotCamelCase
-
- Bronze Sponsor
- Posts: 53
- Joined: Wed Mar 25, 2015 10:01 pm
Re: How to force the rotation of the camera based on a matri
After switching rows and columns on the original matrix, setting the columns of my Ogre::Matrix3 and then generating a quat, and setting the cameraquat, ALL IS WELL! Thanks a million!