Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ogre::Plane floorPlane( Ogre::Vector3::UNIT_Y, Ogre::Vector3( 0, 0, 0 ) );
- Ogre::Ray rayToFloor( cameraPosition, cameraOrientation* -(Ogre::Vector3::UNIT_Z));
- std::pair<bool,Ogre::Real> objectPlaneIntersection = rayToFloor.intersects( floorPlane );
- Ogre::Vector3 pos;
- if ( objectPlaneIntersection.first )
- {
- pos = rayToFloor.getPoint( objectPlaneIntersection.second );
- }
- Ogre::Vector3 position;
- Ogre::Quaternion orientation;
- Ogre::Vector3 scale;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement