After hours upon hours of searching and analyzing, I have finally figured out how to keep my racecar going by pressing and holding the keyboard.
Now I'm trying to smooth animation(basically, the same thing, though a tad different than before), and I'm trying out one method that I found by copying and pasting from another forum question.
The code sample:
vector3df moveForward = Arwing->getAbsolutePosition();
moveForward.X += 2;
ISceneNodeAnimator* runto = SceneManager->createFlyStraightAnimator(
Arwing->getAbsolutePosition(), moveForward, time, 0);
Arwing->addAnimator(runto);
runto->drop();
break;
}
Without this chunk of code, my game thus far compiled fine, but now the Compiler keeps telling me that 'SceneManager's is undeclared, 'first use of this function'. I just read about 'Dynamic Memory Pointers' in a C++ manual, so now I'm having a better and better idea of what's going on. How do I declare this?
Scene Manager UnDeclared
-
roninmagus
- Posts: 91
- Joined: Fri Oct 31, 2003 5:03 am
The code you grabbed to create an animator seems to come from inside a custom scene node, or where a pointer called "SceneManager" has been created. Try replacing SceneManager with <pointer to irr device>->getSceneManager()
[/b]
Code: Select all
ISceneNodeAnimator* runto = [b]irrDevice->getSceneManager()[/b]->createFlyStraightAnimator(
Arwing->getAbsolutePosition(), moveForward, time, 0);
Arwing->addAnimator(runto);
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht