Player spawn point

In Varwin XRMS there are two types of player appearance points:

  • Default player emergence point (blue)
  • User-defined player emergence point (green)

Default player emergence point

../../_images/image-168.png

The Blue Player Appearance Point can be moved in all three axes, and rotated in the Y axis, but cannot be scaled or rotated in the Z and X axes. The player will appear at this point in the absence of explicit instructions to redefine it

Note

  • The default position and orientation of the appearance point in space is defined in the scene template
  • This object appears in the object list in Blockly, but does not have any behavior blocks

Player emergence point overridden by the user

../../_images/image-240.png

With the Green Player Appearance Point the user can redefine where the player appears on the stage

To do this, it is necessary to:

  1. Place a green dot on the stage - the direction of the arrow indicates the direction in which the player will look
../../_images/image-334.png
  1. Save the scene and in the Blockly logic editor teleport the player to the new point of appearance
../../_images/image-426.png

Now the player will appear in a new point when starting the scene

Note

There can be an infinite number of additional player appearance points. These points must be explicitly defined in the logic editor (see the above construction), but they can also be overridden dynamically, e.g. at the moment the button is pressed

Random Point of Appearance

The user can set the appearance point on the stage randomly. To do this, he must additionally place several green Player Appearance Points on the stage

../../_images/image-620.png

And configure the Blockly logic accordingly

../../_images/image-519.png

To do that, at the moment of scene preparation, create a variable, containing an array of player appearing points located on the scene. After that, for the player object perform the teleport to… function and set the block in the “variable” list to “arbitrary” as the required object. Done, run the project and check that the logic works. Each restart of the scene will call this event and select a random appearance point from the list for the player