Hello
i will try to make a strategy game with IrrLicth. I already got the model done (i always follow the MVC - Model View Controler - pattern), and the controler will need fiew changes. Neither the audio part won't change very much i guess.
The main work is on the view part: the 3d scene in my case.
I compiled the tutorial 12 (terrain rendering), and it's perfect for what i need. But there's something i don't understand: how to modify the behaviour of the camera.
I undestood that the first step is to intercept the event with an EventReceiver, and return true on OnEvent to avoid others treatments on the event. But i don't understand how to move the camera The interface ICameraSceneNode don't have member functions such as Rotate() or Move().
how to modify camera behaviour
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
[Moved to Beginners' Help]
ICameraSceneNode is derived from ISceneNode, so all of the ISceneNode methods also apply, i.e. setPosition().
Cameras as a bit funny about rotations though. ICameraSceneNode::setTarget() is the most unambiguous method of telling a camera where to look. You can use ISceneNode::setRotation(), if you call ICameraSceneNode::bindTargetAndRotation(true) first (this is the default for FPS cameras).
ICameraSceneNode is derived from ISceneNode, so all of the ISceneNode methods also apply, i.e. setPosition().
Cameras as a bit funny about rotations though. ICameraSceneNode::setTarget() is the most unambiguous method of telling a camera where to look. You can use ISceneNode::setRotation(), if you call ICameraSceneNode::bindTargetAndRotation(true) first (this is the default for FPS cameras).
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way