Hey everyone!
I am still a beginner at Godot. After following a few tutorials, I am trying to code my own stuff.
Here is a video which illustrates my current problem:
My character has this massive Ray2D which detects the wide brown blocks, which mark the ledges of
the platforms. The ledge grab works fine, however I want the player to be repositioned after
he sucessfully grabs a ledge. As you see in the video, the character still "floats" after the Ray2D
detects the ledge and stops the gravity from affecting the player.
In order to tightly squeeze the player onto the ledge, I think I need to do something similiar to this:
func hangonledge_state():
var Ledge = $LedgeRay.get_collider()
position.x = Ledge.position.x -30
position.y = Ledge.position.y + 10
rest of the script...
Of course this approach does not work, as I am using a TileSet which is being detected by the Ray.
It would be great if someone here could show me a way to solve this. I am still a beginner and would
be very happy about a more elabore explanation on how something like this could be solved. :)