tutorial (Source_LightsCameraAction) problem

Problems building or running the engine, queries about how to use features etc.
LCY
Gnoblar
Posts: 10
Joined: Mon Jan 10, 2005 3:54 pm

tutorial (Source_LightsCameraAction) problem

Post by LCY »

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
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

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:

Code: Select all

mShipNode->yaw(Degree(MoveFactor)); 
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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
LCY
Gnoblar
Posts: 10
Joined: Mon Jan 10, 2005 3:54 pm

Post by LCY »

thanks for help i solve it :) :o :D