Hi, I am prototyping an enemy being killed in my game at the moment and I cannot understand why my simple code and collisions are not working harmoniously. Below is the very simple code and screenshots with what I think is important highlighted.
As you can see, the tags used are correct, there is a collider with is trigger set to true and the projectile is entering, staying and exiting said collider.
Does the projectile also need a collider with is trigger set to true? I do not see why that would be the case. A fix and an explanation, so that I don’t make whatever mistake I am making would be nice.
What reasoning do you have for making the object a Rigidbody? Aside from letting the target fall to the floor, it will not achieve anything purposeful (yes, I have tried doing it). I have now added colliders (triggered and otherwise) to my projectiles as well as the targets - still no success.
“Notes: Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached. Collision events will be sent to disabled MonoBehaviours, to allow enabling Behaviours in response to collisions.”
The projectiles and now the target have Rigidbodies (with is Kinematic as false set) as you suggest and the target is falling over when hit. I am not entirely sure what is wrong here. Would some more screenshots assist?