Changing jump power run time?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Ivo Georgiev
Posts: 27
Joined: Wed Dec 12, 2007 7:05 pm

Changing jump power run time?

Post by Ivo Georgiev »

How can I change the jump power when the game runs, not when I am compiling...I mean changing the properties of the camera during the run process.Something like this:

Code: Select all

while (my_device->run()) {
driver->beginScene(true, true, 0)
my_scene->drawAll();
<code to change the jump power of the camera>
driver->endScene();
}
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

You can't, at least not trivially, as that property isn't exposed by ICameraSceneNode. The various camera scene nodes are fine for simple demos, but are not intended for use in serious projects. Having "jump" functionality is a nice bonus, but not really core functionality of a "camera".

What you could try doing is add a new camera with the same properties as the existing one (including setting its position and look at) with a new jump speed, then calling remove() on the existing one. This may work fine, or may produce wacky artifacts; you'd have to suck it and see.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply