Conversation
|
Play this branch at https://play.threadbare.game/branches/endlessm/grapple-to-climb. (This launches the game from the start, not directly at the change(s) in this pull request.) |
|
Thinking aloud here. Right now the HookControl has just one RayCast2D that collides with both
Then we could say: you can grapple only if |
To test climbing. And also adjust the teleporter area to a single tile, so the player can't teleport from the level above.
This is worth exploring so I'm giving it a try! Today I tried to make it work just with the RayCast2D and then looping through the collisions like this: But it didn't work because Tilemap collisions can't be excluded. |
b8f8ba5 to
c583bb3
Compare
|
What if you add a custom data layer to the tile set, of type Vector2, that specifies which direction the cliff is pointing? You can get the rid of a collider from the collision result, and convert this to a tile coordinates via a method on the tilemaplayer |
|
@wjt as you imagined the ShapeCast2D didn't work. Basically it doesn't have a way of knowing if the ray (or shape) is trespassing the wall. The custom data layer is an interesting one, I'll explore it! recording.webm |



Here is a quick branch to check the status of the grappling hook to climb.
This is currently not possible because the grapple collides with walls. Otherwise, the player would be able to reach buttons or pins in a diagonal, making the use of needles less important:
Also the player is colliding with walls while pulling. This branch disables the collision with walls while pulling, as it was happening with the non-walkable floor (water, void). And because the grapple ray may start in the middle of the wall (when the player is touching the wall) it kind of works for going up one level. But as you can see, it doesn't work for going down. I added some pins to the needles level to test it:
recording.webm
recording.webm
My initial feeling about this is: trying to do this kind of things into a game that doesn't have actual elevation is hard!