Top-down moving platform problem
Posted: Sun Dec 24, 2017 4:06 pm
Hi, I'm developing a top-down game where player can stand above moving platforms.
I've found solutions for this, either by recording an stand anchor relative to the platform and setting the position of the player to it on every step, or using a PinJoint (tried with RopeJoint but didn't go well).
The problem is I need the player to collide with bodies welded on top of the platform, and:
- In the first case (setPosition) the player just ignores the bodies.
- In the second (PinJoint) the player pushes the welded body, causing the platform to move as well.
Illustration: (brown = platform, green = player, gray = welded bodies)

Is there any solution? Is there any way to make that forces applied to welded bodies don't affect the platform?
Thanks in advance.
PS: One solution would be to use a PinJoint for every body I want to be on top of the platform, so that their interactions don't affect the platform, but I think that would reduce performance (I guess a WeldJoint is more performant than using a PinJoint and setting it's target at every step, isn't it?)
I've found solutions for this, either by recording an stand anchor relative to the platform and setting the position of the player to it on every step, or using a PinJoint (tried with RopeJoint but didn't go well).
The problem is I need the player to collide with bodies welded on top of the platform, and:
- In the first case (setPosition) the player just ignores the bodies.
- In the second (PinJoint) the player pushes the welded body, causing the platform to move as well.
Illustration: (brown = platform, green = player, gray = welded bodies)

Is there any solution? Is there any way to make that forces applied to welded bodies don't affect the platform?
Thanks in advance.
PS: One solution would be to use a PinJoint for every body I want to be on top of the platform, so that their interactions don't affect the platform, but I think that would reduce performance (I guess a WeldJoint is more performant than using a PinJoint and setting it's target at every step, isn't it?)