Putting boundries on a terrain

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
Guest

Putting boundries on a terrain

Post by Guest »

I am trying to put a sky and boundries to where my fps camera can go.

I have been making terrains in milkshape and this works well, but now I
tried putting a large geoshpere to interset the plane of the terrain.

When I load it it seems to work fine but as I reach the border of the sphere
I can go right through it the I can't get back in.

Any advice
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

what are you using for collision detection? perhaps it only cares about normals, and therefore lets you thru the back side of the polygons but not the front (and your normals are facing outwards).
a screen cap is worth 0x100000 DWORDS
Guest

Post by Guest »

This is what I am using for detection. It is strait out of the collision example

camera = smgr->addCameraSceneNodeFPS(0,100.0f,300.0f);
camera->setPosition(core::vector3df(0,100,0));

scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(30,50,30),
core::vector3df(0,-100,0), 100.0f,
core::vector3df(0,50,0));
camera->addAnimator(anim);
anim->drop();
Guest

Post by Guest »

This is what I am using for detection. It is strait out of the collision example

camera = smgr->addCameraSceneNodeFPS(0,100.0f,300.0f);
camera->setPosition(core::vector3df(0,100,0));

scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(30,50,30),
core::vector3df(0,-100,0), 100.0f,
core::vector3df(0,50,0));
camera->addAnimator(anim);
anim->drop();
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

what triangles are in your 'selector' object?
a screen cap is worth 0x100000 DWORDS
Guest

Post by Guest »

scene::ITriangleSelector* selector = 0;
if (node)
{
node->setPosition(core::vector3df(0,0,5));
selector = smgr->createOctTreeTriangleSelector(mesh->getMesh(0), node, 128);
node->setTriangleSelector(selector);
node->setMaterialTexture( 0, driver->getTexture("test.bmp") );
selector->drop();
Post Reply