Mover Component: Difference between revisions
(Added component settings table) |
mNo edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[File:MoverComponentInInspector.png|thumb|600px|right|A mover component set to move an object upwards at 1 unit per second.]] | |||
The mover component is a [[:Category:Gameplay Components|gameplay component]] that applies motion to an object constantly over time. | The mover component is a [[:Category:Gameplay Components|gameplay component]] that applies motion to an object constantly over time. | ||
'''All directions and rotations are in local object space, not world space.''' | '''All directions and rotations are in local object space, not world space.''' This means if the mover component is set to move an object up, but it has been rotated so that its up points in a new direction, then it will move in that direction, and not necessarily towards the sky. | ||
== Component Settings == | == Component Settings == | ||
Line 16: | Line 17: | ||
| '''Rotation Axis Type''' || Axis around which to rotate the object. | | '''Rotation Axis Type''' || Axis around which to rotate the object. | ||
|- | |- | ||
| style="padding-left: 2em;" | '''Rotation Axis'''<br/>''Only used if Rotation Axis Type is "Custom"'' || An | | style="padding-left: 2em;" | '''Rotation Axis'''<br/>''Only used if Rotation Axis Type is "Custom"'' || An x,y,z direction vector defining an axis to rotate around. | ||
|- | |- | ||
| '''Rotation Speed''' || The speed of rotation in degrees/s. | | '''Rotation Speed''' || The speed of rotation in degrees/s. | ||
Line 22: | Line 23: | ||
== 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 [[Action]]s 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]] |
Latest revision as of 23:59, 15 December 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. This means if the mover component is set to move an object up, but it has been rotated so that its up points in a new direction, then it will move in that direction, and not necessarily towards the sky.
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 x,y,z 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.