Problem with humble beginnings 2

Problems building or running the engine, queries about how to use features etc.
User avatar
LordMyth
Gremlin
Posts: 181
Joined: Thu Jan 06, 2005 10:19 pm
Location: Belgium

Problem with humble beginnings 2

Post by LordMyth »

I'm doing the Lights, Camera, and Action tutorial, and at some point I get errors:

Code: Select all

In file included from Space.cpp:2:
SpaceApplication.h: In member function `virtual bool
   SpaceCameraRotator::frameStarted(const Ogre::FrameEvent&)':
SpaceApplication.h:157: error: no matching function for call to `
   Ogre::SceneNode::rotate(Ogre::Vector3&, Real)'
/usr/local/include/OGRE/OgreNode.h:409: error: candidates are: virtual void
   Ogre::Node::rotate(const Ogre::Vector3&, const Ogre::Radian&,
   Ogre::Node::TransformSpace)
/usr/local/include/OGRE/OgreNode.h:418: error:                 virtual void
   Ogre::Node::rotate(const Ogre::Quaternion&, Ogre::Node::TransformSpace)
This is the code I use:

Code: Select all

    bool frameStarted(const FrameEvent& evt)
    {
		// Copy the current state of the input devices
		mInputDevice->capture();

		if(mInputDevice->isKeyDown(Ogre::KC_SPACE))
		  mRotatingNode->rotate(mRotationAxis, mRotationSpeed * evt.timeSinceLastFrame);		

		return true;
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 »

This tutorial is written for an old Ogre version and has not yet been updated. The needed changes are small though:

Code: Select all

if(mInputDevice->isKeyDown(Ogre::KC_SPACE))
        mRotatingNode->rotate(mRotationAxis, Degree(mRotationSpeed * evt.timeSinceLastFrame));  
Details on the API-change can be found here.
team-pantheon programmer
creators of Rastullahs Lockenpracht