Found and awful workaround.
It works correctly when I do this:
- Introduce another
CharacterBody2D
called HiddenDummyOriginBody - Make it behave like Origin Body
- Make Moving Platform move via
RemoteTransform2D
in HiddenDummyOriginBody - Make Origin Body move via
RemoteTransform2D
in Moving Platform (important)
This way all three - Origin Body, Moving Platform (with sync enabled) and Character standing on Platform are in sync.
Of course HiddenDummyOriginBody
is 1 frame ahead of everything but it’s just hidden dummy object and we don’t care about it.
So the solution is to reverse RemoteTransform2D
- make CharacterBody2D
Origin Body copy transform of AnimatableBody2D
Moving Platform instead of Moving Platform copy Origin Body. And to do this we need to introduce another CharacterBody2D
to be actual source and logic of all the movement.
Works but seems like big boilerplate and just does not feel right.
There should be some better solution.