Intersection Models between BoundingCapsule

I have an BoundingCapsule and want to (triangle exact) check collisions with the objects/nodes in my scene.

Is there a method to do this?

sure, this is not different from a BoundingSphere or Box.

simply call pysicsNode.generatePhysicsGeometry()

Sure if I explained not wenn enough, with this BoundingCapsule, there is not Model/Node or whatever object assigned with it.

I use is as kind of a sweep test, I don't know if there is a better way to do it.

I have bullets which are flying very fast, so that in the one frame the are in front of the enemy and in the next frame they are already behind the enemy so calculateCollisions will never register any hit, the bullets fly through the enemy.

So I calculate a BoundingCapsule from the last position of the bullet and the current position of the bullet with the circumfence of the bullet.

But know I do not know how to use this BoundingCapsule to check the collisions.

I do not know if there is any better way to do this, I tried to use Rays but it seemed very slow.

can you not just create a real TriMesh capsule and then call capsule.findCollisions(scene).

I think I could do that and then alwas reuse the same object. I would then always have to change orientation and scale every time.

But then I would have TriMesh->TriMesh collision detection which should be lots of slower than BoundingCapsule->TriMesh.

I was hoping that I could use the BoundingCapsule directly. I cannot imagine a reason why this shouldn't be possible.

I tried it and it didn't work. The problem lies in the BoundingCapsule. It worked with BoundingBox and BoundingSphere but not with capsule. Maybe it is buggy.

InGameState.RootNodeInstance.findCollisions(capsule, results);

always returns zero results when using Boundingcapsule.

BoundingCapsule is not fully implemented, it was put together to do sweep checks between two points, but not fully finished.

"sweep checks between two points" - that is extactly what I was trying to do :slight_smile:

Well, we use an unmodified BoundCapsule to do just that at work, I'll try to remember to take a look.