I’ve been wrapping my brain around it for a while now but I haven’t seem to come up with a way how I would make climbing like these games do it. I’d need some ideas on how as I’m working on cloning white knuckle to get better with game development.
Your Hands are Area3D
that detect the Holds, which are also Area3D
. You detect the overlap by using the area_entered
/ area_exited
on your Hand with the proper collision mask and collision layer setup behind (your Hands should be on the same collision mask as your Holds’ collision layer).
When you press the button, like LMB/RMB, you check if the Hand is overlapping with the Hold. If it does, you freeze the movement of that Hand, additionally maybe aligning your Hand with the Hold so it looks better. When you release the button, you unfreeze the movement.
If you don’t want to use specific Holds, but rather allow the player to grab onto any surface, like it’s done in A Difficult Game About Climbing - instead of detecting the Holds, you just detect the surface body, so you’d use body_entered
/ body_exited
instead, but the rest of the logic should stay intact.
Camera should be placed somewhere between the Hands, so you can maybe just interpolate to the middle position of the two Hands, with some additional backwards offset. You can try using a SpringArm3D
too.
Let me know if you have any issues, good luck!