Search Issue Tracker
Won't Fix
Votes
0
Found in
4.5.0b1
Issue ID
587828
Regression
Yes
Minions stop doing damage to the player (2D regression?)
To reproduce:
1. Download and import Unity Projects: 2D Platformer
2. Let two minions push you from different sides (as shown in the attached screenshot)
3. Notice that when one minion pushes you from the left side and another from the right side, the player does not take any damage
Won't fix because:
This is not a 2D physics bug, it's how the logic of the demo is written.
If you look at how player damage is dealt with in the "PlayerHealth" script you'll see that its based upon "OnCollisionEnter2D" so if the enemy continuous to stay in contact then it won't produce any more damage.
To counter this, the developers of this made it so that the player jumps away however when two enemy are on either side then it won't jump away.
A potential alternate way to deal damage here is to use "OnCollisionEnter2D" and "OnCollisionStay2D" so you continue to get damage if you stay in contact.
I believe the Learn team did this because when it was written, there was a problem with using OnCollisionStay2D as this wasn't being emitted when the Hero changed direction (change of scale) however that has been fixed in 4.5
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- An image bleeds out of the borders of a Mask when the project is opened with the iOS Build Support module
- Shadows do not appear on the Material with a custom shader which uses screen space shadow map in HDRP when Ray Traced Shadows are enabled
- An emoji is not shown in the UI Builder Viewport and the Game view when it is placed in the Labels text attribute and Usage Hints is set to Dynamic Color
- The Sprite Renderers are looking for Secondary Textures from the wrong page within the Sprite Atlas when the Sprite Atlas has a large amount of textures for packing
- [URP] Invalid update of shader stripping settings
Add comment