en:vci:component:sdk:playerspawnpoint

VCI PlayerSpawnPoint

  • To use VCIPlayerSpawnPoint, you need VCI v0.28 or later.
  • You cannot preview VCIPlayerSpawnPoint on Web preview.

What is this component for?

This component is for specifying the spawn position of the players entering a studio.

Specify the spawn position and rotation of players by the Transform of the GameObject, which the VCIPlayerSpawnPoint is attached.

When a player enters a studio, they will be associated with one of the VCIPlayerSpawnPoints and spawned with the specified position and rotation.

This works only when the VCI is loaded as a location.

How to implement

Attach VCIPlayerSpawnPoint to any GameObject under the GameObject with VCIObject component attached.

You can add multiple VCIPlayerSpawnPoints in a single VCI.

Only one VCIPlayerSpawnPoint can be attached to a GameObject.

Specify position and rotation

Specify the associated player's spawn position and rotation with the Transform (only position and rotation)

of the GameObject, which the VCIPlayerSpawnPoint is attached.

  • If Rotation X and Z are not 0, it will be declined during validation.
  • If Position Y is not 0, it will be declined during validation (as of now).

Caution

It will be affected by the position and rotation of GameObjects in the higher hierarchy.

If the validation rejects it even if you have set the Transform correctly, make sure that unintended transformation is not made in the upper hierarchy.

Parameters

Parameter name Description
Order The priority order in which the component is associated with a player
Radius The radius in which the spawn position can be spread within

Order

  • The order of precedence in which association is made with players entering the studio.
  • The smaller the value, the higher the priority (except for 0, as described later).
  • When the same value is set for more than one Order, the association will be made randomly within the same Order value until they are exhausted.
  • When a player associated with smaller Order value leaves the studio, the player who enters the next will be associated with the Order which the player just left was associated with.
Order 0
  • When the Order is set to 0, its priority becomes the lowest. Any players who do not have any Orders left to be associated with will be associated with this.
  • When 0 is specified for multiple Orders, players will be associated randomly with one of them.
  • When Order 0 doesn't exist and there are no other Orders left to be associated with, the player will spawn in the origin.

Radius

Using the Position of VCIPlayerSpawnPoint as the origin point,

the spawn position of the associated player will be spread randomly across XZ plane

within the specified Radius.

en/vci/component/sdk/playerspawnpoint.txt · Last modified: 2023/05/11 20:22 by pastatto

Page Tools