Last active
November 10, 2022 20:44
-
-
Save seanellul/5645400e1064a9a064bfab86a7206ebf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //cameraTarget is what's interesting here. Being able to have more ways to impact this variable could give us a lot more leeway to build immersive experiences in dcl. | |
| 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) | |
| //Scene.Json: | |
| "requiredPermissions": [ | |
| "ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE" | |
| ], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment