Reproduction steps:
- Open the attached project
- Open the SampleScene.unity Scene, located in the /Assets/Scenes folder in the Project window
- Enter Play Mode
- Observe the warnings logged in the Console window
Expected result: there shouldn’t be any Relative Velocity spikes and no warnings logged
Actual result: there are multiple Relative Velocity spikes and there are multiple warnings logged
Reproducible with: 2019.4.39f1, 2020.3.36f1, 2021.3.5f1, 2022.1.7f1, 2022.2.0a17, 2023.1.0a1
Reproducible on: MacOS 12.4 (21F79)
Notes:
- Setting the Collision Detection property on the GameObject’s RigidBody2D Component to Discrete fixed the issue
- The issue is reproducible on both Apple Silicon and Intel Editors
- If the spikes did not occur and no warnings in the Console window are logged, exit and enter the Play Mode again
Forum Post: https://forum.unity.com/threads/impact-damage-after-multiple-hits.1274072