Hi, can’t we use OnCollisionEnter here, so we get very precise informations of the projectile hitting spot?
M. D.
Hi, can’t we use OnCollisionEnter here, so we get very precise informations of the projectile hitting spot?
M. D.
Yes, but at the cost of the projectile interacting directly with the physics system. OnCollision colliders will stop or deflect when colliding with each other, depending on mass and force calculations. We don’t need this extra overhead for what we’re doing.
That’s not to say that you can’t play around with the system. One thing you can do is to change the collider to a trigger immediately after the collision occurs. You can get the detailed information like the point of contact and normal, and use that to spawn/attach wounds at the impact point, and then change the projectile to trigger to stop further interaction/redirection. Or you could keep it as a non-trigger collider and have some fun with where the projectile might redirect to…
Thank you for your quick answer.
M. D.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.