open-project-1 icon indicating copy to clipboard operation
open-project-1 copied to clipboard

Hotfix for Issue #383 - Slime Critter Pushing Player Excessively

Open asb9599 opened this issue 4 years ago • 2 comments

Bugfix for issues #383 and #349: Forum Thread This issue was caused by the player and Slime colliders overlapping after the player's hit reaction plays, causing it to be pushed backward. The simple fix for this was to simply stop the Slime from moving forward during its attack if it already hit the player. For starters, I created a UnityEvent to be called during successful hit in OnTriggerEnter for the Attack class. Then on the Slime prefab I linked the UnityEvent to call a public method in the SlimeAttackController that simply stops the timer that controls its positional updates during its attack.

This can be tested by getting attacked by a Slime while up against the short rocks near the house in the TestingGround scene, the player is no longer pushed upwards and maintains its position after hit reaction finishes

asb9599 avatar Apr 08 '21 01:04 asb9599

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 08 '21 01:04 CLAassistant

Hi @asb9599, thank you for opening this PR. I wanted to mention it here in case you haven't seen the updates on the 2 linked issues:

Thank you

amel-unity avatar Jun 29 '21 09:06 amel-unity