Stratos: Punto de Encuentro de Desarrolladores

¡Bienvenido a Stratos!

Acceder

Foros





Non-convex Model Dynamic Physics

Iniciado por , 06 de Febrero de 2006, 10:31:39 AM

« anterior - próximo »

 Hi, i wanted to ask if the engine provides any facility for loading/making non-convex dynamic bodies (bodies with multiple convex meshes/hulls) or do i need to do it by hand and load all the convex meshes of the model, make a collision convexhull for each mesh, turn each pair into a rigid body and use joints to keep the body welded together (or isnt that possible or isnt that the way to do it? :) ).

To make the question less abstract, what i'm trying to do is equivalent of taking "Tut-05. Loading a...tank" and loading the tank as a dynamic physics object.

Haddd

 You can create a convex hull from any mesh. See the Tut 18, on the CreateHebe method:

  collision = new HCollision();

  float[] vertices = targetObject.Mesh.ArrayOfVertices();

  collision.CreateConvexHull(vertices);

auron

 At the moment, the exporter doesn't support hierarchies so when you load meshes, they are each loaded as a seperate mesh and aren't attached to each other.

I suppose you would build the convex hulls, like Haddd mentioned, and attach them together with joints, like you suggested. I guess the engine's limited in that sense for the time being.






Stratos es un servicio gratuito, cuyos costes se cubren en parte con la publicidad.
Por favor, desactiva el bloqueador de anuncios en esta web para ayudar a que siga adelante.
Muchísimas gracias.