Hello
I want to use movePlayerTo() function to teleport player from the ground to 2nd floor but I dont know what is the avatar component .
according Move a player | Decentraland
using below code just spawn a cube and move it to the mentioned position it doesnt move the player.
import { movePlayerTo } from '@decentraland/RestrictedActions'
const respawner = new Entity()
respawner.addComponent(new BoxShape())
respawner.addComponent(new Transform({ position: new Vector3(8, 0, 8) }))
respawner.addComponent(
new OnPointerDown(
(e) => {
movePlayerTo({ x: 1, y: 0, z: 1 }, { x: 8, y: 1, z: 8 })
},
{ hoverText: "Move player" }
)
)
engine.addEntity(respawner)