I don't know why, but it seems like some people like Gappling gun mechanic in 3D games for fast moving or effective traveling with the First Person Controler. In 3D it can be as simple as:
Casting ray from camera node.
Checking if ray cast is coliding with something after is_action_just_pressed.
If ray cast is colliding let's get this point.
Disable gravity and move/lerp player to the point.
If player is close enough enable gravity and disable moving/lerping.
Tutorial can be also combined with enabling grappling to another point while the player is in air or offseting y of collision point a little to give player the ability to get on the edge of block/element that is grappling to.
As an additional tip you can add that if colliding with ray cast object is for example rigidbody, then the object will be pulled to the player, not the player to the object.
In 2D it can be more challenging because of differences in implementing controls, but it also can be covered as a separated tutorial.
I don't know why, but it seems like some people like Gappling gun mechanic in 3D games for fast moving or effective traveling with the First Person Controler. In 3D it can be as simple as:
is_action_just_pressed
.Tutorial can be also combined with enabling grappling to another point while the player is in air or offseting y of collision point a little to give player the ability to get on the edge of block/element that is grappling to.
As an additional tip you can add that if colliding with ray cast object is for example rigidbody, then the object will be pulled to the player, not the player to the object.
In 2D it can be more challenging because of differences in implementing controls, but it also can be covered as a separated tutorial.