Mover Component: Difference between revisions
(Added component settings table) |
(Added Example Usages) |
||
Line 22: | Line 22: | ||
== Example Usage == | == Example Usage == | ||
=== Simple rotating object === | |||
This component offers a simple way to make something rotate around an axis at a constant rate. For more advanced rotation, use a [[Simple Animator Component]]. | |||
=== Use with other components === | |||
This component is best used when combined with other components in unique ways. | |||
When making something move, to make it stop moving you can use [[Actions]] to destroy the object or disable this component. Otherwise it will continue moving for the duration of the minigame. | |||
You could combine a Mover with a [[Trigger Component|trigger]] to build a battle royale style boundary. Create four walls that slowly move towards the center of the scene. The walls can have [[Trigger Component|triggers]] attached to the inside that kills players who touch it, forcing players to move to the center of the scene. | |||
[[Category:Gameplay Components]] | [[Category:Gameplay Components]] | ||
[[Category:Components]] | [[Category:Components]] |
Revision as of 04:11, 26 October 2022
The mover component is a gameplay component that applies motion to an object constantly over time.
All directions and rotations are in local object space, not world space.
Component Settings
Property | Description |
---|---|
Direction Type | The direction of movement. |
Direction Only used if Direction Type is "Custom" |
An xyz direction vector to move along. |
Speed | The speed of movement in units/s. |
Rotation Axis Type | Axis around which to rotate the object. |
Rotation Axis Only used if Rotation Axis Type is "Custom" |
An xyz direction vector defining an axis to rotate around. |
Rotation Speed | The speed of rotation in degrees/s. |
Example Usage
Simple rotating object
This component offers a simple way to make something rotate around an axis at a constant rate. For more advanced rotation, use a Simple Animator Component.
Use with other components
This component is best used when combined with other components in unique ways. When making something move, to make it stop moving you can use Actions to destroy the object or disable this component. Otherwise it will continue moving for the duration of the minigame.
You could combine a Mover with a trigger to build a battle royale style boundary. Create four walls that slowly move towards the center of the scene. The walls can have triggers attached to the inside that kills players who touch it, forcing players to move to the center of the scene.