daniu54 / earie-treasures

A 2d top-down loot-em-up with horror and stealth elements
0 stars 0 forks source link

Prevent player from pushing enemies around #35

Closed Abb4 closed 1 year ago

Abb4 commented 1 year ago

Currently both the enemies and the player have colliders, which means that they can push each other around when MoveAndSliding. This should probably not be possible, since that makes the enemies less scary. While the enemy-side can be fixed by configuring Avoidance on the NavigationAgent2d, the player side seems not so trivial.

I would investigate if it is possible to "remove weight" from the player collider so that pushing the enemy colliders is impossible. If that is not an option, it would probably also be fine to disable this collision interaction on both sides. Instead the enemies would simply apply damage to discourage the player from getting too close