PlanetX Docsv1.0.1
Language: ENLast audited: 2026-08-23
Public API ReferenceSource verified

Coordinate and Movement Component API

Download this pageMarkdown

#UPlanetXCoordinateComponent

Header: PlanetX/Components/PlanetXCoordinateComponent.h

The Coordinate Component stores a canonical PlanetX pose and resolves the Planet, Binding, Section, and coordinate frame used by its owner. Configure a reference, make sure the Planet Actor is registered, and call RefreshRuntimeContext after relevant streaming or registration changes.

#Stable coordinate state and policy

FunctionsContract
RefreshRuntimeContextRe-resolves the runtime context; returns false when no valid context can be built.
SetPlanetXTransform, GetPlanetXTransformWrites or reads the canonical pose. The setter's bApplyToOwner controls immediate application.
SetCoordinateFrameReferenceReplaces the coordinate-frame reference and reports whether it resolves.
SetAutomaticSameWorldEntryEnabled, SetAutomaticSameWorldReturnEnabled, SetSameWorldReturnPosePolicyUpdates Spatial Entry behavior.
GetSpatialEntryPolicy, IsAutomaticSpatialEntryParticipantReads the effective Spatial Entry configuration.

The editor-callable helpers RefreshCoordinateSnapshot, PullFromWorld, PushToWorld, CaptureOwnerTransformToPlanetX, and ApplyPlanetXTransformToOwner synchronize the stored pose and the owner transform explicitly.

#Stable surface frame and vectors

FunctionsContract
GetCurrentSurfaceFrameWrites the current surface frame.
GetPlanetUpVectorWorld, GetPlanetDownVectorWorldWrites planet-relative unit directions.
GetSurfaceEastVectorWorld, GetSurfaceNorthVectorWorldWrites tangent directions for the resolved surface frame.
ProjectVectorToSurfaceTangentProjects a World vector onto the current tangent plane.
ConvertSurfaceVectorToWorldConverts East/North/Up input to World space, with optional tangent projection.
ConvertPlanetLocalVectorToWorld, ConvertSectionLocalVectorToWorldConverts a vector from the named local space.
ConvertCoordinateVectorToWorld, ConvertWorldVectorToCoordinateConverts using EPlanetXMovementVectorSpace.
BuildPlanetSurfaceWorldLocationBuilds a World location at TargetAltitudeCm.
BuildSurfaceAlignedRotationBuilds a rotation from FPlanetXSurfaceAlignmentSettings.

All functions in this table return bool. Do not use their output after false.

#Advanced reads and spatial loading

RefreshReferenceDetails, GetResolvedPlanetComponent, GetCachedRuntimeContext, and GetRepresentationDomain expose the resolved reference and context. GetActorSpatialLoadingPolicy, ShouldForceOwnerAlwaysLoaded, and ApplySpatialLoadingPolicyToOwner implement the current spatial-loading policy. Data Layers and Streaming Sources remain project-owned.

#UPlanetXMovementComponent

Header: PlanetX/Components/PlanetXMovementComponent.h

The owner requires a Coordinate Component and a committed runtime context.

Stable functionContract
AddPlanetXInputVectorAdds input in a selected vector space. Defaults to SurfaceFrame with tangent projection enabled.
SetPlanetXVelocitySets velocity in the selected vector space; the default is World.
GetPlanetXVelocityConverts current velocity to the requested vector space.
AddPlanetXForceAdds force; the default space is World, and bAccelerationChange defaults to false.
AddPlanetXImpulseAdds impulse; the default space is World, and bVelocityChange defaults to false.
SnapToPlanetSurfaceUses FPlanetXSurfaceSnapSettings to move to the resolved surface.
AlignUpToPlanetSurfaceUses FPlanetXSurfaceAlignmentSettings to align the owner.
ValidateMovementConfigurationWrites an error message when configuration is invalid.

Every stable function returns bool. GetMovementRuntimeState and GetCommittedRuntimeContext are the approved advanced state reads. When another Movement Component or a physics body owns velocity across a representation change, use Movement Handoff.