fixed offset issue with lightsaber

This commit is contained in:
Eric Levin 2015-12-22 11:02:36 -08:00
parent 1031489ada
commit 653e3ecdcc

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();
});
});