chandlerprall / GoblinPhysics

Collision Detection & Response in JavaScript
http://www.goblinphysics.com
Other
147 stars 18 forks source link

Export MeshShape/Compound Shape from Blender? #58

Closed belohlavek closed 8 years ago

belohlavek commented 8 years ago

Hello, I'm trying to get started using 3D with three.js and I'm having a hard time understanding how to easily edit collision shapes in blender and export them to a JavaScript Physics engine.

How do I export a mesh as a MeshShape in Blender? Or, if I'm not pointing in the right direction: how do I easily modify MeshShapes for Goblin Physics (or Physijs)? Do I need to create my own editor?

Thank you for reading.

chandlerprall commented 8 years ago

You can re-use the 3D geometry you generate for Three.js. Take a look at the code for mesh-shape example which does just that.