Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrain module · class

UOrreryTerrainGroundFollowComponent

Keeps the owning actor on the ground it was placed on.

Declaration

UCLASS(ClassGroup=(Orrery), meta=(BlueprintSpawnableComponent, DisplayName="Terrain Ground Follow"))
class UOrreryTerrainGroundFollowComponent : public UActorComponent
Header
#include "OrreryTerrainGroundFollowComponent.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrain"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Game thread.
Derives from
UActorComponent
Blueprint
“Terrain Ground Follow”, a Blueprint type

Description

At registration the component notes the actor's offset from the Pristine ground under it (from the Modified ground inside an authored feature's footprint). After a sculpt or a construction the actor's height is the Modified ground plus that offset, so an undo puts it back exactly. A replicated actor follows on the authority only (its movement replicates and a client's follow would fight it); a non-replicated actor follows everywhere.

Tier 3. The tile index and the work live in UOrreryTerrainFollowSubsystem; this component binds nothing itself. The actor is taken to stand still: call Reregister after moving it.

Note.

Game thread.

Functions

Properties

NameTypeDefaultMeaning
ModeBlueprintReadWriteEOrreryGroundFollowModeEOrreryGroundFollowMode::Follow

What the actor does when the ground changes under it.

bAlignToNormalBlueprintReadWriteboolfalse

Turn the actor by the rotation that takes the Pristine ground normal to the Modified one.

AlignMaxAngleBlueprintReadWritefloat90.f

The largest turn bAlignToNormal makes, degrees.

MaxSlopeBlueprintReadWritefloat90.f

The actor is cleared on ground steeper than this, degrees; 90 or more is no limit.

OnGroundMovedBlueprintAssignableFOnOrreryGroundMoved—

Called after the actor's height changed or it was cleared or restored.

Blueprint