Projectile Penetration

devomage

Member
I am working on an integration where the Projectile has a chance to continue moving through the object after hitting the collider.

What is the best way to ignore a collision? FixedUpdate override looks excessive.

I would also like to change the CollionType to reflect in some cases.
 
Looks like updating m_CollisionMode based on case inside FixedUpdate works well. Is there alternate solutions?
 
I could make SingleCast a protected virtual method so you could do the cast and then determine if you want to return the hit object. If you return null it will be like the object never collided.
 
I'll look into SingleCast, thanks.

I also need to have the option of having the projectile ricochet with custom ricochet code. Ideas for this?
 
If you specify an Ignore Collision Mode you can then override the velocity within the SingleCast method. With a collision set to ignore the collision will be reported but the velocity will not change, so you can then do your custom velocity handling.
 
Top