Merge branch 'polylineOptimizations' of https://github.com/ericrius1/hifi into polylineOptimizations

This commit is contained in:
ericrius1 2015-12-22 11:49:31 -08:00
commit bb28369dee
2 changed files with 5 additions and 6 deletions

View file

@ -38,7 +38,7 @@ LightSaber = function(spawnPosition) {
y: 0,
z: -0.1
},
relativeRotation: Quat.fromPitchYawRollDegrees(90, 90, 0)
relativeRotation: Quat.fromPitchYawRollDegrees(180, 90, 0)
},
invertSolidWhileHeld: true
}
@ -64,4 +64,4 @@ LightSaber = function(spawnPosition) {
}
this.cleanup = cleanup;
}
}

View file

@ -57,9 +57,8 @@
this.props = Entities.getEntityProperties(this.entityID, ["position", "rotation"]);
var forwardVec = Quat.getFront(Quat.multiply(this.props.rotation, Quat.fromPitchYawRollDegrees(-90, 0, 0)));
var forwardQuat = Quat.rotationBetween(Vec3.UNIT_Z, forwardVec);
var position = Vec3.sum(this.props.position, Vec3.multiply(Quat.getFront(this.props.rotation), 0.1));
position.z += 0.1;
position.x += -0.035;
var position = this.props.position;
var color = this.colorPalette[randInt(0, this.colorPalette.length)];
var props = {
type: "ParticleEffect",
@ -114,4 +113,4 @@
};
// entity scripts always need to return a newly constructed object of our type
return new LightSaber();
});
});