Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
UCesiumOriginShiftComponent Class Reference

Automatically shifts the origin of the Unreal world coordinate system as the object to which this component is attached moves. More...

#include <CesiumOriginShiftComponent.h>

Inheritance diagram for UCesiumOriginShiftComponent:
UCesiumGlobeAnchoredActorComponent

Public Member Functions

ECesiumOriginShiftMode GetMode () const
 Gets a value indicating how to shift the origin as the Actor to which this component is attached moves.
 
void SetMode (ECesiumOriginShiftMode NewMode)
 Sets a value indicating how to shift the origin as the Actor to which this component is attached moves.
 
double GetDistance () const
 Gets the maximum distance between the origin of the Unreal coordinate system and the Actor to which this component is attached.
 
void SetDistance (double NewDistance)
 Sets the maximum distance between the origin of the Unreal coordinate system and the Actor to which this component is attached.
 
 UCesiumOriginShiftComponent ()
 
- Public Member Functions inherited from UCesiumGlobeAnchoredActorComponent
UCesiumGlobeAnchorComponentGetGlobeAnchor ()
 

Protected Member Functions

virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 
- Protected Member Functions inherited from UCesiumGlobeAnchoredActorComponent
virtual void OnRegister () override
 
virtual void BeginPlay () override
 

Detailed Description

Automatically shifts the origin of the Unreal world coordinate system as the object to which this component is attached moves.

This improves rendering precision by keeping coordinate values small, and can also help world building by keeping the globe's local up direction aligned with the +Z axis.

This component is typically attached to a camera or Pawn. By default, it only shifts the origin when entering a new sub-level (a Level Instance Actor with a CesiumSubLevelComponent attached to it). By changing the Mode and Distance properties, it can also shift the origin continually when in between sub-levels (or when not using sub-levels at all).

It is essential to add a CesiumGlobeAnchorComponent to all other non-globe aware objects in the level; otherwise, they will appear to move when the origin is shifted. It is not necessary to anchor objects that are in sub-levels, because the origin remains constant for the entire time that a sub-level is active.

Definition at line 64 of file CesiumOriginShiftComponent.h.

Constructor & Destructor Documentation

◆ UCesiumOriginShiftComponent()

UCesiumOriginShiftComponent::UCesiumOriginShiftComponent ( )

Member Function Documentation

◆ GetDistance()

double UCesiumOriginShiftComponent::GetDistance ( ) const

Gets the maximum distance between the origin of the Unreal coordinate system and the Actor to which this component is attached.

When this distance is exceeded, the origin is shifted to bring it close to the Actor. This property is ignored if the Mode property is set to "Disabled" or "Switch Sub Levels Only".

When the value of this property is 0.0, the origin is shifted continuously.

◆ GetMode()

ECesiumOriginShiftMode UCesiumOriginShiftComponent::GetMode ( ) const

Gets a value indicating how to shift the origin as the Actor to which this component is attached moves.

◆ SetDistance()

void UCesiumOriginShiftComponent::SetDistance ( double NewDistance)

Sets the maximum distance between the origin of the Unreal coordinate system and the Actor to which this component is attached.

When this distance is exceeded, the origin is shifted to bring it close to the Actor. This property is ignored if the Mode property is set to "Disabled" or "Switch Sub Levels Only".

When the value of this property is 0.0, the origin is shifted continuously.

◆ SetMode()

void UCesiumOriginShiftComponent::SetMode ( ECesiumOriginShiftMode NewMode)

Sets a value indicating how to shift the origin as the Actor to which this component is attached moves.

◆ TickComponent()

virtual void UCesiumOriginShiftComponent::TickComponent ( float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction * ThisTickFunction )
overrideprotectedvirtual

The documentation for this class was generated from the following file: