Looking for someone to complete my capsule collision detection

Hello,

I have started working on capsule collision detection, and I almost have it. I have basically two spheres connected by a line, working pretty flawlessly. I’m looking for someone who can make the cylinder aspect in the middle of the capsule work. Ideally i’m aiming for speed and not realism.

Thanks,
cc

1 Like

Look into three-mesh-bvh character controller it’s rapid and has the logic for a good capsule figured out.

@Lawrence3DPK Hi, thanks for the suggestion. I have seen this, but I’m looking for something entirely unique to this use case. The capsule physics im looking for is also not for a player but rather capsule physics where i can spawn multiple and have them fall into a convex mesh and see them react to colliding with objects.

In which case @coolcomfy, have you looked into CapsuleGeometry this would allow you to create a physics body from one geometry component that can be duplicated rather than two hemispheres and an open ended cylinder…

I think geometry wise we will use a capsule to represent the actual capsule. But under the hood, from what I’ve studied, capsule physics is easier processed to use spheres instead of trying to do collision detection on non spherical meshes. The second it gets non spherical you have to do AABB, afaik. I have it almost working as it is, just need someone to help figure out the cylinder portion of it. More than willing to pay someone if they have some kind of knowledge with physics.

can I see your code?

Hi all, apologies for the delay in response. I was actually able to solve this with chatgpt helping me a bit out on the physics part. I got the capsule collision detection, now I plan on making ragdoll physics. Next step will be to turn it into wasm so it can run very fast (currently handling 20-30 capsules at 60fps without any drop in fps).

Not sure how to close the thread.

This topic was automatically closed after 30 days. New replies are no longer allowed.