[ODE] trimesh-trimesh collision explodes

Mark Gjoel bitflipster at gmail.com
Thu Oct 5 03:57:00 MST 2006


First of all, I'm using the ODE.NET for XNA from here:
http://www.pepperboy.net/ - it's based on ODE 0.7 - I also got this error
when using ODE.NET based on ODE 0.5 (Not for XNA).

Anyway, I'm the the preliminary phase, where I'm just playing around, so my
scenes are very simple. In fact, I can do only two things: Throw a box, or
throw a box made of triangles. A plane is in place to catch them. When I
just throw the box, everything is nice and how I'd expect it to be. The
interactions are controlled. I then throw my trimesh box, and that also
seems to behave. However, my problem is that whenever I have two trimesh
boxes touching eachother they seem to panic, and accelerate very fast away
from each other. My scene is as follows, now this is C#, but try to bare
with me...

-----------

world = new ODE.World();
space = new ODE.Space();
world.AutoDisable = true;
world.AutoDisableAngularThreshold = 0.1f;
world.AutoDisableLinearThreshold = 0.1f;
world.CFM = 1e-6f;
world.ERP = 1.0f;
world.Gravity = new Vector3(0.0f, -9.82f, 0.0f);
collider = new ODE.DefaultCollider(this.world);
space.Collider = new ODE.CollisionDelegate(collider.Collide);

-----------

And when I insert a triangle box I do this:

-----------

public void throwObj(Vector3 pos, Vector3 dir, Object obj) {
            Vector3 scale = obj.getScale() * 2.0f; // Weird constant here
            geometry.Add(new Block(obj, new TriMesh(obj.getVerts())));
            int idx = geometry.Count - 1;
            geometry[idx].geom.Position = pos;
            geometry[idx].geom.RigidBody = new ODE.Body(world);
            geometry[idx].geom.RigidBody.AddForce(dir);
            geometry[idx].geom.RigidBody.Position = pos;
            space.Add(geometry[idx].geom);
        }

-----------

... Exactly the say way I throw my ODE Box box.

Can anyone help me with this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20061005/6fce1efb/attachment.htm


More information about the ODE mailing list