ploblem with bullet

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
koller202
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

ploblem with bullet

Post by koller202 »

i create CBulletAnimator for add animator for my billboard bullet

my ploblem is

if i shot bullet number 3,4,5 direction bullet 1 ,2, change to last bullet calculate animator
why direction before bullet change i drop animator already
and i see demo tutorial it same idea

how can i fix it ?

Code: Select all

case irr::KEY_KEY_W:

	scene::IBillboardSceneNode* ps;
	ps = getSMGR()->addBillboardSceneNode(0, core::dimension2d<f32>(100,100));
	ps->setMaterialFlag(video::EMF_LIGHTING, false);
	ps->setScale(core::vector3df(1,1,1));
	ps->setPosition(core::vector3df(Start.X,120,Start.Z));
	ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);

	scene::ISceneNodeAnimator* anim ;
	anim = getSMGR()->createDeleteAnimator(6000);
	ps->addAnimator(anim);
	CBulletAnimator *direction = new CBulletAnimator(Start,Target);
	ps->addAnimator(direction);
	direction->drop();
return true;
________
Frying Food
Post Reply