Definition: Teleport is now handled viaTransform.getMutable(PlayerEntity).position
#356
Labels
sdk7-blocker
Blocks the GA release of SDK7
As of today's SDK 6, the method to teleport the current user is imported as a module and a function
teleportTo(sceneCoords)
andmovePlayerTo(vec3)
.The action
teleportTo
moves your player to a different parcel, it is useful for hubs and other discoverability mechanisms. We may want to keep that as-is because it involves that the current scene will most likely be terminated along with all the rest of the nearby scenes. No data-oriented approach has been explored.The case of
movePlayerTo(vec3)
is slightly different, since it moves the player within the boundaries of the scene. That, by all practical means, is the same as changing the Transform component of the Player entity.The recommended approach for this implementation, is to remove the
movePlayerTo
in its discrete function shape, and re-use the sameTransport.getFrom(PlayerEntity)
that is used to read the player position, in this case to write the new position. It should emit a PUT CRDT message, that is forwarded to the renderer which should either accept or deny the new message based on the current scene rules and permissions to move the player. In the case of the renderer rejecting this new position, it should create an overwriting message with an ID+1 to normalize the Transform in the scene code itself.The text was updated successfully, but these errors were encountered: