Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Physics SDK Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Moe

March 03, 2005, 01:05 PM

I have been looking (a little) at the Novodex SDK for collision detection and physics. There are a few points I donít quite get when using a SDK. I think I am missing something about the point of using it properly or I donít see how to use it wisely...

1. Do you use the SDK for collision detection between the player and the world?
2. Do you use the SDK for collision detection between your shoots and the objects/enemies/world?
3. Does the SDK split up the world for spatial collision detection, or to I need to organise this myself?
(Huge worlds with many movable objects. Like visibility tests. I donít want to check collisions at places witch are irrelevant.)

It looks like I would need to reorganise the entire gfx part (scene graph) if I want to include the physics from the SDK, since I need to get position and orientation from the physics engine after computing. Therefore I need to check every object every time. If I had control over this I could ignore objects witch are too far away to be seen.

Any input is appreciated, thx.

 
bovicide

March 03, 2005, 01:22 PM

1. Yes you can... this is acheived by making your character a kinematic object usually. Sometimes you can get away with it otherwise, but it is generally better to just make it kinematic.
2. Yes that is one way to handle it. Usually for slower moving objects like arrows or whatever it would be best to let the physics engine handle it. But for something like gunshots sometimes you might just ignore the collision and assume it moves "infinitely fast" so if the object is visible it hits it.
3. I believe it does but maybe someone else could provide a little more on this one.

The world matrices representing your models can be obtained directly from novodex but you are right you would need something to check whether they are visible or not. Besides that maybe someone else has some insight, but thats my take on it

 
mentalcalculator

March 03, 2005, 04:38 PM

3. Novodex takes care of it, that's called Broad Phase. Broad Phase is the process of finding all possible collision pairs. All pairs found proceed to the narrow phase where the collision detection with the real shapes happens instead of the bounding volumes overlapping tests. I think Novodex lets you choose what kind of implementation you want for the Broad Phase, check the SDK and you'll see some flags with Broad Phase name in it. You just need to create all objects with Novodex, run the simulation and query Novodex about object's position and orientation so you can render them properly.

 
Moe

March 03, 2005, 05:09 PM

Thx for your replies.

I am wondering though, if someone has a good idea to implement the scene graph for rendering. Do I really need to check every object or is there a way to ďout ruleĒ several objects at once like you could if you had e.g. an octree?

 
mentalcalculator

March 05, 2005, 04:00 PM

Hum...can't you use an octree ? You can use a quadtree, sphere-tree, portals, etc... Your choice should depend on the type of your scene.

 
Moe

March 05, 2005, 04:13 PM

I could use an octree if I would be capable of getting the position and orientation of only those objects witch have actually changed. Since I can not predict witch objects were moved I would need to query ever object and adjust its poison within the octree. If I need to place every object every frame it will be too slow if I have a massive large world.

 
This thread contains 6 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.