Navigation
API > API/Plugins > API/Plugins/GeoReferencing
This pawn can be used to easily move around the globe while maintaining a sensible orientation. As the pawn moves across the horizon, it automatically changes its own up direction such that the world always looks right-side up.
| Name | ARoundPlanetPawn |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeoReferencing/Source/GeoReferencing/Public/RoundPlanetPawn.h |
| Include Path | #include "RoundPlanetPawn.h" |
Syntax
UCLASS ()
class ARoundPlanetPawn : public ADefaultPawn
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → APawn → ADefaultPawn → ARoundPlanetPawn
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ARoundPlanetPawn() |
RoundPlanetPawn.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Altitude | float | The distance between the geographic ellipsoid surface and the pawn | RoundPlanetPawn.h |
|
| AltitudeProfileCurve | TObjectPtr< UCurveFloat > | This curve dictates what percentage of the max altitude the pawn should take at a given time on the curve. | RoundPlanetPawn.h |
|
| BaseSpeedKmh | float | The Reference maximum speed for the pawn, before being altered by any Scalar modifier or by altitude curve ActualMaxSpeed = BaseSpeedKmh * SpeedScalar * AltitudeSpeedModifierCurve(Altitude) | RoundPlanetPawn.h |
|
| FlyDuration | float | Fly to Location duration (in seconds) | RoundPlanetPawn.h |
|
| GranularityDegrees | float | The granularity in degrees with which keypoints should be generated for the Fly to Location interpolation. | RoundPlanetPawn.h |
|
| HAT | float | Height Above Terrain. The distance between the ground and the pawn | RoundPlanetPawn.h |
|
| MaximumAltitudeCurve | TObjectPtr< UCurveFloat > | This curve is used to pick up a reference the maximum altitude when flying to a location. | RoundPlanetPawn.h |
|
| MaximumAltitudeValue | float | In case MaximumAltitudeCurve is not defined, the AltitudeProfileCurve will use this Maximum altitude value for the flight, whatever the travel distance. | RoundPlanetPawn.h |
|
| MaximumStepCount | int32 | Make sure we don't get crazy in case of large flights with small granularity | RoundPlanetPawn.h |
|
| MinimumStepCount | int32 | The minimum linear steps for the FlyTolocation motion. | RoundPlanetPawn.h |
|
| OrbitalMotion | bool | If True, the motion Forward/Right motion of the pawn are relative to Planet tangent, meaning the altitude will approximately be kept, whatever the pawn camera orientation | RoundPlanetPawn.h |
|
| ProgressCurve | TObjectPtr< UCurveFloat > | This curve is used to ease in an out the Fly to Location speed. | RoundPlanetPawn.h |
|
| SpeedByHATModifierCurve | TObjectPtr< UCurveFloat > | When being very high and moving around the planet, we have to dynamically increase the speed based on Height above terrain to accelerate movement This curve adds a multiplying factor to the maximum speed depending on HAT. | RoundPlanetPawn.h |
|
| SpeedScalar | float | Scalar modifier for the base speed ActualMaxSpeed = BaseSpeedKmh * SpeedScalar * AltitudeSpeedModifierCurve(Altitude) | RoundPlanetPawn.h |
|
| SpeedScalarIncrement | float | Multiplier/Divider for increasing/decreasing the speed scalar | RoundPlanetPawn.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCanInterruptFlight | bool | RoundPlanetPawn.h | ||
| bIsFlyingToLocation | bool | Variables for FlyToLocation. | RoundPlanetPawn.h | |
| bIsHATInvalid | bool | RoundPlanetPawn.h | ||
| CacheUpdateThresholdSq | float | RoundPlanetPawn.h | ||
| CurrentFlyTime | float | RoundPlanetPawn.h | ||
| East | FVector | RoundPlanetPawn.h | ||
| FlyToLocationDestinationRotation | FRotator | RoundPlanetPawn.h | ||
| FlyToLocationKeypoints | TArray< FVector > | RoundPlanetPawn.h | ||
| FlyToLocationOriginRotation | FRotator | RoundPlanetPawn.h | ||
| LastCacheLocation | FVector | Variables for Motion Object caches. | RoundPlanetPawn.h | |
| North | FVector | RoundPlanetPawn.h | ||
| TangentTransform | FTransform | RoundPlanetPawn.h | ||
| Up | FVector | RoundPlanetPawn.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DecreaseSpeedScalar() |
Decrease the Speed Scalar - MouseWheel Down equivalent | RoundPlanetPawn.h |
|
void FlyToLocationECEF
(
const FVector& ECEFDestination, |
Begin a smooth camera flight to the given ECEF destination such that the camera ends at the specified yaw and pitch. | RoundPlanetPawn.h |
|
void FlyToLocationGeographic
(
const FGeographicCoordinates& GeographicDestination, |
Begin a smooth camera flight to the given Latitude/Longitude destination such that the camera ends at the specified yaw and pitch. | RoundPlanetPawn.h |
|
void FlyToLocationLatitudeLongitudeAltitude
(
const double& InLatitude, |
Begin a smooth camera flight to the given Latitude/Longitude destination such that the camera ends at the specified yaw and pitch. | RoundPlanetPawn.h |
|
void IncreaseSpeedScalar() |
Increase the Speed Scalar - MouseWheel Up equivalent | RoundPlanetPawn.h |
|
void InterruptFlyToLocation() |
Stop the current Fly To Location motion | RoundPlanetPawn.h |
|
void ResetSpeedScalar() |
Reset the Speed Scalar to its default value - Middle-mouse button click equivalent | RoundPlanetPawn.h |
|
Overridden from ADefaultPawn
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void MoveForward
(
float Val |
Input callback to move forward in local space (or backward if Val is negative). | RoundPlanetPawn.h | |
virtual void MoveRight
(
float Val |
Input callback to strafe right in local space (or left if Val is negative). | RoundPlanetPawn.h | |
virtual void MoveUp_World
(
float Val |
Input callback to move up in world space (or down if Val is negative). | RoundPlanetPawn.h |
Overridden from APawn
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FRotator GetBaseAimRotation() |
Don't return the controller rotation but a transformed rotation to consider planet roundness. | RoundPlanetPawn.h | |
virtual FRotator GetViewRotation() |
Don't return the controller rotation but a transformed rotation to consider planet roundness. | RoundPlanetPawn.h | |
virtual void SetupPlayerInputComponent
(
UInputComponent* InInputComponent |
Adds to the default pawn the Mouse Wheel inputs to tune the speed scalar | RoundPlanetPawn.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
RoundPlanetPawn.h | ||
virtual void OnConstruction
(
const FTransform& Transform |
RoundPlanetPawn.h | ||
virtual void Tick
(
float DeltaSeconds |
RoundPlanetPawn.h |