TransWikia.com

Preventing player units from pushing enemies, and vice versa

Game Development Asked by Liad on January 14, 2021

I am using a Rigidbody2D to handle collision between different units.

When the player’s units encounter one another, they push each other because of the rigid body physics (and that’s good for me).

But when the player unit encounters an enemy unit, he pushes it in the same way.

What are the solutions to make enemy’s units unmovable by my units? (And my units unmovable for the enemy?)

(I know I could use isKinematic but I want the player’s units to keep interacting with each other.)

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP