/** * Update this control. Invoked once per frame during the logical-state * update, provided the control is added to a scene. Do not invoke directly * from user code. * * @param tpf the time interval between frames (in seconds, ≥0) */ @Override public void update(float tpf) { if (!enabled) { return; } if(mode == Mode.IK){ ikUpdate(tpf); } else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) { //if the ragdoll has the control of the skeleton, we update each bone with its position in physics world space. ragDollUpdate(tpf); } else { kinematicUpdate(tpf); } }
/** * Update this control. Invoked once per frame during the logical-state * update, provided the control is added to a scene. Do not invoke directly * from user code. * * @param tpf the time interval between frames (in seconds, ≥0) */ @Override public void update(float tpf) { if (!enabled) { return; } if(mode == Mode.IK){ ikUpdate(tpf); } else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) { //if the ragdoll has the control of the skeleton, we update each bone with its position in physics world space. ragDollUpdate(tpf); } else { kinematicUpdate(tpf); } }
public void update(float tpf) { if (!enabled) { return; } if(mode == Mode.IK){ ikUpdate(tpf); } else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) { //if the ragdoll has the control of the skeleton, we update each bone with its position in physic world space. ragDollUpdate(tpf); } else { kinematicUpdate(tpf); } }
/** * Update this control. Invoked once per frame during the logical-state * update, provided the control is added to a scene. Do not invoke directly * from user code. * * @param tpf the time interval between frames (in seconds, ≥0) */ @Override public void update(float tpf) { if (!enabled) { return; } if(mode == Mode.IK){ ikUpdate(tpf); } else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) { //if the ragdoll has the control of the skeleton, we update each bone with its position in physics world space. ragDollUpdate(tpf); } else { kinematicUpdate(tpf); } }