I am trying to do simple 2d platformer prototype using raycasts for collision detection. But stuck at handling slopes and moving platforms. Finally i give up. I am start thinking, this is impossible using current raycasts implementation.
For slopes, I should cast vertical rays with respect to horizontal player movement, i can do this only after i get horizontal hit results. But i can’t because of async raycast in Defold.
For moving platforms, i should move player in some circumstances before i move platform. But i can’t because there is no response when nothing is hit.
Plus, we get only closest hit from the starting point.
Raycasts in Defold is almost useless.