public void update(float location) { foreach (DiscBonePair bone in bones) { float loc = location + bone.offset; if (loc < 0.0f) { loc = 0.0f; } else if (loc > 1.0f) { loc = 1.0f; } bone.bone.setPosition(Quaternion.quatRotate(owner.Rotation.inverse(), Quaternion.quatRotate(followSimObject.Rotation, fossa.getPosition(loc)) + followSimObject.Translation - owner.Translation)); bone.bone.needUpdate(true); } }
public Vector3 getPosition(float location) { return(fossa.getPosition(location) + getOffset(location)); }