request

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Mancuso Raffaele

request

Post by Mancuso Raffaele »

Hello. My name is Raffaele Mancuso. I am programming a FPS with Irrlicht (v. 0.11). In my FPS I don't know when the weapon (the principal person in a FPS) falls. This is cause that when the weapon falls and after it lands, its life is the same.
So I request a function that call an other function (as device->setEventReceiver() that call
the OnEvent function in a subclass of the IEventReceiver class) when an object land (example
class MyLand:public irr::land {
virtual bool OnLand(u32 time) {
//time is the time that spent from when the node was fall and it was land
life-=(time/2);
if(life<=0) {die();}
return true;
}
}
MyLand MyLandob;
smgr->setLand (node,&MyLandob);//call OnLand when the node land
//after it were falls
).
Thank you
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

i would get the intersection between the level node and the gun node

it returns true any way
Post Reply