2

I've been using Cannon.js with Three.js a lot recently and they work great together.

There's to be one part which I'm struggling to find information/examples about.

Is it possible to rig a character model using Cannon.js default shapes for physics/collision simulations?

For example - https://threejs.org/examples/webgl_animation_skinning_blending.html

This is a Three.js SkinnedMesh (exported from a 3d application), it contains bones which simulate 'pre-configured' animations (walk, run, etc). I want to add Cannon.js shape's to each 'bone' and be able to use this model in my scene for collisions etc. Is this possible to do?

6
  • Do you want the physics to drive the skinmesh (ragdoll simulation), or do you want the skinmesh animation to drive the physics shapes? Commented Sep 12, 2018 at 7:22
  • Ideally both? I'd like to be able to have a skinmesh character rigged to walk, run but then if the character gets hit, react with the cannon.js type physics. Commented Sep 12, 2018 at 8:24
  • I'm trying to achieve the same goal, any chance you managed to do it? Commented Oct 15, 2020 at 7:07
  • Unfortunately I didn't get any further than this question, sorry. Commented Oct 16, 2020 at 10:29
  • @danlong I managed to do it, but still struggling with performance. If you're still interested, check this answer: stackoverflow.com/a/65074285/6188783 Commented Nov 30, 2020 at 13:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.