Forum Discussion

izukingz's avatar
izukingz
Partner
9 months ago
Solved

Spawn player at dynamic location

Is it possible to spawn/move a player to a dynamic location instead of a predetermined spawn point? I tried setting the position of the spawn point but that doesn't work. I would like to move the player during game play to a new location.

  • Nevermind, moving the spawnpoint position seems to work. I am doing it at the wrong location.

  • You can also set the players position without the use of a spawn point but you will need to turn on custom player movement. 

    player.position.set(new Vec3(x, y, z));

     

3 Replies

  • Nevermind, moving the spawnpoint position seems to work. I am doing it at the wrong location.

    • Shards632's avatar
      Shards632
      Mentor

      Before you bang your head against the wall, you cannot _rotate_ a spawn point using scripts. You can, however, put a spawn point in a group and rotate the group.

  • You can also set the players position without the use of a spawn point but you will need to turn on custom player movement. 

    player.position.set(new Vec3(x, y, z));