So i’ve been working on my latest 2D game , and I’ve done it that if a rocket hits my player (which is a planet) , both of them blow up… BUT i’m trying to make it that two rockets blow up if they hit eachother as well , but that’s not working , only if it’s a player vs a rocket !
The both rockets are the SAME , which means same tags , same kind of collider (Polygon 2D) , same components , etc… i tried to change the tag or add an another 2D Collider , but none of that worked
The Rocket-Rocket Part is not working , this script is attached to the rockets , and no the debug statement doesnt get called …
Um i think i do need to write gameObject.GetComponent here Because it has the (MonoBehavior) before it. in other cases i know you can write GetComponent<> alone .
p.s : i’m writing (MonoBehavior) before the GetComponents because it’s not finding the components i want if i write it regularly , so this is an another way , and worked !
No problem. I’m not 100% certain but I’m fairly sure that at least one object in a collision/trigger event has to have a rigid body, even if it iskinematic.
The problem is that a collider with a Rigidbody2D is a static collider and should not be moved. Static colliders don’t contact each other. When you add a Rigidbody2D then it becomes a Dynamic/Kinematic body.