mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fixed offset issue with lightsaber
This commit is contained in:
parent
1031489ada
commit
653e3ecdcc
1 changed files with 3 additions and 4 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue