# Jumpscares

{% hint style="info" %}
Jumpscares have come to define the experience of many horror games, making them a fundamental element in their overall design and narrative. They are those surprising, startling moments that occur suddenly, often without warning, triggering an intense fear response from the player.
{% endhint %}

To define a jumpscare, simply add the **Jumpscare Trigger** component to the trigger object. You can choose between **Direct**, **Indirect** and **Audio** jumpscare types. Within each jumpscare type, you can set the **Trigger Type**.

{% hint style="info" %}
By setting the **Trigger Type** to **Event**, you will need to call the **Jumpscare Trigger -> TriggerJumpscare()** method using **Unity Event** or using your desired method.
{% endhint %}

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FaHqGD5gnnWFECXofBvnw%2FScreenshot_5.png?alt=media&#x26;token=944fbe02-c1fd-4713-b5b2-b6b4933092bb" alt=""><figcaption></figcaption></figure>

### Direct Jumpscare

{% hint style="info" %}
The first type, the **Direct Jumpscare**, further divides into two subtypes - the **Image Jumpscare** and the **Model Jumpscare**. Both are designed to appear straight onto the player's screen, triggering an immediate scare.
{% endhint %}

<div><figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FmZ9vvyzqTZiwkJ3pb6bk%2Fdirect_image.png?alt=media&#x26;token=ee952c50-bda6-4828-9ab7-de21466914f4" alt=""><figcaption><p>Direct Image Jumpscare</p></figcaption></figure> <figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FlWq4G1UVMecpCG71rg4e%2Fdirect_model.png?alt=media&#x26;token=dddbf94a-6fe8-45ae-b469-88cdcd802951" alt=""><figcaption><p>Direct Model Jumpscare</p></figcaption></figure></div>

To define a **Direct Model Jumpscare** type, you must assign a Jumpscare model and set the **Model ID** so that it can be used within the **Jumpscare Trigger** component.

1. The **HEROPLAYER** object contains a component called **Jumpscare Direct** in which you can define your direct jumpscares. The **Model Object** should be placed inside the **JumpscareHolder** object, which is the parent of the **PlayerVirtualCamera** object.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FgSGw9d4NgbFeHG06jA9e%2FScreenshot_5.png?alt=media&#x26;token=ff477608-204b-4f6d-b461-f1943932dfe8" alt=""><figcaption></figcaption></figure>

2. In the **Jumpscare Trigger** component, set the **Jumpscare Model ID** to the **Model ID** you defined in the **Jumpscare Direct** component.

### Indirect Jumpscare

{% hint style="info" %}
Then there are **Indirect Jumpscares**, which involve event-driven animations that appear at specific locations in the game environment.
{% endhint %}

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FDqxY3LQJUIqP2eg1tiJb%2FScreenshot_6.png?alt=media&#x26;token=6d385c76-f4aa-4422-8412-9f07e3244435" alt=""><figcaption><p>Indirect Jumpscare</p></figcaption></figure>

Within the **Indirect Jumpscare** type, you have additional option to enable **Look At Jumpscare**. This will rotate the player's view to **Look At Target**. You have the option to lock the player, which will prevent the player from moving during the jumpscare.&#x20;

If you enable the **End Jumpscare With Event** option, the jumpscare will only be ended when you call the **Jumpscare Trigger ->TriggerJumpscareEnded()** method.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FI7rT1HxmDLVcsgVRv1Yt%2FScreenshot_7.png?alt=media&#x26;token=3f20f408-0710-4ff2-ab46-65246c0eed8b" alt=""><figcaption></figcaption></figure>

### Audio Jumpscare

{% hint style="info" %}
The third type is **Audio Jumpscares**, which relies on the sudden blast of a loud noise to create a sense of panic and fear in the player.
{% endhint %}

### Look At Jumpscare

{% hint style="info" %}
Lastly, the kit offers a unique kind of jumpscare that combines the "Look At" feature with any of the previous types of jumpscares. The characteristic feature of this type of jumpscare is that it is activated only when the player's view is directed to a specific object in the game.
{% endhint %}

In the **Jumpscare Trigger** component, set the **Trigger Type** to **Event**. Then create a look at target object, add a **Look At Trigger** component, and assign the **Jumpscare Trigger -> TriggerJumpscare()** method to the **On Look At** event.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FiHHcHXTr8ZzWb4dVZX9S%2FScreenshot_5.png?alt=media&#x26;token=f024b47f-d49e-4f00-a9fc-b5118ab5173b" alt=""><figcaption></figcaption></figure>

### Jumpscare Effects

{% hint style="info" %}
When the jumpscare occurs, you can enable the **Wobble** and **Fear** effect. The **Wobble** effect uses **Cinemachine** to shake the camera. The **Fear** effect is a bit more complex, as it uses a shader blit method to display Amnesia: Rebirth like fear tentacles at the edges of the screen.
{% endhint %}

To activate the effects, you just need to enable the toggle located beside the titles **Influence Wobble** or **Influence Fear**.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FVGOVPkgOGK7CM5LJAfSC%2FScreenshot_5.png?alt=media&#x26;token=911e15ac-c1cd-4ed7-b13e-1d17e371f3cf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2Fb478oxcXfzu41GPsCxF8%2Ftent.gif?alt=media&#x26;token=49c503ea-e34b-46d1-ad4f-295e70d76ac5" alt=""><figcaption><p>Fear Tentacles Effect</p></figcaption></figure>
