 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
hosonno
Joined: 27 Apr 2008 Posts: 3
|
Posted: Sun Apr 27, 2008 5:03 am Post subject: LTE help |
|
|
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 |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Apr 27, 2008 11:44 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
hosonno
Joined: 27 Apr 2008 Posts: 3
|
Posted: Sun Apr 27, 2008 7:14 pm Post subject: |
|
|
thx JF i found were the troble came
it was from collision detection i actually forget that i added this code
| Code: |
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: |
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? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Apr 27, 2008 7:53 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
hosonno
Joined: 27 Apr 2008 Posts: 3
|
Posted: Sun Apr 27, 2008 8:07 pm Post subject: |
|
|
| thx J.F for your help |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|