Can Any Buddy Help me out
Can Any Buddy Help me out
can any Buddy tell me how to implement door closing/Opening in Irrlicht(by door means Quake 2 map door)
and also i want to attach a gun with the Active Camera But failed can any buddy help me out...
Thanx
and also i want to attach a gun with the Active Camera But failed can any buddy help me out...
Thanx
You cant use Quake map doors. The easiest way is to add an IAnimatedMeshSceneNode and use it's animation frames, ie
Adding a weapon is done by the following code, added after the creation of a camera:
________
Com?te
Code: Select all
node->setFrameLoop(0, 800);
node->setAnimationSpeed(200);
Adding a weapon is done by the following code, added after the creation of a camera:
Code: Select all
// load FPS weapon to Camera
irr::scene::IAnimatedMesh* m_pWeaponMesh = smgr->getMesh("gun.3ds");
irr::scene::IAnimatedMeshSceneNode* m_pWeaponNode;
m_pWeaponNode = smgr->addAnimatedMeshSceneNode( m_pWeaponMesh, smgr->getActiveCamera(), -1);
m_pWeaponNode->setMaterialFlag(video::EMF_LIGHTING, false);
m_pWeaponNode->setMaterialTexture(0, driver->getTexture("gun.bmp"));
m_pWeaponNode->setScale(core::vector3df(1,1,1));
m_pWeaponNode->setPosition(core::vector3df(10,-20, 0));
m_pWeaponNode->setRotation(core::vector3df(10,180,-65));
Com?te
Last edited by area51 on Tue Feb 22, 2011 1:07 pm, edited 1 time in total.
RE:
Weapon thing worked thanx for that..
actually what i want to do with the doors that i want to open and close the doors present inside the quake map(which can be open) i don't know how to do this if u can understand what m sayin than do help me out...
1 problem solved 1 remaining
Thanx for ur reply
actually what i want to do with the doors that i want to open and close the doors present inside the quake map(which can be open) i don't know how to do this if u can understand what m sayin than do help me out...
1 problem solved 1 remaining
Thanx for ur reply
As far as I know with working with the engine, it doesnt support the Quake door entity. Since you can use collision detection with the engine, you should rip out the door, recreate it with a modeling program, and texture it the same way using the same image as was on it in the quake map, then rig it with a skeletal system, animated it with closed, opened, opening, and closing animations, then export it as .X put your code in and have the animations triggered when you collide with it.
I have done it back in version .06 this way. In fact I have stopped using quake maps just because of possiably infringing on the Quake EULA if I want to go commercial, and started using .X models with applied collision detection.
I have done it back in version .06 this way. In fact I have stopped using quake maps just because of possiably infringing on the Quake EULA if I want to go commercial, and started using .X models with applied collision detection.