> For the complete documentation index, see [llms.txt](https://fantacode.gitbook.io/grappling-hook-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fantacode.gitbook.io/grappling-hook-system/grappling-hook-controller.md).

# Grappling Hook Controller

## Main

<div align="left"><figure><img src="https://1760661770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9OoN12zSUOjUR5inxlxK%2Fuploads%2Fvtr4N1cPfFSyhIuJz9OM%2FScreenshot%202024-11-01%20110947.png?alt=media&amp;token=978f7524-3f94-4464-a56b-2957443c1b33" alt=""><figcaption></figcaption></figure></div>

* **EnableHook**: Enables or disables the grappling hook functionality.
* **HookInput**: Defines the keyboard key for initiating the hook.
* **HookInputButton**: Identifies the input button name for hooking, helpful for controllers.
* **Mode**: Sets the grappling mode, allowing swinging, hooking, or both.
* **MaxSwingAngleLimit**: Limits the maximum angle allowed for swinging.
* **SwingOnlyIfHookPointExists**: Enables swinging only if a hookable point is found between start and end.
* **RopeThrowingClip**: The animation clip used when the rope is being thrown for the hook.
* **AnimationSpeed**: Controls the speed of the rope-throwing animation.
* **MaxDistance**: The maximum distance the grappling hook can reach to attach to a point.
* **MaxSwingDistance**: Sets the maximum range allowed for swinging.
* **MinDistance**: The minimum distance the player must be from the grappling point for the hook to function properly.
* **GrapplingHookMoveSpeed**: The movement speed when using the grappling hook.
* swingActionMoveSpeed: The movement speed during the swing.

## Rope Settings

<div align="left"><figure><img src="https://1760661770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9OoN12zSUOjUR5inxlxK%2Fuploads%2FZ305XlYr5j5UaiPF72WQ%2FScreenshot%202024-11-01%20112158.png?alt=media&amp;token=473e32da-a29e-41b0-b3f7-3f773498d9b4" alt=""><figcaption></figcaption></figure></div>

* **RopeRadius**: Specifies the thickness of the rope used for the grappling hook.
* **RopeMaterial**: The material applied to the rope for visual appearance.&#x20;
* **RopeThrowSpeed**: The speed at which the rope is thrown towards the target point.&#x20;
* **RopeResolution**: Determines the number of segments used to render the rope, affecting its smoothness.&#x20;
* **SpiralRadius**: The radius of the spiral motion when the rope is thrown.&#x20;
* **SpiralFrequency**: Controls the frequency of the spiral effect in the rope's motion.
* **RopeStartPoint**: The starting point of the rope. If not set, the right hand will be used as the default&#x20;
* **HookObject**: This Transform represents the physical hook part of the grappling gun, typically the part that travels towards the target point when the grappling hook is fired

## Camera Settings

<div align="left"><figure><img src="https://1760661770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9OoN12zSUOjUR5inxlxK%2Fuploads%2FdKKCZXqIgntldniaVofq%2FScreenshot%202024-10-04%20155423.png?alt=media&amp;token=9e976ce2-ae0c-4840-80f9-e18c795df3cf" alt=""><figcaption></figcaption></figure></div>

* &#x20;**CameraShakeAmount**: The intensity of the camera shakes when the hook is pulled.
* &#x20;**CameraShakeDuration**: The duration of the camera shakes when the hook is pulled.

## Crosshair

<div align="left"><figure><img src="https://1760661770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9OoN12zSUOjUR5inxlxK%2Fuploads%2Fi2ZT0QZmiE7qJMB6oYN5%2FScreenshot%202024-10-04%20155455.png?alt=media&amp;token=e51438d8-0585-4bd1-9074-7738a884ae90" alt=""><figcaption></figcaption></figure></div>

* &#x20;**CrosshairPrefab**: The crosshair to display when aiming the grappling hook. •
* **CrosshairSize**: The size of the crosshair.

## Events

<div align="left"><figure><img src="https://1760661770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9OoN12zSUOjUR5inxlxK%2Fuploads%2FTrrUlfVWoVr2qg9oVMI3%2FScreenshot%202024-11-01%20112901.png?alt=media&amp;token=eeeee625-6225-4904-a91a-51c9ae64fbb5" alt=""><figcaption></figcaption></figure></div>

* **RopeReleased**: An event triggered when the hook is released.&#x20;
* **RopeHooked**: An event triggered when the hook successfully attaches to a target point.&#x20;
* &#x20;**MovementStarted**: An event triggered when the player starts moving towards the point.&#x20;
* &#x20;**TargetPointReached**: An event triggered when the player reaches the point.
