Orbdale Terrain · OrbdaleTerrain module · class
UOrbdaleTerrainGroundFollowComponent
Keeps the owning actor on the ground it was placed on.
Declaration
UCLASS(ClassGroup=(Orbdale), meta=(, ="Terrain Ground Follow"))
class UOrbdaleTerrainGroundFollowComponent : public UActorComponent- Header
#include "OrbdaleTerrainGroundFollowComponent.h"- Module
PublicDependencyModuleNames.Add("OrbdaleTerrain");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 UOrbdaleTerrainFollowSubsystem; this component binds nothing itself. The actor is taken to stand still: call Reregister after moving it.
Game thread.
Functions
- UOrbdaleTerrainGroundFollowComponent
- 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 | EOrbdale | EOrbdale | 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 MovedOrbdale › Terrain › Follow
- Is ClearedOrbdale › Terrain › Follow
- ReregisterOrbdale › Terrain › Follow