nikki
16-11-2006 18:59:51
In my game, some times, because of a lot of force, or huge mass etc., objects may pass through each other or intersect. This is understandable, as there is a lack of continuous collision detection.
Is there any way to make sure there are no intersections at all with the existing collision detection system, or is there a need to replace the current sytem with continuous collision detection? If so, how can the system be replaced without affecting OgreODE and the client program (my game)?
I have meddled with erp and cfm values, contact joint parameters etc, but there still are some intersections. I will post a video showing this problem may be tomorrow or day after. If any code has to be posted, please ask as I have no idea what information to post.
Thank you for your help.
have you tried smaller timesteps ?
nikki
18-11-2006 08:11:56
I have, but it doesn't help. Here is how I create the world:-
GlbVar.phyWorld = new OgreOde::World(sceneMgr);
GlbVar.phyWorld->setGravity(Vector3(0,-62,0));
GlbVar.phyWorld->setCFM(1e-10);
GlbVar.phyWorld->setERP(1);
GlbVar.phyWorld->setAutoSleep(true);
GlbVar.phyWorld->setContactCorrectionVelocity(1.12);
In my game, some times, because of a lot of force, or huge mass etc., objects may pass through each other or intersect. This is understandable, as there is a lack of continuous collision detection.
i think your problem is related to the speed and (or) geometry size of your bodies. Not really about forces. But of course with bigger forces you get fasters speeds
Here is how I create the world:-
Why a gravity of -62 ?
try setting something like this:
mWorld->setGravity(Vector3(0,-9.80665,0));
mWorld->setCFM(10e-5);
mWorld->setERP(0.
;
mWorld->setAutoSleep(true);
mWorld->setContactCorrectionVelocity(1.0);
make your object's geometry bigger, play with smaller timesteps and see the speeds you have in your simulation. May be this helps:
http://www.continuousphysics.com/mediaw ... hysics_FAQ
nikki
18-11-2006 19:59:43
I have seen Bulet before (in Blender), but is there any way to integrate it with the ode that OgreODE uses without breaking the whole thing (this continuous collidion and GJK stuff interests me

) ?
Maybe someone with more experience in ODE may answer your cuestion...
i think it shouldnt be hard to replace the collision detection in ODE, but the problem is that if it isn't supported officially you'll have to hack/patch every new version of the lib....
nikki
21-11-2006 14:11:09
I think this problem only happens with trimeshes without bodies (only a geometry, to make them static).
tuan kuranes
29-11-2006 14:47:37
- bigger the data is, sooner the "float" precision problem arise, try using doubles in ODE.
- You can enable "time coherence" on trimesh. Check Ode wiki and mailing list for that.
- Buller main coder does work on GJK integration, check Convex class integration. You'll have to use Convex Geometry.