From: Timothy S. <str...@ma...> - 2005-05-24 18:48:12
|
On Tue, 2005-05-24 at 22:03 +1000, Roger Stuckey wrote: > Firstly, can you provide an example using xode to load a trimesh > geometry? This should probably work: from xode import parser trimesh_doc='''<?xml version="1.0" encoding="iso-8859-1"?> <xode> <world> <space> <geom name="trimesh1"> <trimesh> <vertices> <v x="0" y="1" z="1" /> <v x="1" y="2" z="2" /> <v x="2" y="0" z="1" /> <v x="0" y="1" z="2" /> <v x="2" y="2" z="1" /> </vertices> <triangles> <t ia="1" ib="2" ic="3" /> <t ia="2" ib="1" ic="4" /> <t ia="3" ib="2" ic="1" /> </triangles> </trimesh> </geom> </space> </world> </xode> ''' p = parser.Parser() root = p.parseString(trimesh_doc) trimesh1 = root.namedChild('trimesh1').getODEObject() > Secondly, I have been dropping a trimesh cube onto another trimesh cube, > but the colliding objects behave quite strangely - nothing like the > behaviour of a GeomBox being dropped onto a GeomPlane, for example. They > bounce quite violently off each other! It is possible that the vertices of the triangles are not specified in the correct winding order. Try reversing the order and see if that works. For example, instead of specifying a triangle as v1, v2, v3, try v3, v2, v1. -- Timothy Stranex <str...@ma...> |