I try to make a topdown game about tanks and my tank goes thru the wall although I’ve put some colliders and rigidbody2D on the tanks and the walls.
These is the Inspectors:
The tank(right),the wall(left).
How do I fix this?
Edit: My tank hasn’t just gone through the wall. It stuck a little bit .
This is the first time I’ve seen such a situation.
If it had gone through completely, I was going to ask if the GameObject layers are different and if so if the interactions are being simulated between the layers.
Since the tank got stuck, I would suggest looking at the size and shape of the colliders. The collision detection setting on the tank is also worth changing to continuous, which is a common practice for the player’s GameObject.