public override void update(Clock clock, EventManager eventManager) { Vector3 bonePos = bone.getDerivedPosition(); if (bonePos != lastPosition) { this.updateScale(bone.getDerivedScale()); joint.setFrameOffsetA(bonePos + offset * Owner.Scale); lastPosition = bonePos; } }
public override void update(Clock clock, EventManager eventManager) { Vector3 bonePos = bone.getDerivedPosition(); if (bonePos != lastPosition) { Vector3 jointPos = tongueObject.Translation + bonePos + offset * bone.getDerivedScale() - joint.RigidBodyA.Owner.Translation; joint.setFrameOffsetA(jointPos); lastPosition = bonePos; rigidBody.setLocalScaling(bone.getDerivedScale()); } }
public void setOriginalPosition() { joint.setFrameOffsetA(originalPosition); }