Closed brenthaertlein closed 6 years ago
Fixed a bug in the jumping behavior for Level 3
This got messed up in #56
This should be fixed now. Since FlyFlys now have 0 gravityScale, they wouldn't fall at all with gravityScale *= 10.0f
, which is how we erroneously ended up setting = 10.0f
. This exposed the issue that there was "no way" to know the correct gravity scale (usually 1
, but could be negative for upside down gravity or >1
for strong gravity).
I introduced a new field for all Enemy classes/subclasses called DeathGravityScale
which defaults to 1
and is changed for all enemies on Level 3 to be -1
.
Enemy.cs:95
Change:
Rigidbody.gravityScale = 10;
to:Rigidbody.gravityScale *= 10;