cannon-es icon indicating copy to clipboard operation
cannon-es copied to clipboard

Support Capsule Shape

Open arpu opened this issue 3 years ago • 3 comments

Hey,

some question to optimize Character movements, right now i use 3 Sphere Collider meshes for Head Body Legs the best solution would be using a Capsule geometry Collider

some more infos: https://github.com/gkjohnson/three-mesh-bvh/blob/master/example/characterMovement.js

https://github.com/mrdoob/three.js/blob/dev/examples/jsm/math/Capsule.js

open for discussion

arpu avatar Jan 12 '22 13:01 arpu

some more technical info: https://wickedengine.net/2020/04/26/capsule-collision-detection/

arpu avatar Jan 23 '22 19:01 arpu

It would be very cool to have something like in Unity for this case.

I'm currently going through same thing like @arpu and after research I found this repo https://github.com/maximeq/three-js-capsule-geometry which can help tu build shape (especially that a lot of existing code to build this shape has an depreciated functions). https://dualbox.com/apps/capsule-geometry/production.

Russo-creation avatar Mar 22 '22 04:03 Russo-creation

@Russo-creation three has this build in in latest version https://github.com/mrdoob/three.js/pull/23586

arpu avatar Mar 22 '22 08:03 arpu