Add Component
> Massive Loop
> Station
Station Component
MLStation component provides a mean to attach players to another object. The most common use for this is creating a seat. When attached to the station, the player loses its movement abilities, but still can move their head and hands. Using the Lua, the player controller inputs can be accessed and used to drive vehicles.
Requires
- Collider. (not necessary if the attaching player will going to be done using LUA API).
- MLSynchronizer (Used to synchronize the station state, therefore prevent one station being seated by multiple player)
Parameters
Name | Description |
---|---|
Use Complex Posture | Enable station to enforce a specified posture to the player avatar when used. |
Seat | The Seat Reference game object. This is the game object which player will attached to. Use an empty game object to fine tune the seating position and rotation. If not provided the main game object (the object which station component is attached) will be used. |
Seat Length | (For Posture Only) The length of the seat surface. This defines the edges of your seat and avatar placed on this surface based on their length. |
Left Foot | (For Posture Only) The Left Foot reference game object. This game object defines where the left foot ideally should go. |
Right Foot | (For Posture Only) The Right Foot reference game object. This game object defines where the right foot ideally should go. |
Head Position | (For Posture Only) (Only in desktop mode) This value can be used to add a forward or backward leaning to player seating in the station. The value specifies the head position relative to seat forward or backward. |
Name | The Name of the station. |
Lock | Sets or gets the station lock. If the station is locked, the players cannot enter or exit the station. While locked, a player still can be attached or detached to the station using Lua script. |
Synchronize | Synchronizes the Station state among all the clients within the room. This prevents multiple player using the station at once. Selecting this option will add the MLSynchronizer automatically. You do not have to select any specific options on MLSynchronizer for this however you can use it to synchronize the station transform, if you wish. It is always a good idea to Synchronize your stations!. It will greatly improve the players' experience. |
KickOut | (Only In VR) When selected, the station kicks out the player if their XR rig moves outside of the the Effective Radius. In VR, player's XR rig location is depend on their actual real life position and their boundary. This option may make it harder to use vehicles as it may kick out the player more often, so it is recommended to be only used for stationary seats. |
Effective Radius | The radius which the KickOut will take effect. |
Is Driver Seat | Is this station meant to control a vehicle? Is selected, the station will automatically request ownership of the Synchronized object. In a group of stations under one MLSynchronizer, only a single station can be selected as Driver Seat. |
Custom Teleport Back | Instructs the station to teleport back the player to a specified position and rotation when player leaves the station. This location can be set by a transform. |
Custom teleport position | A transform to teleport back the player when they leave the station. |
Complex Posture (How To)
Enabling postures allows the station to force a specific posture on avatar. The posture requires 3 position references for Seat, Left Foot and the Right Foot positions. These references can be defined by creating empty game objects as child of the station. You can also click on Create Missing References
button to automatically create them.
Seat
The seat position defines where the avatar seat anchor will be places. You can defines the forward and backward edges of the seat by modifying the value of Seat Length. By defining an edge, avatars can be moved forward and backward to make sure their knee does not clip inside the station.
Left and Right Foot
These references define where ideally the foot should rest. The actual avatar foot may not able to reach to this position or the station seat edge may prevent their leg from bending downward.
Head position
The head position can create a leaning effect for avatar in Desktop Mode only. Player in VR mode can actually lean their physical head. This value defines how much forward or backward the would be relative to Seat reference.
Example Humanoid
By enabling gizmos this button will show a rough humanoid and how it will be seating in your station setup. Note that this humanoid not perfectly represent all the avatar types, in game experience may vary.
Visibility by other players
The station needs to be synchronized for player posture to be visible by other players.
Note station postures disabled for Full Body Tracking.
Event Actions ?
Action | Description | Input |
---|---|---|
MountLocalPlayer() | Mount the local player to this station, if the station is not already occupied. | none |
RemoveLocalPlayer | Remove the local player from station, if it is occupied by them. | none |