mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 11:52:04 +02:00
fixed whiteboard markers not hsowing up
This commit is contained in:
parent
bdfaadc892
commit
a7d2ff7c29
2 changed files with 27 additions and 24 deletions
|
@ -90,7 +90,7 @@
|
|||
}, 2500);
|
||||
|
||||
Script.setTimeout(function() {
|
||||
_this.createKineticEntities();
|
||||
// _this.createKineticEntities();
|
||||
_this.createDynamicEntities();
|
||||
}, 750)
|
||||
|
||||
|
@ -123,11 +123,11 @@
|
|||
// z: 0
|
||||
// });
|
||||
|
||||
var tiltMaze = new TiltMaze({
|
||||
x: 1105.5768,
|
||||
y: 460.3298,
|
||||
z: -80.4891
|
||||
});
|
||||
// var tiltMaze = new TiltMaze({
|
||||
// x: 1105.5768,
|
||||
// y: 460.3298,
|
||||
// z: -80.4891
|
||||
// });
|
||||
|
||||
var whiteboard = new Whiteboard({
|
||||
x: 1104,
|
||||
|
@ -139,21 +139,21 @@
|
|||
z: 0
|
||||
});
|
||||
|
||||
var myPlant = new Plant({
|
||||
x: 1099.8785,
|
||||
y: 460.3115,
|
||||
z: -84.7736
|
||||
});
|
||||
// var myPlant = new Plant({
|
||||
// x: 1099.8785,
|
||||
// y: 460.3115,
|
||||
// z: -84.7736
|
||||
// });
|
||||
|
||||
var pingPongGun = new _PingPongGun({
|
||||
x: 1101.2123,
|
||||
y: 460.2328,
|
||||
z: -65.8513
|
||||
}, {
|
||||
x: 97.3683,
|
||||
y: 179.0293,
|
||||
z: 89.9698
|
||||
});
|
||||
// var pingPongGun = new _PingPongGun({
|
||||
// x: 1101.2123,
|
||||
// y: 460.2328,
|
||||
// z: -65.8513
|
||||
// }, {
|
||||
// x: 97.3683,
|
||||
// y: 179.0293,
|
||||
// z: 89.9698
|
||||
// });
|
||||
|
||||
//v2.0
|
||||
// var musicBox = new MusicBox();
|
||||
|
|
|
@ -18,7 +18,11 @@ Whiteboard = function(spawnPosition, spawnRotation) {
|
|||
|
||||
var orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z);
|
||||
var markers = [];
|
||||
var markerRotation = orientation;
|
||||
var markerRotation = Quat.fromVec3Degrees({
|
||||
x: spawnRotation.x + 10,
|
||||
y: spawnRotation.y - 90,
|
||||
z: spawnRotation.z
|
||||
});
|
||||
var whiteboardPosition = spawnPosition;
|
||||
var whiteboardRotation = orientation;
|
||||
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 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)));
|
||||
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-black.fbx",
|
||||
];
|
||||
|
||||
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation)));
|
||||
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
|
||||
|
||||
createMarker(modelURLS[0], markerPosition, {
|
||||
red: 10,
|
||||
|
|
Loading…
Reference in a new issue