Showing the changes to scripts/developer (1 of 1 file). Show all
Unified · Split
| @@ -102,16 +102,16 @@ · 101 unmodified lines | |||
| 102 | var success = Clipboard.importEntities(PHOTOBOOTH_SETUP_JSON_URL); | 102 | var success = Clipboard.importEntities(PHOTOBOOTH_SETUP_JSON_URL); |
| 103 | var frontFactor = 10; | 103 | var frontFactor = 10; |
| 104 | // getForward is preffered as getFront function is deprecated | 104 | // getForward is preffered as getFront function is deprecated |
| 105 | var frontUnitVec = (typeof Quat.getForward === "undefined") ? Vec3.normalize(Quat.getFront(MyAvatar.orientation)) : Vec3.normalize(Quat.getForward(MyAvatar.orientation)); | 105 | var frontUnitVec = Vec3.normalize(Quat.getFront(MyAvatar.orientation)); |
| 106 | var frontOffset = Vec3.multiply(frontUnitVec,frontFactor); | 106 | var frontOffset = Vec3.multiply(frontUnitVec,frontFactor); |
| 107 | var rightFactor = 3; | 107 | var upFactor = 3; |
| 108 | var rightUnitVec = Vec3.normalize(Quat.getRight(MyAvatar.orientation)); | 108 | var upUnitVec = Vec3.normalize(Quat.getUp(MyAvatar.orientation)); |
| 109 | var rightOffset = Vec3.multiply(rightUnitVec,rightFactor); | 109 | var upOffset = Vec3.multiply(upUnitVec, upFactor); |
| 110 | var spawnLocation = Vec3.sum(Vec3.sum(MyAvatar.position,frontOffset),rightOffset); | 110 | var spawnLocation = Vec3.sum(MyAvatar.position,frontOffset); |
| 111 | spawnLocation = Vec3.sum(spawnLocation, upOffset); | ||
| 111 | if (success) { | 112 | if (success) { |
| 112 | this.pastedEntityIDs = Clipboard.pasteEntities(spawnLocation); | 113 | this.pastedEntityIDs = Clipboard.pasteEntities(spawnLocation); |
| 113 | this.processPastedEntities(); | 114 | this.processPastedEntities(); |
| 114 | |||
| 115 | } | 115 | } |
| 116 | }; | 116 | }; |
| 117 | 117 | ||