Reset forces on a PlatformerObject

I have not reproduced a simple version of this, so it might not be a bug, but I currently use a PlatformerObject and when it dies I warp it back to the beginning of the level after a small death animation. I call “deactivate Platformer behavior” during the death animation and reactivate it after warping back to start.
This all works as expected… except when the PlatformerObject hits a collision on the upward momentum of the jump, then after warping back to beginning of the level as soon as the platformer behavior is reactivated the jump continues where it left off.
I’ve tried using “Stop all forces” on the PlatformerObject both before and after de/activating the behavior, but it doesn’t seem to work. I’ve also tried changing many of the properties like “jump speed”, “Fall speed”, and “Gravity” on the platformer object to 0 temporarily, but that doesn’t seem to help either.
It feels like PlatformerObject has it’s own set of forces, and I need a way to reset those… but I’m just guessing.
Anyone else dealt with this before?

create another copy of the player and delete the old one.
ideally you have global variables for the player already, instead of object variables.
maybe z-oder as condition to delete the right one.

2 Likes