when i compiler the tutorial (Source_LightsCameraAction) program
i got the error message below is the source code
if(mInputDevice->isKeyDown(Ogre::KC_LEFT))
mShipNode->yaw(MoveFactor);
below is the error message
c:\ogrenew\Samples\example\examplespace\SpaceApplication.h(163): error C2664: 'Ogre::SceneNode::yaw' : cannot convert parameter 1 from 'Ogre::Real' to 'const Ogre::Radian &'
Reason: cannot convert from 'Ogre::Real' to 'const Ogre::Radian'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\ogrenew\Samples\example\examplespace\SpaceApplication.h(166): error C2664: 'Ogre::SceneNode::yaw' : cannot convert parameter 1 from 'Ogre::Real' to 'const Ogre::Radian &'
Reason: cannot convert from 'Ogre::Real' to 'const Ogre::Radian'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\ogrenew\Samples\Common\include\ExampleFrameListener.h(79): warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
tutorial (Source_LightsCameraAction) problem
-
LCY
- Gnoblar
- Posts: 10
- Joined: Mon Jan 10, 2005 3:54 pm
-
haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
The tutorial is based on an older Ogre version. Angles are now given in one of the two classes Radian or Degree instead of Ogre::Real.
You can change your code this way:
Note: Ogre::SceneNode methods that had an angle as an argument usually interpreted it as Degree whereas the Quaternion class interpreted Ogre::Real values as Radian.
You can change your code this way:
Code: Select all
mShipNode->yaw(Degree(MoveFactor));