# API Reference (v1.1)

### API Reference (v1.1)

#### Core Types

**`EGTGravityMode`**

* `FixedVector`
* `TowardPoint`
* `RepelOutward`

**`FGravitySettings`**

* `Mode`
* `FixedDirection` *(FixedVector only)*
* `GravityPoint` *(TowardPoint / RepelOutward)*
* `Strength`
* `bInverseSquareFalloff`
* `MinDistance`

***

#### Zone Actors

**`AGravityZoneBase`**

Key properties:

* `ZoneShape` (Box/Sphere shape component)
* `Settings` *(Replicated)*
* `Priority` *(Replicated)*
* Tag filter:
  * `bUseActorTagFilter` *(Replicated)*
  * `AllowedActorTags` *(Replicated)*
* Class filter:
  * `bUseActorClassFilter` *(Replicated)*
  * `AllowedActorClasses` *(Replicated)*
* `ZoneGuid` *(Replicated, stable tie-break)*

Key functions:

* `CanAffectActor(Actor)` – checks Tag/Class filters
* `IsPointInside(WorldPos)` – shape containment test
* `ComputeGravityAt(WorldPos)` – returns gravity acceleration vector
* Blueprint control:
  * `SetGravityStrength`
  * `SetGravityMode`
  * `SetGravityPoint`
  * `SetFixedDirection`

**`AGravityZoneBox`**

* `BoxExtent` *(ReplicatedUsing OnRep\_BoxExtent)*

**`AGravityZoneSphere`**

* `Radius` *(ReplicatedUsing OnRep\_Radius)*

***

#### Runtime Component

**`UCustomGravityComponent`**

Main settings:

* `bEnableCustomGravity`
* `bAutoOverrideWorldGravity`\
  Disables world gravity while inside a zone (character/physics handled safely for network).
* `GravityMultiplier`
* `bDrawDebug` (runtime arrow)

Advanced:

* `bAffectCharacters`
* `bAffectPhysicsBodies`
* `TerminalVelocity`
* `ExtraLinearDamping`

Zone events:

* `OnEnteredGravityZone(Zone)`
* `OnLeftGravityZone(Zone)`
* `OnGravityZoneSwitched(OldZone, NewZone)`

Query API:

* `IsInsideGravityZone()`
* `GetGravityDirection()`
* `GetGravityStrength()`
* `GetActiveGravityZone()`

Network helper:

* `NetworkPhysicsMode` (Off/Warn/Auto)
* `ValidateNetworkPhysicsSetup(OutMessage)`
* `ApplyServerAuthoritativePhysicsFix()`

***

#### Subsystem

**`UGravityWorldSubsystem`**

* `FindZoneAtLocation(WorldPos)`
* `FindZoneForLocation(WorldLocation)` (alias)
* `FindZoneForActorAtLocation(WorldPos, Actor)` (includes filter check)

***

#### Blueprint Function Library

**`UGravityBlueprintLibrary` (Blueprint nodes)**

Helpers:

* `GetCustomGravityComponent`
* `GetActorGravityDirection`
* `GetActorGravityUpVector`
* `GetActorGravityStrength`
* `ProjectVectorOnGravityPlane`
* `GetWalkDirectionOnGravityPlane`
* `GetGravityForActorSimple`
* `GetActorGravityAcceleration`
* `SetActorCustomGravityEnabled`
* `ToggleActorCustomGravityEnabled`

Runtime Spawn:

* `SpawnGravityZoneSphere`
* `SpawnGravityZoneBox`

Cursor utilities:

* `GetHitResultUnderCursorByChannelSimple`
* `GetCursorHitLocationByChannelSimple`


---

# 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://realms-roar.gitbook.io/gravity-transform-custom-gravity-system/getting-started/publish-your-docs/api-reference-v1.1.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.
