Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //UserData:
- //{
- // “path”: “/path obtained with navigate copy path”,
- // “grabbableKey”: {
- // “grabbable”: false
- // }
- //}
- (function () {
- var path = null;
- var properties = null;
- this.clickDownOnEntity = function (entityID, mouseEvent) {
- print("clicked by Salahzar");
- properties = Entities.getEntityProperties(entityID, ["position", "userData"]);
- if (!properties.userData) {
- print("Click Teleporter " + entityID + " missing user data.");
- return;
- } try {
- teleportData = JSON.parse(properties.userData);
- print("Path " + teleportData.path);
- url = location.hostname;
- location = "hifi://" + url + teleportData.path;
- } catch (e) { }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement