Hi,
How could i do the contrary of this, and only check for collisions between my character and any enemy from the EnemyLayer? (without checking the name of each enemy?)
The layer mask here just “ignores” the specified layer, i would like the exact opposite :
Physics.Linecast(transform.position,player.transform.position,hit,~EnemyLayer.value);
if (hit.collider.name==player.collider.name){
I thought about creating an array of GameObject : var enemies:GameObject[];
but back to Unity it expects a number with : “Size ---- 0” …
Any idea?
Thanks