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.
boredom
Post
by boredom » Mon Sep 22, 2003 6:05 pm
hi,
i'd like to have a weapon model move with the camera - but making it a child of the camera doesn't seem to work, nor does:
Code: Select all
weaponNode->setRotation(camera->getRotation());
weaponNode->setPosition(camera->getPosition());
this does move the weapon, but it lags behind the camera, and doesn't rotate with it. any suggestions? is this a bug?
thanks!
Guest
Post
by Guest » Mon Sep 22, 2003 6:06 pm
Just use version 0.4.1 and make it a child of it. This was a bug which is fixed since 0.4.1
saigumi
Posts: 921 Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:
Post
by saigumi » Mon Sep 22, 2003 6:08 pm
Are you using Irrlicht 0.41?
There was a bug in 0.40 that wouldn't allow children to attach to the camera's scene node.
With 0.41, it works again. This is the method that I use to attach a sword and shield.
Crud, how do I do this again?
Guest
Post
by Guest » Mon Sep 22, 2003 9:12 pm
Sounds GOOD, BUT...
How to compile the new method: setEventReceiver() in 4.1?
Byron
Post
by Byron » Sun Jan 04, 2004 3:28 am
To compile with setEventReceiver() I just made myEventReceiver class that extends IEventReceiver have a constructor that does nothing so I can call it like this:
MyEventReceiver *receiver = new MyEventReceiver();
device->setEventReceiver(receiver);
It was a quick fix for me when I want my .04 code to run on .4.2
(also changed creatDevice())