12-08-2020, 07:06 AM
(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))
...