> For the complete documentation index, see [llms.txt](https://cmonkeys.gitbook.io/cinput-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmonkeys.gitbook.io/cinput-reference-manual/script-reference/methods/setaxisgravity.md).

# SetAxisGravity

*void* **SetAxisGravity**(*string* **axisName**, *float* **gravity**)\
*void* **SetAxisGravity**(*int* **axisHash**, *float* **gravity**)

## Parameters

**axisName**: The name of the axis you want to change the gravity value for.\
**axisHash**: The hashcode of the name of the axis you want to change the gravity value for.\
**gravity**: The value to assign as the gravity.

## Description

Sets the gravity for the axis. This will override cInput's global [`gravity`](/cinput-reference-manual/script-reference/variables-and-properties/gravity.md) value.

This value can also be set during the initial axis creation using [`SetAxis()`](/cinput-reference-manual/script-reference/methods/setaxis.md).

## Example
