Orrery Terrain · OrreryTerrain module · class
UOrreryTerrainGroundFollowComponent
Keeps the owning actor on the ground it was placed on.
Declaration
UCLASS(ClassGroup=(Orrery), meta=(, ="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.
Game thread.
Functions
- UOrreryTerrainGroundFollowComponent
- IsClearedBlueprint
Whether the ground has cleared the actor now (hidden, or about to be destroyed).
- ReregisterBlueprint
Register again at the actor's current place and height (after moving it on purpose).
- BeginPlay
- EndPlay
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
ModeBlueprintReadWrite | EOrrery | EOrrery | What the actor does when the ground changes under it. |
bBlueprintReadWrite | bool | false | Turn the actor by the rotation that takes the Pristine ground normal to the Modified one. |
AlignBlueprintReadWrite | float | 90.f | The largest turn bAlignToNormal makes, degrees. |
MaxBlueprintReadWrite | float | 90.f | The actor is cleared on ground steeper than this, degrees; 90 or more is no limit. |
OnBlueprintAssignable | FOn | — | Called after the actor's height changed or it was cleared or restored. |
Blueprint
- Bind Event to On Ground MovedOrrery › Terrain › Follow
- Is ClearedOrrery › Terrain › Follow
- ReregisterOrrery › Terrain › Follow