How can i write a script that...

Let’s say :

An enemy shoots a fireball, and this fire ball may pass through an other enemy, i want it to ignore the collision of the other enemy .
Now, each enemy is a rigged figure ( mesh+bones+colliders etc… ), i know i can make a for loop, ( using FindGameObjetcsWithTag(“Enemy”) ), however, it will work only for the enemys around the shooting enemy but still collide with it’s children, how can i write somthing that will work for that ?
Thanks !

Could you rephrase that question?

Do you want the fireball to only hit you and not the other enemies? I dont quite understand your point.

I want the fireball to hit everything but the other enemies .

Use separate layers for your enemies and whatever else it is that the fireball might collide with. Raycast with a mask.

Unity - Manual: Layers (reference page for Layers since I’m looking it up :slight_smile: )

Make a new Layer for your fireball…
Go to render settings>physics>and uncheck the box between the new layer…

Layers did it for me thank you everyone so much :smile: