chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

Is there a way to use THREE.SkinnedMesh as THREE.Mesh? #164

Open eldad87 opened 10 years ago

eldad87 commented 10 years ago

Hey, Is there a way to use SkinnedMesh as it where a regular Mesh?

I'm developing an OS RTS engine, in my case - all my meshes are skinned (skeleton animation) but unfortunately - SkinnedMesh is not supported by Physijs. I don't mind that each of my models will have its own static Basic Shape - regardless of its current animation.

Please advise, Thanks!

tapio commented 10 years ago

A work-around I've used is to create an invisible dummy mesh with the desired physics shape and other properties and then add the animated mesh as a child to it.

chandlerprall commented 10 years ago

The method @tapio gave is what I recommend unless you need the accuracy of bone collisions in which case you would need to create a Physijs object for each bone and set its position and rotation each frame.