LocationComponent parentLoc = parent.getComponent(LocationComponent.class);
if (parentLoc != null) {
this.position.sub(parentLoc.getWorldPosition());
this.position.scale(1f / parentLoc.getWorldScale());
Quat4f rot = new Quat4f(0, 0, 0, 1);
rot.inverse(parentLoc.getWorldRotation());
QuaternionUtil.quatRotate(rot, this.position, this.position);
}
}
public void setWorldRotation(Quat4f value) {