MovementComponent
Alex Crimi edited this page Mar 16, 2021
·
2 revisions
MovementComponent
defines an entity's ability to move on its own without external force. In practice, it provides a layer of abstraction to easily move an entity in a given direction in conjuction with the PhysicsComponent.
When used inside the components
block, the initial state of the component can be configured with the following parameters:
Key | Type | Description |
---|---|---|
baseMovementForce | float | The default force, that will be applied to move the entity. The force is expressed relative to gl units (mass * glUnits/seconds^2). Defaults to 500 . |
maxSpeed | float | The absolute maximum speed the entity should move itself. Once reached, no more force will be applied by the movement sytem. |
Example:
"MovementComponent": {
"maxSpeed": 100,
"baseMovementForce": 30000
}
The following properties are readable by property accessors (eg render state and persistence definitions):
Key | Type | Description |
---|---|---|
isMoving | boolean | Whether or not a movement force was applied as a result of the component on the last physics update. |
Overview
Components
Events
Update Scope
Filtering
Persistence
Variables
Value Resolution
Component Reference
- AgeComponent
- AIChargeComponent
- AIPatrolComponent
- CarryComponent
- ChargeComponent
- ChildLinkedComponent
- CollisionComponent
- ContainableComponent
- ContainerComponent
- CorneringComponent
- DeathComponent
- DestroyOnImpactComponent
- GrabComponent
- HealthComponent
- HitBoxComponent
- HurtBoxComponent
- InputComponent
- InteractableComponent
- InteractionComponent
- InvisibilityComponent
- InvulnerabilityComponent
- ItemActionComponent
- LiftableComponent
- LiftComponent
- MovementComponent
- OpenableComponent
- PhysicsComponent
- PullableComponent
- PullComponent
- PushableComponent
- PushComponent
- RenderComponent
- SafeRespawnComponent
- SelfDestructComponent
- SightComponent
- SpatialComponent
- SpawnComponent
- StatefulComponent
- StickyHitComponent
- StunComponent
- SurfaceComponent
- TerrainAwareComponent
- TerrainComponent
- ThrowComponent
- ThrustComponent
- TransformComponent
- TriggerComponent
- WeightTriggerComponent
- ZComponent
- AutoTetherComponent*
- DialogComponent*
- EquipmentComponent*
- FallComponent*
- ItemContainerComponent*
- LavaSinkComponent*
- LedgeHopComponent*
- RollComponent*
- SinkComponent*
- ShadeFormComponent*
- SwimComponent*
- TerrainDamageComponent*
- TetherableComponent*
- TetherComponent*
- TetherPullComponent*
- ThermalComponent*
Action Reference
- ActivateComponentAction
- AddComponentAction
- AttachComponentAction
- ChildAction
- ComponentAction
- DeactivateComponentAction
- DestroyChildAction
- DestroyEntityAction
- DetachChildAction
- DetachComponentAction
- EventAction
- RemoveComponentAction
- RequestRespawnAction
- ResetComponentAction
- SpawnAction
- StopSoundAction
- ToggleStateAction
- TriggerSoundAction
- StopMovementAction*