Obi Official Forum

Full Version: Rope grapplig hook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Is it possible to limit the grappling hook grab distance? If not could you improve the script Grappling hook script to allow this?
(11-08-2020, 07:10 PM)illustrator Wrote: [ -> ]Hi

Is it possible to limit the grappling hook grab distance? If not could you improve the script Grappling hook script to allow this?

Forget about this. I'm not much of a programmer but I found this:

https://docs.unity3d.com/ScriptReference...ycast.html


In GrapplinHook.cs: I just added a public float RopeLength and added that as a paramater to the raycast:

...

// Raycast to see what we hit:

        if (Physics.Raycast(ray, out hookAttachment, RopeLength))


...