open-project-1
open-project-1 copied to clipboard
Hotfix for Issue #383 - Slime Critter Pushing Player Excessively
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
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:
-
For issue The Slime Critter attack throws the player several meters away #349 : This one has been closed since it has been fixed and not possible to reproduce.
-
For issue Slime Critter pushes player on top of small rocks #383 : This is not confirmed if it is considered an issue or not, please refer to my comment on the issue and my reply on this thread. What are your thoughts?
Thank you