hello every body i am new here i have a stupid question
i 've read the exemple provided with the game engine
i tried to modify the exemple 7 collision
i added this test
"
while(device->run())
{
...
core::vector3df poscam;
poscam=camera->getPosition();
if (poscam==core::vector3df(-70,0,-30))
{
}
...
}
"
and then when i open the eboot on the psp
the cam fall down and leave the scene
can you help me please i don't know why this happen
thx
LTE help
You aren't giving enough info to determine the trouble. Telling us how you THINK you changed the code in a vague manner doesn't cut it. Post the actual code (in code tags). At the very least, sometimes looking for what code to post leads to discovering the problem as you realize where you goofed up.
thx JF i found were the troble came
it was from collision detection i actually forget that i added this code
in the while(device->run) i added this without deleting any thing
it seem that the engine handel only one collision or that i didn't know how to add the second collision
that's it?
it was from collision detection i actually forget that i added this code
Code: Select all
if (faerie)
{
node = smgr->addAnimatedMeshSceneNode(faerie);
node->setPosition(core::vector3df(-70,0,-90));
node->setMD2Animation(scene::EMAT_RUN);
node->getMaterial(0) = material;
selector1 = smgr->createOctTreeTriangleSelector(faerie->getMesh(0), node, 128);
node->setTriangleSelector(selector1);
selector1->drop();
node = smgr->addAnimatedMeshSceneNode(faerie);
node->setPosition(core::vector3df(-70,0,-30));
node->setMD2Animation(scene::EMAT_SALUTE);
node->getMaterial(0) = material;
node = smgr->addAnimatedMeshSceneNode(faerie);
node->setPosition(core::vector3df(-70,0,-60));
node->setMD2Animation(scene::EMAT_JUMP);
node->getMaterial(0) = material;
}
scene::ISceneNodeAnimator* anim1 = smgr->createCollisionResponseAnimator(
selector1, camera, core::vector3df(30,50,30),
core::vector3df(0,-3,0),
core::vector3df(0,50,0));
camera->addAnimator(anim1);
anim1->drop();
in the while(device->run) i added this without deleting any thing
Code: Select all
if (smgr->getSceneCollisionManager()->getCollisionPoint(
line, selector, intersection, tri))
{
bill->setPosition(intersection);
driver->setTransform(video::ETS_WORLD, core::matrix4());
driver->setMaterial(material);
driver->draw3DTriangle(tri, video::SColor(0,255,0,0));
if (smgr->getSceneCollisionManager()->getCollisionPoint(
line, selector1, intersection, tri))
{
bill->setPosition(intersection);
driver->setTransform(video::ETS_WORLD, core::matrix4());
driver->setMaterial(material);
driver->draw3DTriangle(tri, video::SColor(0,255,0,0));
}
it seem that the engine handel only one collision or that i didn't know how to add the second collision
that's it?
Sounds like you're not very familiar with irrlicht (LTE is just irrlicht with the function prefix changed to LTE in places). You should probably go over to the irrlicht site and review their docs and examples.
http://irrlicht.sourceforge.net/
There's also docs in the LTE source archive in the docs directory.
http://irrlicht.sourceforge.net/
There's also docs in the LTE source archive in the docs directory.