Hi, I've been tinkering with moving platforms horizontally and vertically for a platform game. I'm struggling though, as I'm not sure what people typically do.
I wish to re-use the sprite and script within the game, so I considered that it should move freely, but only reverse direction when it reaches an invisible marker sprite that I add at one end and the other.
But that raised other questions, "How do you detect the collision to reverse?", "Should the moving platform be a KinamaticBody2D, or something else?", "Do I use layers to prevent the player from colliding with the invisible marker?", if so how?
There's so few examples of this online and none seem applicable, what would you guys suggest?
Please note, this is for a pixel platform game, so lerps etc probably wouldn't move so well.