Using ConvexHullShape causes 'strange' effects
Posted: Wed Dec 14, 2011 5:22 pm
Hello
We are using the Bepu Physics Engine for an upcoming space game. At the moment we are working hard on a problem caused by the usage of ConvexHullShapes. The following happens:
- The 3d Model contains 1 Model for rendering and 1 collision model (which definetly is convex)
- During compile time the the vertices of the collision model are passed to the Toolbox.GetConvexHull method to retrieve the set of vertices on the surface of the hull
- At runtime this set of vertices is passed to the constructor of the ConvexHullShape class
- Then this ConvexHullShape is added to a CompoundShape
- Now when this object (which is for example a cube represented as convex hull) is shot to a flat floor (represented by a Box) the object sinks into it and seems to roll as if it was a cilinder
We think we are missing a general thing that should be considered when using hulls to represent collision objects. Could you please point out what we are doing wrong or which possibilities exist do debug / narrow down the issue?
Thank you very much
The dev team
Project Longshot
We are using the Bepu Physics Engine for an upcoming space game. At the moment we are working hard on a problem caused by the usage of ConvexHullShapes. The following happens:
- The 3d Model contains 1 Model for rendering and 1 collision model (which definetly is convex)
- During compile time the the vertices of the collision model are passed to the Toolbox.GetConvexHull method to retrieve the set of vertices on the surface of the hull
- At runtime this set of vertices is passed to the constructor of the ConvexHullShape class
- Then this ConvexHullShape is added to a CompoundShape
- Now when this object (which is for example a cube represented as convex hull) is shot to a flat floor (represented by a Box) the object sinks into it and seems to roll as if it was a cilinder
We think we are missing a general thing that should be considered when using hulls to represent collision objects. Could you please point out what we are doing wrong or which possibilities exist do debug / narrow down the issue?
Thank you very much
The dev team
Project Longshot