beta.r3js.org
polygonboutique 2016-11-29 15:40:27 +01:00
parent fafc068fad
commit b2bacd2d7e
1 changed files with 6 additions and 6 deletions

View File

@ -36,9 +36,9 @@ GameLib.D3.ComponentEntityParent.prototype.onLateUpdate = function(
if(parentEntity && this.parent) {
if(this.centerToOrigin) {
this.parentEntity.position.x = this.parent.position.x + ((this.parent.origin.x - this.originPosition.x) * this.parent.scale.x);
this.parentEntity.position.y = this.parent.position.y + ((this.parent.origin.y - this.originPosition.y) * this.parent.scale.y);
this.parentEntity.position.z = this.parent.position.z + ((this.parent.origin.z - this.originPosition.z) * this.parent.scale.z);
this.parentEntity.position.x = ((this.parent.origin.x - this.originPosition.x) * this.parent.scale.x);
this.parentEntity.position.y = ((this.parent.origin.y - this.originPosition.y) * this.parent.scale.y);
this.parentEntity.position.z = ((this.parent.origin.z - this.originPosition.z) * this.parent.scale.z);
// apply quaternion
//
@ -56,9 +56,9 @@ GameLib.D3.ComponentEntityParent.prototype.onLateUpdate = function(
)
);
this.parentEntity.position.x = tmpVector.x;
this.parentEntity.position.y = tmpVector.y;
this.parentEntity.position.z = tmpVector.z;
this.parentEntity.position.x = tmpVector.x + this.parent.position.x;
this.parentEntity.position.y = tmpVector.y + this.parent.position.y;
this.parentEntity.position.z = tmpVector.z + this.parent.position.z;
} else {
this.parentEntity.position.x = this.parent.position.x;