diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index 6cacc2e80a..6337079dc5 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -877,14 +877,24 @@ function MyController(hand) { // if an object is "equipped" and has a spatialKey, use it. this.ignoreIK = grabbableData.spatialKey.ignoreIK ? grabbableData.spatialKey.ignoreIK : false; if (grabbableData.spatialKey.relativePosition) { +<<<<<<< HEAD this.offsetPosition = getSpatialOffsetPosition(this.hand, grabbableData.spatialKey); +======= + this.offsetPosition = getSpatialOffsetPosition(this.hand, grabbableData.spatialKey); +>>>>>>> origin/polylineOptimizations } else { this.offsetPosition = Vec3.multiplyQbyV(Quat.inverse(Quat.multiply(handRotation, this.offsetRotation)), offset); } if (grabbableData.spatialKey.relativeRotation) { +<<<<<<< HEAD this.offsetRotation = getSpatialOffsetRotation(this.hand, grabbableData.spatialKey); } else { this.offsetRotation = Quat.multiply(Quat.inverse(handRotation), objectRotation); +======= + this.offsetRotation = getSpatialOffsetRotation(this.hand, grabbableData.spatialKey); + } else { + this.offsetRotation = Quat.multiply(Quat.inverse(handRotation), objectRotation); +>>>>>>> origin/polylineOptimizations } } else { this.ignoreIK = false; diff --git a/examples/flowArts/arcBall/arcBallEntityScript.js b/examples/flowArts/arcBall/arcBallEntityScript.js index 7bb8472ce9..539bdd7cf0 100644 --- a/examples/flowArts/arcBall/arcBallEntityScript.js +++ b/examples/flowArts/arcBall/arcBallEntityScript.js @@ -33,13 +33,21 @@ }, createBeam: function(startPosition, endPosition) { +<<<<<<< HEAD // Creates particle arc from start position to end position +======= + // Creates particle arc from start position to end position +>>>>>>> origin/polylineOptimizations var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation; var sourceToTargetVec = Vec3.subtract(endPosition, startPosition); var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec); emitOrientation = Quat.multiply(Quat.inverse(rotation), emitOrientation); +<<<<<<< HEAD +======= + +>>>>>>> origin/polylineOptimizations var color = { red: 200, green: 10, @@ -102,6 +110,7 @@ var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation; var sourceToTargetVec = Vec3.subtract(targetPosition, startPosition); var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec); +<<<<<<< HEAD // emitOrientation = Quat.multiply(emitOrientation,Quat.inverse(rotation)); Entities.editEntity(this.particleArc, { emitOrientation: emitOrientation @@ -113,6 +122,18 @@ this.updateBeam(startPosition); }, +======= + emitOrientation = Quat.multiply(Quat.inverse(rotation), emitOrientation); + Entities.editEntity(this.particleArc, {emitOrientation: emitOrientation}); + Entities.editEntity(this.testBox, {rotation: emitOrientation}); + }, + + continueNearGrab: function() { + var startPosition = Entities.getEntityProperties(this.entityID, "position").position; + this.updateBeam(startPosition); + }, + +>>>>>>> origin/polylineOptimizations releaseGrab: function() { Entities.editEntity(this.particleArc, { isEmitting: false