BEPU and helix toolkit

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Posts: 1
Joined: Wed Mar 01, 2017 4:10 pm

BEPU and helix toolkit

Post by Nostrom0 » Tue Sep 19, 2017 8:33 am

Hello all

Does anyone have any information in regards to applying physics to items in the helix view port?
I am trying to setup collision between two robots and their environment.

Thanks in advance!

Site Admin
Posts: 4680
Joined: Tue Jul 04, 2006 4:45 am

Re: BEPU and helix toolkit

Post by Norbo » Tue Sep 19, 2017 6:18 pm

I am not familiar with helix, but I assume there exists some concept of a visual mesh associated with a world transform; that's the key part.

There's one common issue: physics bodies rotate around their center of mass. Their Position property (and so the translation WorldTransform based on the Position property) refer to that center of mass. If you're using a visual mesh that isn't centered in the same way, applying the physics body's transform to the mesh will result in the graphics being offset from the physics. You'll have to find a transform to move the visual mesh into alignment with the physics body in local space before applying the physics transform. For more information, see the related documentation.

Once you have the visual and physical objects aligned in local space, you can then apply the physics body's position and orientation to the graphics.

Creating physics bodies to match a mesh can be a bit trickier. If possible, approximating it with primitives like spheres and boxes would be ideal for performance and simplicity. Using convex hulls for individual pieces is another option, though their collision detection cost is proportional to the number of vertices, which means it would be best to use a very simple mesh as input. For concave shapes, a compound body of multiple convexes could be used, but there does not exist any built in convex decomposition- you would have to use an external tool to generate the shapes.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest