Enemy conflict not recognized

Hello, I’ve completed all the applications as in the lecture, but even if the laser touches the enemy, the particle reaction does not occur. What’s the problem?

I think the cause of the problem is one of the following

  1. Even if I applied Is Trigger for Player Ship, I couldn’t accept the trigger format when I bumped into other objects. So, I activated Istrigger for each individual and moved on.
  2. This is not an issue only this time, but if there is an object that is already in a parent A-child B relationship, and another child object C is placed inside the child object B, the override does not apply in B, but in A…

Hi,

Welcome to our community! :slight_smile:

Have you also checked whether the Collision module of the particle system has got “Send Collision Messages” enabled?

Thank you for your reply. Send collision message is already active😭

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? C# is case-sensitive, so double-check the spelling of the methods in your own code.

And have you already tried to add Debug.Logs to your code to see what is going on during runtime? Maybe the collision method does get called but maybe there is an if-condition which gets evaluated to false.

Without knowing anything about your project, this is just a guess, though.

Yes, the script is written the same as the lecture.

In the event of a collision, the hit particle operates normally. However, there seems to be a problem with enemy explosion particles, improving scores, and disappearing enemies.

Thank you for your kindness. I’ve finally found a solution. As I mentioned in the firstquestion, I had no choice but to manually active the triggers. In this case, It seems that the rigidbody must be activated for the collision object too.

Good job on solving the problem! :slight_smile:

Yes, Unity needs at least one active Rigidbody for a collision between two colliders. Game objects without a Rigidbody but with Colliders are supposed to be non-moveable. If you want to learn more, please refer to the tables at the bottom of this webpage.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms