Collision detection question (OgreNewton Features actually)

sdragou

23-03-2006 11:57:26

I am new to OgreNewton. I am new to any physics/collision library. Until now I was using sphere and ray scene queries.

I am trying to choose the physics engine that is closer to my needs. So here is a -may be silly- question.

I've made a scene in Ligtwave and exported it to a .mesh file.

As you can easily understand the whole scene is an object. The character that will walk inside the scene object is the second object.
I am thinking to use treecollision object for the scene (which propably be static geometry for Ogre) and convexhull for the character that moves in it.

So. Will the collision detection work or it is going to check the bounding boxes of the 2 objects and will return collision all the time ?
(The problem I was facing with scene queries)

Thanx in advance

walaber

23-03-2006 16:00:45

newton can handle per-polygon accurate collision for a general mesh (aka your background), and any of it's collision primitive shapes (or a combination thereof). this includes convex hulls, boxes, ellipsoids, cones, capsules, etc.

wolfmanfx

23-03-2006 23:29:27

So if i use newton correct i dont need a other collision dectection libary or should i?

walaber

24-03-2006 00:03:39

nope, Newton can handle everything except poly vs. poly collision, which you shouldn't need anyway.

sdragou

24-03-2006 13:10:46

In order to extend the question... Just for clearing out what I've read to the API.

Let's say that we want to simulate the following case.

A large truck is carrying very heavy spherical objects. The movement of those objects will change the mass center. Even worse, when the spheres hit the truck walls a torque will have to be added to the truck body.

By using convexhull for both truck and spheres will we have the correct newtonean simulation?
Or maybe we have to make the truck a compositecollision object with seperate boxes for the walls and the floor ?

walaber

24-03-2006 17:30:05

your second thought is correct. you will need to make a compound object for the truck, using convex pieces for each part to make the overall shape. in this case, putting several objects "inside" the truck will result in the behavior you described.