I setup a hero and some platforms that are moving from the top downwards. With these I have collisionBitMasks that detect when the hero lands on a platform if the hero comes from above (to let the hero jump through the platforms)
if (_hero.physicsBody.velocity.dy > 0) {
_hero.physicsBody.collisionBitMask = 0;
}
else {_hero.physicsBody.collisionBitMask = platformCategory;
}
Everything works fine, except that the hero keeps bouncing on the platform. Is there a way to let him sit on it, while the platform is moving down?
I tried using physicsBody.resting
and physicsBody.friction
, but without any success.
Thanks for help Guys