mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:37:48 +02:00
merged
This commit is contained in:
parent
0dd7287e61
commit
45ba7a3d35
2 changed files with 0 additions and 31 deletions
|
@ -877,24 +877,14 @@ function MyController(hand) {
|
||||||
// if an object is "equipped" and has a spatialKey, use it.
|
// if an object is "equipped" and has a spatialKey, use it.
|
||||||
this.ignoreIK = grabbableData.spatialKey.ignoreIK ? grabbableData.spatialKey.ignoreIK : false;
|
this.ignoreIK = grabbableData.spatialKey.ignoreIK ? grabbableData.spatialKey.ignoreIK : false;
|
||||||
if (grabbableData.spatialKey.relativePosition) {
|
if (grabbableData.spatialKey.relativePosition) {
|
||||||
<<<<<<< HEAD
|
|
||||||
this.offsetPosition = getSpatialOffsetPosition(this.hand, grabbableData.spatialKey);
|
this.offsetPosition = getSpatialOffsetPosition(this.hand, grabbableData.spatialKey);
|
||||||
=======
|
|
||||||
this.offsetPosition = getSpatialOffsetPosition(this.hand, grabbableData.spatialKey);
|
|
||||||
>>>>>>> origin/polylineOptimizations
|
|
||||||
} else {
|
} else {
|
||||||
this.offsetPosition = Vec3.multiplyQbyV(Quat.inverse(Quat.multiply(handRotation, this.offsetRotation)), offset);
|
this.offsetPosition = Vec3.multiplyQbyV(Quat.inverse(Quat.multiply(handRotation, this.offsetRotation)), offset);
|
||||||
}
|
}
|
||||||
if (grabbableData.spatialKey.relativeRotation) {
|
if (grabbableData.spatialKey.relativeRotation) {
|
||||||
<<<<<<< HEAD
|
|
||||||
this.offsetRotation = getSpatialOffsetRotation(this.hand, grabbableData.spatialKey);
|
this.offsetRotation = getSpatialOffsetRotation(this.hand, grabbableData.spatialKey);
|
||||||
} else {
|
} else {
|
||||||
this.offsetRotation = Quat.multiply(Quat.inverse(handRotation), objectRotation);
|
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 {
|
} else {
|
||||||
this.ignoreIK = false;
|
this.ignoreIK = false;
|
||||||
|
|
|
@ -33,21 +33,13 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
createBeam: function(startPosition, endPosition) {
|
createBeam: function(startPosition, endPosition) {
|
||||||
<<<<<<< HEAD
|
|
||||||
// Creates particle arc from start position to end position
|
// 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 rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
|
||||||
var sourceToTargetVec = Vec3.subtract(endPosition, startPosition);
|
var sourceToTargetVec = Vec3.subtract(endPosition, startPosition);
|
||||||
var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec);
|
var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec);
|
||||||
emitOrientation = Quat.multiply(Quat.inverse(rotation), emitOrientation);
|
emitOrientation = Quat.multiply(Quat.inverse(rotation), emitOrientation);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> origin/polylineOptimizations
|
|
||||||
var color = {
|
var color = {
|
||||||
red: 200,
|
red: 200,
|
||||||
green: 10,
|
green: 10,
|
||||||
|
@ -110,7 +102,6 @@
|
||||||
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
|
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
|
||||||
var sourceToTargetVec = Vec3.subtract(targetPosition, startPosition);
|
var sourceToTargetVec = Vec3.subtract(targetPosition, startPosition);
|
||||||
var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec);
|
var emitOrientation = Quat.rotationBetween(Vec3.UNIT_Z, sourceToTargetVec);
|
||||||
<<<<<<< HEAD
|
|
||||||
// emitOrientation = Quat.multiply(emitOrientation,Quat.inverse(rotation));
|
// emitOrientation = Quat.multiply(emitOrientation,Quat.inverse(rotation));
|
||||||
Entities.editEntity(this.particleArc, {
|
Entities.editEntity(this.particleArc, {
|
||||||
emitOrientation: emitOrientation
|
emitOrientation: emitOrientation
|
||||||
|
@ -122,18 +113,6 @@
|
||||||
this.updateBeam(startPosition);
|
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() {
|
releaseGrab: function() {
|
||||||
Entities.editEntity(this.particleArc, {
|
Entities.editEntity(this.particleArc, {
|
||||||
isEmitting: false
|
isEmitting: false
|
||||||
|
|
Loading…
Reference in a new issue