CCD & Trigger Objects

Pankoi
Posts: 2
Joined: Sat Aug 30, 2014 4:40 pm

CCD & Trigger Objects

Post by Pankoi »

Hi,

I would like to have the bullets in my shooter game penetrate certain surfaces (as is common in many contemporary FPSes). My plan to achieve this was to make the bullets trigger objects (through btCollisionObject::CF_NO_CONTACT_RESPONSE) and then, upon detecting a bullet's collision with a surface, determine if the bullet succeeds or fails in penetrating the surface.

However, from both this topic and my own attempts, it seems that CCD and NO_CONTACT_RESPONSE cannot be used in unison. I have attempted to implement the workaround posted in the aforementioned topic, but I find that, though the convex sweep test is being performed for each bullet, that they seem to not be detecting collisions.

If I remove the CF_NO_CONTACT_RESPONSE flag, collisions are detected as expected, so I can only assume that it's the interaction between CCD and the CF_NO_CONTACT_RESPONSE flag which is causing the problem. Does anyone know of a way to successfully implement this, or perhaps another means by which to achieve my aim?

Thanks very much for your time,
~Richard Williams
lunkhound
Posts: 99
Joined: Thu Nov 21, 2013 8:57 pm

Re: CCD & Trigger Objects

Post by lunkhound »

Instead of making trigger objects, just trace the path of your shots with ray tests.
Pankoi
Posts: 2
Joined: Sat Aug 30, 2014 4:40 pm

Re: CCD & Trigger Objects

Post by Pankoi »

Alright, that's an idea - I'll try that. :)

Thanks!
~Richard Williams