Not seeing the OnImpact event

lledden

New member
I have a 3rd person character with assault rifle and projectiles which appears to be operating properly. I created a cube as a test target and added the Health script to it. Added a box collider and dragged the collider into the Hitboxes property in the Health Script inspector.

I put a breakpoint just inside OnDamage, but it never is trapped when the projectile pierces the collider.

Any suggestions as to what to look for.
 
The OnObjectImpact event? This thread goes through the debugging steps for it:

 
I'm working with the Assault Rifle with a projectile that I created (large ball that is easy to see). The target cube is set to the character layer which is selected in Impact Layers in the Shootable Weapons Script. I set a breakpoint in the OnCollision method in Projectile.cs. That is not being triggered.

I looked at the Melee Weapon thread you linked, but can't really see anything that directly applies. Can you point me to an example that has a target that interacts with an Assault Rifle?
 
In the demo scene all of the red boxes will explode when you hit them enough, as well as the wooden crates. You can use the rocket launcher or bow which has a projectile.
 
Top