# Sway Layer

## Basics

This layer applies procedural aiming and movement sway in runtime.

<figure><img src="/files/FQ3XfI1KCqWxt9V3hH65" alt="" width="327"><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Methods" %}
{% code overflow="wrap" %}

```csharp
public void SetFreeAimEnable(bool enable)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Settings

You can find settings for this layer in your Weapon Anim Asset:

<figure><img src="/files/F7R36SaFPxil6wzTxSnW" alt="" width="131"><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Spring Data" %}
Used for the aiming weapon sway. Let's break down every property:

* Rot/Loc - spring settings for each rotation and translation axis.
  * Stiffness - how much should this oscillate around the target.
  * Damping - how fast should it go to zero.
  * Speed - interpolation speed.
  * Mass - mass of the spring.
  * Max Value - clamp value for this spring.
* Scale - multipliers for each axis.
  {% endtab %}

{% tab title="Free Aim Data" %}
Used for free or dead-zone aiming:

* Scalar - scales the value.
* Max Value - maximum allowed dead-zone rotation.
* Speed - interpolation speed.
  {% endtab %}

{% tab title="Move Sway Data" %}
This setting controls the movement weapon sway:

* Max Move Loc/Rot Sway - defines maximum allowed movement sway.
* Move Loc/Rot Sway - similar to spring data.
* Loc/Rot Speed - interpolation speed.
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kinemation.gitbook.io/fps-animation-framework/fundamentals/animation-layers/sway-layer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
