fixed whiteboard markers not hsowing up

This commit is contained in:
ericrius1 2016-03-18 15:23:53 -07:00
parent bdfaadc892
commit a7d2ff7c29
2 changed files with 27 additions and 24 deletions

View file

@ -90,7 +90,7 @@
}, 2500); }, 2500);
Script.setTimeout(function() { Script.setTimeout(function() {
_this.createKineticEntities(); // _this.createKineticEntities();
_this.createDynamicEntities(); _this.createDynamicEntities();
}, 750) }, 750)
@ -123,11 +123,11 @@
// z: 0 // z: 0
// }); // });
var tiltMaze = new TiltMaze({ // var tiltMaze = new TiltMaze({
x: 1105.5768, // x: 1105.5768,
y: 460.3298, // y: 460.3298,
z: -80.4891 // z: -80.4891
}); // });
var whiteboard = new Whiteboard({ var whiteboard = new Whiteboard({
x: 1104, x: 1104,
@ -139,21 +139,21 @@
z: 0 z: 0
}); });
var myPlant = new Plant({ // var myPlant = new Plant({
x: 1099.8785, // x: 1099.8785,
y: 460.3115, // y: 460.3115,
z: -84.7736 // z: -84.7736
}); // });
var pingPongGun = new _PingPongGun({ // var pingPongGun = new _PingPongGun({
x: 1101.2123, // x: 1101.2123,
y: 460.2328, // y: 460.2328,
z: -65.8513 // z: -65.8513
}, { // }, {
x: 97.3683, // x: 97.3683,
y: 179.0293, // y: 179.0293,
z: 89.9698 // z: 89.9698
}); // });
//v2.0 //v2.0
// var musicBox = new MusicBox(); // var musicBox = new MusicBox();

View file

@ -18,7 +18,11 @@ Whiteboard = function(spawnPosition, spawnRotation) {
var orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z); var orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z);
var markers = []; var markers = [];
var markerRotation = orientation; var markerRotation = Quat.fromVec3Degrees({
x: spawnRotation.x + 10,
y: spawnRotation.y - 90,
z: spawnRotation.z
});
var whiteboardPosition = spawnPosition; var whiteboardPosition = spawnPosition;
var whiteboardRotation = orientation; var whiteboardRotation = orientation;
var WHITEBOARD_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/Whiteboard-4.fbx"; var WHITEBOARD_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/Whiteboard-4.fbx";
@ -89,7 +93,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx"; var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx";
var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(whiteboardRotation))); var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation))); eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation)));
var eraserRotation = markerRotation; var eraserRotation = markerRotation;
@ -157,8 +161,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
"https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-red.fbx", "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-red.fbx",
"https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-black.fbx", "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-black.fbx",
]; ];
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation)));
createMarker(modelURLS[0], markerPosition, { createMarker(modelURLS[0], markerPosition, {
red: 10, red: 10,