How do I make it so when a player collides with enemy, he gets a smooth knockback either left or right depending on whether he is horizontally flipped or not, that stops when he hits the ground?
I tried to do it with a tween but while he is in mid air he comes to a sudden stop, like the first image
I want it to be like the second image, where the player gets a sudden jump upwards and keeps moving in the opposite direction until he is on the ground
If you’re using the platformer behavior, the tween may be interfering with the it. Try disabling the behavior when the tween starts, then enable it once the tween is finished.
Also can you share a screenshot of the tween events?
I realize that it might be the X() + that makes it stop, but if I make it any higher it sends him flying, no idea what else to do, I just want it to be a slight knockback that keeps going until player is on a platform
The example I shared works if the player is always on the same platform level.
But since this is not the case, you can keep your previous event with the simulate jump, but instead of tweening the X position you can add a permanent force (angle), 0 or 180 deg.
Then check if the player is on a platform → stop the object.