0 votes

I want to make a simple 3D grappling hook which only get attached to specific objects (like a black cube) and just uses the player's momentum. No Hookes Law and such, the grappling hook is a solid piece basicly.

Godot version 3.3.2
in Engine by (55 points)

like just cause where you go to the object or like spider-man games?

One of the simplest ways to set up a player attractor like a grappled–object is to just lerp the player's Vector3 translation to that of the object. So you might set a Raycast when the player clicks/grapples and if the ray hits a PhysicsBody, then:

player.translation = lerp(player.translation, raycast.get_collision_point(), lerp_speed)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.