# Changelog

***

## Replicated Gravity Changelog (v2.7.0 → v2.7.1)

#### GravityMovementComponent

* Renamed BP\_OnFallingStateChanged to OnFallingStateChanged.
* Renamed BP\_OnEffectiveGravityDirectionChanged to OnEffectiveGravityDirectionChanged.

#### Bug Fixes / Improvements

* Added OnFallingStateChanged event directly to the GravityMovementComponent for easier Blueprint integration.
* Added OnEffectiveGravityDirectionChanged event directly to the GravityMovementComponent for easier Blueprint integration.
* Improved Blueprint workflow for implementing cosmetic gravity, camera, animation, audio, and VFX logic.

***

## Replicated Gravity Changelog (v2.6.0 → v2.7.0)

#### GravityField

* **Physics Gravity Trigger Volume Support**: Gravity Fields can now apply physics gravity through overlap trigger behavior, allowing physics-simulated actors to automatically enter and exit field-driven gravity.
* **Directional Physics Gravity Support**: Physics gravity now supports Directional gravity in addition to Planetary gravity, allowing physics-simulated objects to be pulled along a fixed world-space gravity direction.
* **Vehicle Dynamic Gravity Support**: Gravity Fields can now apply Dynamic gravity mode to vehicles, with vehicle-specific fallback settings separate from character Dynamic gravity.
* **Vehicle Dynamic Fallback Tuning**: Added vehicle fallback options for Dynamic vehicle gravity.\
  Configurable via `bUseVehicleDynamicDirectionalFallback`, `bUseVehicleDynamicPlanetaryFallback`, `VehicleDynamicFallbackDirection`, and `VehicleDynamicFallbackCenter`.
* **Standalone Gravity Field Debug Widget**: Added a dedicated debug widget for Gravity Fields to monitor physics gravity state, registered bodies, awake bodies, sleeping bodies, and overlap counts.

#### GravityMovementComponent

* **None Gravity Mode**: Added None gravity mode support for characters, allowing Gravity Fields to intentionally perform no character gravity mode change when needed.
* **Dynamic Gravity Center Fallback**: Added a center-based fallback option for character Dynamic gravity, allowing Dynamic mode to fall back toward a configured center if probing cannot resolve a valid surface direction.
* **Dynamic Fallback Safeguards**: Added safeguards so only one Dynamic Gravity fallback method can be active at a time.
* **Dynamic Probe Improvements**: Dynamic Gravity probes now ignore Gravity Field overlap meshes to prevent incorrect probe hits while inside overlap volumes or directional gravity fields.

#### GravityVehicleMovementComponent

* **Dynamic Gravity Support**: Vehicles now support Dynamic gravity using a dedicated surface trace to resolve the active gravity direction from the traced surface normal.
* **Dynamic Ground Hold**: Added Dynamic-specific ground hold tuning so vehicle Dynamic gravity can be adjusted independently from Planetary gravity via `VehicleDynamicGroundHoldSpeedCoefficient`, `VehicleDynamicFrontGroundHoldOffsetCm`, and `VehicleDynamicFrontGroundHoldForceScale`.
* **Dynamic Trace Settings**: Added vehicle Dynamic trace configuration for surface detection.\
  Configurable via `VehicleDynamicGravityTraceChannel`, `VehicleDynamicGravityTraceDistance`, and `VehicleDynamicGravityTraceStartOffset`.
* **Dynamic Fallbacks**: Added Directional and Planetary fallback support for vehicle Dynamic gravity when the surface trace misses, configurable via `bVehicleDynamicUseDirectionalFallback`, `bVehicleDynamicUsePlanetaryFallback`, `VehicleDynamicFallbackDirection`, and `VehicleDynamicFallbackCenter`.
* **Start Parked**: Added `bStartParked`, allowing spawned vehicles to begin in a parked state and remain settled until driving input releases them, includes `StartParkedReleaseInputTolerance`, `StartParkedGroundedSettleFrames`, `StartParkedSuspensionStableFrames`, `StartParkedMinParkedFramesBeforeSleep`, and `StartParkedSuspensionSettleTolerance`.
* **Wheel Sleep Stabilization**: Vehicle wheel rotation is cleared when the vehicle enters sleep, preventing wheels from continuing to spin visually after the vehicle has stopped.

#### **GravityReceiverComponent**

* **Physics Gravity Trigger Support**: Improved receiver registration and exit handling for physics actors affected by Gravity Field trigger volumes.

#### Bug Fixes / Improvements

* Character Dynamic Gravity probes now ignore overlap meshes to prevent incorrect probe hits when inside directional gravity fields.
* Added safeguards to ensure only one Dynamic Gravity fallback method can be active at a time.
* Directional fallback remains enabled by default for full backwards compatibility with existing projects.
* Fixed an issue where CVAR management for vehicles could be released prematurely when multiple vehicles were inside the same Gravity Field.

#### Compatibility

* **Backwards Compatible**: Existing Character, Physics, and Vehicle gravity setups remain compatible.
* **Opt-in Integration**: Vehicle gravity fields only affect vehicles when `bApplyVehicleGravity` is enabled.
* **Chaos Vehicles Required**: Vehicle gravity support requires `ChaosVehiclesPlugin`.
* **Iris Ready**: Character, physics, and vehicle systems remain compatible with Unreal Engine’s Iris Replication System.

***

## Replicated Gravity Changelog (v2.5.0 → v2.6.0)

#### GravityVehicleMovementComponent (New)

* **Networked Vehicle Gravity**: New movement component inheriting from `UChaosWheeledVehicleMovementComponent`, providing authority-driven gravity for Chaos vehicles with full `Directional`, `Planetary`, and `Zero Gravity` support.
* **Gravity-Aware Simulation**: Custom `FGravityWheeledVehicleSimulation` overrides core Chaos physics passes (`TickVehicle`, `UpdateState`, `UpdateSimulation`) to apply gravity forces, calculate suspension traces, and handle aerodynamics relative to the local gravity vector.
* **Ground Hold System**: Integrated inward acceleration logic to keep vehicles seated on curved surfaces (planets, loops) at high speeds.
  * Tunable via `GroundHoldDownforceCoefficient`, `FrontGroundHoldOffsetCm`, and `FrontGroundHoldForceScale`.
* **Dynamic Up-Alignment**: Torque-based alignment system to smoothly rotate the vehicle's up-axis toward the gravity vector.
  * Configurable via `GravityAlignmentStiffness`, `GravityAlignmentDamping`, `GravityAlignmentAngleToleranceDegrees`, and `MaxGravityAlignmentTorque`.
* **Gravity-Aware Sleep**: Custom sleep logic in `ProcessSleeping` allows vehicles to rest naturally on arbitrary gravity slopes.
  * Includes `GravityAwareSleepSpeedMultiplier`, `GravityAwareHandbrakeSleepSpeedMultiplier`, and `GravityAwareControlInputWakeTolerance` for fine-tuned stabilization.
* **Startup Overrides**: Configure initial gravity states via `bUseStartupGravityOverride`. Supports automatic rotation snapping on spawn to prevent physics explosions when spawning on non-Z-up surfaces.
* **Authority & Replication**:
  * `FGravityVehicleState` handles replicated gravity mode, direction, and magnitude.
  * Server-reliable `ServerSetGravityVehicleState` RPC ensures authoritative gravity transitions.
  * Iris-ready with `RegisterReplicationFragments` implementation for high-performance networking.

#### GravityVehicleController (New)

* **Integrated Input Management**: Built-in support for Enhanced Input mapping contexts, including specialized logic for **Steering Wheel** hardware and **Mobile Touch** controls.
* **Automated UI Spawning**: Handles the creation and management of vehicle-specific HUDs (`VehicleUIClass`) and mobile control overlays.
* **Smart Camera Configuration**: Automatically detects and configures camera spring arms on possessed pawns to ensure smooth tracking during gravity transitions.
* **Possession Logic**: Automated binding to pawn destruction and possession events to maintain UI and input state consistency.

#### GravityVehiclePawn (New)

* **Base Vehicle Class**: New abstract base class `AGravityVehiclePawn` (and specialized variants like `GravityOffroadCar` and `GravitySportsCar`) pre-configured for custom gravity.
* **Multi-Camera Setup**: Includes default front and rear camera components with `IGravityVehicleDisplayInterface` support for HUD updates.
* **Input Handling**: Pre-routed input actions for Steering, Throttle, Brake, Handbrake, and Camera Toggling, designed to work seamlessly with the `GravityVehicleController`.

#### GravityVehicleUI & Assets (New)

* **Vehicle Display Interface**: `IGravityVehicleDisplayInterface` for standardized communication between vehicle actors and UI widgets.
* **Base UI Widget**: `UGravityVehicleUI` provides Blueprint-ready hooks (`OnSpeedUpdate`, `OnGearUpdate`) with built-in MPH/KPH conversion logic.
* **Vehicle Wheel Bases**: `UGravityVehicleWheelFront` and `UGravityVehicleWheelRear` included as standardized starting points for custom gravity-compatible vehicle setups.

#### New Example Content

* **Example Vehicle Level**: `Example_Lvl_Vehicle` — A dedicated showcase level featuring various gravity zones (Planetary, Directional) designed specifically for vehicle testing.
* **Example Vehicles**:
  * `BP_GravitySportsCar_Pawn`: High-speed setup tuned for track performance and gravity transitions.
  * `BP_GravityOffroadCar_Pawn`: Rugged setup with high-travel suspension for navigating planetary terrain.
* **Example Vehicle Controller**: `BP_GravityVehicleController` — A fully commented Blueprint implementation demonstrating Enhanced Input integration and automated HUD management.
* **Example Vehicle UI**: `BP_GravityVehicleUI` — A functional HUD demonstrating real-time speed, gear, and gravity status readouts.
* **Supporting Assets**: Includes custom torque curves, physics materials, and input mapping contexts for a "plug-and-play" vehicle experience.

#### Compatibility

* **Backwards Compatible**: All existing Character and Physics gravity systems remain unchanged.
* **Opt-in Integration**: Vehicles use standard Unreal gravity unless custom gravity is explicitly activated.
* **Iris Ready**: All new vehicle components are fully compatible with Unreal Engine's Iris Replication System.

***

## **Replicated Gravity Changelog (v2.4.3 → v2.5.0)**

#### **GravityField**

***Planetary Physics Gravity***

* Added `bApplyPhysicsGravity` — opt-in, off by default. When enabled the field applies custom planetary gravity to overlapping physics objects via a Chaos pre-tick callback
* Added `PhysicsGravityMagnitude` — tunable gravity force magnitude applied to physics objects
* Added `PhysicsSleepVelocityThreshold` and `PhysicsSleepAccelerationThresholdSq` — tunable sleep detection thresholds for the custom sleep system
* Physics loop uses `ParallelFor` for high active object counts with `InvSqrt` normalization for maximum throughput
* Sleeping objects are skipped by the active-force pass, minimizing per-frame physics cost
* All physics thread communication uses lock-free `TQueue` channels between game thread and physics thread

#### **GravityReceiverComponent** *(New)*

* New component for actors that need full physics gravity support — handles multi-body registration, active field tracking, and sleep state authority
* Attach to physics actors that need receiver-managed gravity registration, sleep authority, or optional ragdoll replication
* `OnAddedToField` / `ActiveFields` — tracks multiple overlapping fields correctly, engine gravity only restored when the last field is exited
* `bEnableRagdollBodySnapshots` — opt-in replicated ragdoll position and velocity correction. When enabled the server captures per-bone transforms and velocities at a configurable interval and clients blend toward them with teleport threshold fallback
* `RagdollSnapshotInterval`, `RagdollTeleportDistanceThreshold`, `RagdollPositionBlendAlpha`, `RagdollVelocityBlendAlpha` — tunable snapshot replication settings
* Authoritative sleep state replication — server sleep decisions replicate to clients and are enforced, preventing client physics divergence
* Wake-on-hit detection with grace period and re-wake suppression to prevent oscillation

#### **GravityReplicationSubsystem** *(New)*

* New world subsystem tracking all registered physics bodies across all active gravity fields
* O(1) lookups via `FieldBodyToIndexMap` and `OwnerBodyToIndicesMap` — no linear scans on register, unregister, or sleep state update
* Incremental cache updates on register and unregister — full rebuild only on periodic cleanup
* Cached counts per field for registered, awake, sleeping, and skeletal body queries — all O(1)
* Deferred cleanup every 32 operations to amortize invalid entry removal

#### **No Change**

* All existing character gravity modes and default behavior unchanged from v2.4.3
* Fully backwards compatible — no migration required
* `bApplyPhysicsGravity` is off by default, existing projects are unaffected

***

## **Replicated Gravity Changelog (v2.4.2 → v2.4.3)**

#### **GravityMovementComponent**

***High-Precision Math***

* Added `bUseHighPrecisionMath` — replicated, opt-in, off by default. When enabled gravity direction calculations for Planetary and Dynamic modes are performed in double precision using `FVector3d`
* Addresses floating-point rounding errors and directional drift that occur at large world coordinates
* Calculations treat the character as a temporary local origin, ensuring maximum directional accuracy regardless of world position

#### **GravityField**

***High-Precision Math***

* Added `bBUseHighPrecisionMath` / `bEUseHighPrecisionMath` — replicated per-field opt-in bools with full Begin and End Overlap support, consistent with all other tunables

#### **No Change**

* All existing gravity modes and default behavior unchanged from v2.4.2
* Fully backwards compatible — no migration required
* `bUseHighPrecisionMath` is off by default, existing projects are unaffected

***

## **Replicated Gravity Changelog (v2.4.1 → v2.4.2)**

#### **GravityMovementComponent**

***Dynamic Gravity — Predictive Probes***

* Added `bUsePredictiveProbes` as a fully replicated opt-in bool — off by default, restoring v2.3.3 behavior as the default. The predictive surface forward probe system, wall hysteresis, ledge detection, and all associated rotation branches are now only active when this flag is enabled
* Added `bUsePredictiveProbes` to `GetLifetimeReplicatedProps`
* Fixed wall latched feet latch — when wall latched the system now uses the smoothed `ActorUp` instead of `RawActorUp`, resolving the pause that occurred when hitting a wall with enhanced smoothing active

***Flying Mode***

* Fixed snap when exiting external flying methods with `bApplyGravityRotationWhileFlying` disabled — `GravityDirCached` and `SmoothedDynamicTarget` are now continuously synced to the character's physical orientation while gravity rotation is suppressed, ensuring the smoother always starts from the correct direction on re-entry
* Fixed lean when using external flying methods with `bApplyGravityRotationWhileFlying` enabled — removed lerp smoothing from `UpdateCharacterStateBeforeMovement`, rotation now aligns directly to gravity each frame while flying eliminating the lean

#### **GravityField**

***Dynamic Gravity — Predictive Probes***

* Added `bBUsePredictiveProbes` and `bEUsePredictiveProbes` — replicated per-field opt-in bools for Begin and End Overlap with full B/E support consistent with all other Dynamic tunables
* Both properties initialized to false in constructor — off by default
* Both applied correctly in `ApplyBeginOverlapGravityDynamic` and `ApplyEndOverlapGravityDynamic`
* Both registered in `GetLifetimeReplicatedProps`
* Fixed `ELedgeProbeLength` missing from `GetLifetimeReplicatedProps`

#### **Example Levels**

* Combined walls and floor geometry in demo levels to eliminate ghost edges at seams
* Walking on the outside of the upper level no longer causes unintended gravity transitions

#### **No Change**

* All existing gravity modes and default behavior unchanged from v2.4.1
* Fully backwards compatible — no migration required

***

## **Replicated Gravity Changelog (v2.4.0 → v2.4.1)**

#### GravityField

* The following variables are now correctly registered in `GetLifetimeReplicatedProps`: `BeginOverlapGravityMode`, `EndOverlapGravityMode`, `BeginOverlapGravityRotationMode`, `EndOverlapGravityRotationMode`, `BDynamicSurfaceSmoothingSpeed`, `EDynamicSurfaceSmoothingSpeed`, `bBUseEnhancedSmoothing`, `bEUseEnhancedSmoothing`, `BDynamicEnhancedSmoothingSpeed`, `EDynamicEnhancedSmoothingSpeed`
* `ZeroGravityExitGravityScale` correctly initialized in constructor instead of header

***

## **Replicated Gravity Changelog (v2.3.3 → v2.4.0)**

#### **GravityMovementComponent**

***Zero Gravity***

* Added Zero Gravity as a full gravity mode with `EnterZeroGravity` and `ExitZeroGravity` Blueprint callable functions
* Fully replicated with local prediction on the owning client for responsive feel
* Added `bZeroGravityActive` and `bExternalFlyingActive` flags for clean integration with custom flying setups. When `bExternalFlyingActive` is true, zero gravity will not override the movement mode
* Added `ZeroGravityExitGravityScale` — controls GravityScale restoration on exit, exposed on both the component and the gravity field
* `ExitZeroGravity` is idempotent — safe to call unconditionally from any overlap without affecting characters not in zero gravity
* `bApplyGravityRotationWhileFlying` behaves correctly entering and exiting zero gravity — flying rotation pipeline fully preserved
* Added `ZeroGravity` enum value to `EEffectiveGravityMode` — existing enum values untouched

***Dynamic Gravity — Surface Forward Probe***

* Added Surface Forward Probe system to Dynamic mode. Two forward probes (low and high) sweep ahead of the character using velocity-derived direction with a hold buffer after stopping, classifying wall and ledge surfaces in real time and driving dedicated rotation branches automatically
* Added ledge drop probe that sweeps downward ahead of the character to detect surface edges
* Added full hysteresis system for both wall entry and exit — eliminates flicker and false positives on curved geometry and at ledge edges
* Added `WallProbeDistance`, `LedgeProbeDistance`, and `LedgeProbeLength` as fully replicated exposed tunables — dial in probe ranges for your specific geometry

***Dynamic Gravity — Rotation Smoothing***

* Added fully independent tunable speeds for every Dynamic transition type. Wall, ledge, surface, enhanced smoothing, and head-probe transition rotation each have their own dedicated replicated property
  * `DynamicHeadTransitionRotationSpeed` — quat step speed for head-probe transitions (replaces the previously shared `DynamicRotationSpeed`)
  * `DynamicWallLerpSpeed` — lerp speed for wall transitions
  * `DynamicLedgeLerpSpeed` — lerp speed for ledge transitions
  * `DynamicSurfaceLerpSpeed` — lerp speed for surface following
  * `DynamicEnhancedSurfaceSmoothingSpeed` — first-stage lerp speed for enhanced smoothing
* Added `bUseEnhancedSmoothing` — enables two-stage surface smoothing that absorbs polygon face noise on curved surfaces. Uses `SmoothedDynamicTarget` as an intermediate lerp stage before applying to `GravityDirCached`

***Dynamic Gravity — Feet Latch***

* Improved feet latch precision. The latch now passes the raw unsmoothed gravity direction (`RawGravityDir`) instead of the smoothed cached direction (`GravityDirCached`) to `HandleFeetLatch`. Prevents latch drift on curved and rotating surfaces where smoothing would otherwise cause the anchor to miss the true surface normal

#### ***Debug Widget***

* Debug widget correctly identifies and displays Zero Gravity as the active gravity mode

#### **GravityFields**

***Zero Gravity***

* Added `ApplyEnterZeroGravity` BlueprintNativeEvent to the gravity field for Blueprint overlap integration. Can be called from Begin or End Overlap to enter zero gravity
* `ExitZeroGravity` is called automatically inside every other Apply function — no explicit exit call needed when transitioning to another gravity mode
* Added `ZeroGravityExitGravityScale` to the gravity field for full control over gravity restoration on exit

***Dynamic Tunables***

* Updated `ApplyBeginOverlapGravityDynamic` and `ApplyEndOverlapGravityDynamic` to apply all new Dynamic tunables
* Added full Begin and End Overlap support for all new properties:
  * `BDynamicHeadTransitionRotationSpeed` / `EDynamicHeadTransitionRotationSpeed`
  * `BDynamicWallLerpSpeed` / `EDynamicWallLerpSpeed`
  * `BDynamicLedgeLerpSpeed` / `EDynamicLedgeLerpSpeed`
  * `BDynamicSurfaceSmoothingSpeed` / `EDynamicSurfaceSmoothingSpeed`
  * `BEnhancedSmoothingSpeed` / `EEnhancedSmoothingSpeed`
  * `bBUseEnhancedSmoothing` / `bEUseEnhancedSmoothing`
  * `BWallProbeDistance` / `EWallProbeDistance`
  * `BLedgeProbeDistance` / `ELedgeProbeDistance`
  * `BLedgeProbeLength` / `ELedgeProbeLength`
* `LatchDistance` now fully exposed on the gravity field for dynamic mode tuning with full Begin and End Overlap support

***No Change***

* Gravity vectors, centers, fallback directions
* Rotation mode behavior
* Replication setup and sanitization logic
* Mesh components, overlap radii, and BeginPlay behavior

***

## Replicated Gravity Changelog (v2.3.2 → v2.3.3)

#### **GravityMovementComponent**

* Refactored `SetGravityDynamic` into focused sub-functions: `HandleHeadProbe`, `HandleMovementProbes`, `HandleFeetLatch`, `HandleDynamicGoalDirSettle`, and `ResolveDynamicPriority`.
* Reworked the feet probe system. Replaced the adaptive dynamic half-height capsule sweep with a two-stage system: a sphere sweep anchor probe followed by a fixed low-profile capsule confirmation at the anchor point. More reliable surface detection across all surface types.
* Reworked the latch swivel system. Replaced velocity-based swivel with a local-space swivel for rotating bases. The last valid feet hit is now cached in local component space and reconstructed in world space each frame, allowing the latch to correctly track rotating surfaces.
* Added `LatchDistance` as an exposed tunable replicated property under Gravity|Dynamic, replacing the previously hardcoded large value. Controls how far from a surface the latch will remain attached.
* Fixed `SetDynamicGoalDir` silently failing to clear `DynamicGoalDir` when grounded due to a guard logic bug. Direct assignment is now used in `HandleDynamicGoalDirSettle` to bypass the guard correctly.
* Fixed the movable base settle path. The non-movable branch was waiting unnecessarily for settle frames before clearing. It now clears immediately.
* Fixed `GravityCenter` quantization type mismatch between its declaration (`FVector_NetQuantize100`) and setter (`FVector_NetQuantize10`). Declaration corrected to `FVector_NetQuantize10`.
* Fixed `SurfaceLerpSpeed` being bypassed in the Dynamic mode lerp path, which was hardcoded to 20.0. `SurfaceLerpSpeed` now correctly controls surface following speed as documented.
* Added `bApplyGravityRotationWhileFlying` support for Dynamic gravity mode, consistent with Directional and Planetary modes.
* Promoted `RotationTimer` from a local variable in `HandleHeadProbe` to a member variable. Rapid consecutive head hits could previously stack timers with no way to cancel them.
* Added controller validity checks to all server RPCs to prevent execution on unpossessed or invalid actors.
* Added `ClampMin="0.0"` meta specifier to `LatchDistance` and `FloorDetectionTolerance` to prevent invalid negative values in the details panel.

#### **Debug Widget**

* Added a new debug widget available in development builds. Toggle `bShowVisualDebugs` to display a real-time readout of gravity state, rotation mode, latch status, latch distance, and floor detection.
* In PIE with multiple clients each character instance shows its own data independently because the widget is created per locally controlled pawn.
* Zero overhead in shipping builds.

***

## Replicated Gravity Changelog (v2.3.1 → v2.3.2)

#### **GravityMovementComponent**

* **Fixed camera desyncing from character body** during `RotateCharacter` gravity transitions in first-person view.
* Added same-frame camera compensation by applying `FQuat::FindBetweenNormals` delta directly to the control rotation inside the Quat rotation paths of `RotateCharacter`.
* **Added `bCameraCompensatedThisFrame` flag** to prevent double-compensation when `RotateCharacter` already adjusts the camera in the same frame.

#### **GravityController**

* **Guarded existing gravity delta correction** in `UpdateRotation` with the `bCameraCompensatedThisFrame` flag.
* When `RotateCharacter` has already compensated the camera, `UpdateRotation` now skips its own gravity delta correction (including the 180° safe-axis fallback) for that frame.

#### **GravityFields**

* Replaced `RotatingMovementComponent` in `BP_Rotating_Example_GravityField` with `AddLocalRotation`.(Less jitter caused by tick desynchronization.)

***

## Replicated Gravity Changelog (v2.3.0 → v2.3.1)

#### **GravityFields**

* Corrected an invalid cast in the Gravity Field Blueprints. (Changed the "`BP_ThirdPersonCharacter`" blueprint cast to the correct "Character" cast.)
* Replaced manual `AddRelativeRotation` logic in `BP_Rotating_Example_GravityField` with a `RotatingMovementComponent` for proper rotation handling.

***

## Replicated Gravity Changelog (v2.2.1 → v2.3.0)

#### **GravityMovementComponent**

**Summary**

Fixed visual rotation issues on moving platforms and improved flying mode behavior with enhanced rotation control options.

**Bug Fixes**

**Moving Platform Visual Corrections (All Gravity Modes)**

* **Fixed**: Camera/view rotation desync on moving and rotating platforms
* **Added**: New `UpdateBasedRotation()` system for smooth yaw compensation
* **Impact**: Characters now maintain proper orientation relative to moving platforms
* **Safety**: Only affects visual rotation - does not change physics or collision behavior
* **Note**: Enable via `bApplyReplicatedRotationOnMovingBases` property (off by default for compatibility)

**Flying Mode Improvements**

* **Fixed**: Rotation behavior when exiting flying mode no longer snaps unexpectedly
* **Fixed**: Gravity rotation state properly syncs when transitioning between flying and walking
* **Added**: Optional gravity-aligned rotation during flight via `bApplyGravityRotationWhileFlying`
* **Note:** Dynamic gravity currently ignores `bApplyGravityRotationWhileFlying` until proper base alignment is implemented.
* **Impact**: Smoother movement mode transitions and more natural flight orientation

**Dynamic Mode Stability**

* **Fixed**: Premature gravity direction resets on movable platforms
* **Added**: 5-frame settle delay before clearing dynamic goals on moving bases
* **Impact**: More stable character orientation on elevators and moving platforms

**New Features**

**Configurable Rotation Constraints**

* **Added**: `GravityRotationMode` with three options:
  * **Default**: Free rotation (existing behavior)
  * **ForwardBack**: Rotation limited to right axis (pitch-like)
  * **LeftRight**: Rotation limited to forward axis (roll-like)
* **Use Case**: Constrain gravity transitions for specific gameplay mechanics
* **Access**: `SetGravityRotationMode()` Blueprint function

**Rotation Speed Limiting**

* **Added**: 90-degree maximum rotation per frame
* **Impact**: Prevents extreme rotation jumps during network lag or frame drops
* **Benefit**: More consistent visual experience across varying network conditions

**Configuration**

**New Properties**

* `bApplyReplicatedRotationOnMovingBases` - Enable visual rotation fixes for moving platforms (default: false)
* `bApplyGravityRotationWhileFlying` - Enable gravity-aligned flight rotation (default: false)
* `GravityRotationMode` - Set rotation constraint mode (default: Default)

**Recommended Settings**

For games with moving platforms:

```
bApplyReplicatedRotationOnMovingBases = true
```

For games with flying mechanics:

```
bApplyGravityRotationWhileFlying = true (if you want gravity-aligned flight)
```

**Technical Details**

**What Changed**

* Removed: AGravityController dependency (now works with standard APlayerController)
* Removed: Per-tick raycast rotation detection system (\~200 lines)
* Added: Movement-based rotation compensation system
* Added: Flying mode transition smoothing
* Added: Base component tracking for moving platforms

**Network Impact**

* Slightly increased: +4 replicated properties
* Trade-off: Better visual consistency for slight bandwidth increase

**Compatibility Notes**

* **Non-Breaking**: All new features are opt-in via configuration properties
* **Default Behavior**: Unchanged - existing projects work as before
* **Migration**: No code changes required unless enabling new features
* **Platform Support**: All gravity modes now support moving platforms equally

**Performance**

* **Improved**: Removed per-tick raycast overhead
* **Minimal Impact**: New features only active when enabled
* **Optimized**: More predictable frame times without raycast spikes

#### **GravityFields**

**API / Behavior**

* Added explicit gravity mode selection (replicated):
  * `BeginOverlapGravityMode`
  * `EndOverlapGravityMode`
* Added explicit rotation control selection (replicated):
  * `BeginOverlapGravityRotationMode`
  * `EndOverlapGravityRotationMode`
* All `Apply*Gravity*` BlueprintNativeEvent functions now **return `UGravityMovementComponent*`** (previously `void`).

**Gravity Mode / Rotation Control**

* Begin/End overlap logic now explicitly applies **rotation mode** alongside gravity changes:
  * `SetGravityRotationMode(BeginOverlapGravityRotationMode)`
  * `SetGravityRotationMode(EndOverlapGravityRotationMode)`
* Rotation mode is applied for **Directional, Planetary, and Dynamic** gravity transitions.
* Dynamic gravity transitions now respect the configured rotation mode instead of relying on defaults.
* Default values for gravity mode and rotation mode are initialized in the constructor.
* Duplicate rotating demo included.

**API / Flow Changes**

* All `Apply*Gravity*` implementations:
  * Always call `ResolveMovementComponent` first.
  * Perform authority checks inside the function body (no early returns).
  * Return the resolved `UGravityMovementComponent*`.

**Naming / Clarity**

* Renamed transient character reference:
  * `GravityCharacter` → `TPGravityCharacter`
* Updated function parameter names accordingly:
  * `NewGravityCharacter` → `NewTPGravityCharacter`

**Blueprint / Configuration**

* Gravity mode and rotation behavior are now **data-driven and replicated** per Begin/End overlap.

**No Change**

* Gravity vectors, centers, fallback directions.
* Tunable parameters (rotation speed, surface lerp speed, tolerances, timers).
* Replication setup and sanitization logic.
* Direction normalization and editor-only fixes.
* Mesh components, overlap radii, overlap handling, and `BeginPlay` behavior.

***


---

# 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://replicated-gravity.gitbook.io/replicated-gravity-docs/getting-started/changelog.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.
