Hello there ^^
I was wondering how can I associate random paths to my secondary caracters as like in coppercube, but this time with code ?
.
Random paths
Re: Random paths
I don't know what coppercube does.... is this about having objects follow a fixed path somehow? Take a look at ISceneManager::createFollowSplineAnimator. That might be what you are looking for (or something similar).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: Random paths
If I understood his post correctly...
He wants something similar to a fixed path for the object to follow, but he wants it randomly generated during runtime.
He wants something similar to a fixed path for the object to follow, but he wants it randomly generated during runtime.
"this is not the bottleneck you are looking for"
Re: Random paths
I wanted to use but it does not rotate the node when the mesh is supposed to turn :/
Code: Select all
createFollowSplineAnimator
Re: Random paths
Hm, yeah - I think we have no animator for that so far. So you'll have to write your own (you can maybe start by copying the code of that one - and then just adapt the rotation). Or write a patch that allows rotation to happen as well (controlled by a flag), then we can apply that to the engine.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Random paths
You may take a look at the class NpcPathControl in the snippets:
http://irrlicht.sourceforge.net/forum/v ... =9&t=46437
Simple use (see also main.cpp):
and in the main loop:
Regards,
smso
http://irrlicht.sourceforge.net/forum/v ... =9&t=46437
Simple use (see also main.cpp):
Code: Select all
NpcPathControl* npcPathControl = new NpcPathControl(device, fairy);
npcPathControl->setSpeed(200.0f);
npcPathControl->setWaypoints(points);
npcPathControl->start();
Code: Select all
npcPathControl->update();
Regards,
smso
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Random paths
I think I also have some patch for such an animator somewhere. So there should be at least some code on the forums for exactly such an animator.