Bank-Sitz: blockingAnimRemaining +1Frame, applyMotionKfOffset als Lerp
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -219,7 +219,7 @@ public class PlayerInputControl {
|
|||||||
duration = resolveClipLength(action, 1.5f);
|
duration = resolveClipLength(action, 1.5f);
|
||||||
}
|
}
|
||||||
blockingAnimActive = true;
|
blockingAnimActive = true;
|
||||||
blockingAnimRemaining = Math.max(duration - (1f / 60f), 0f);
|
blockingAnimRemaining = duration + (1f / 60f);
|
||||||
blockingAnimTotal = duration;
|
blockingAnimTotal = duration;
|
||||||
blockingAnimCallback = onComplete;
|
blockingAnimCallback = onComplete;
|
||||||
autopilotDir = null;
|
autopilotDir = null;
|
||||||
@@ -548,10 +548,10 @@ public class PlayerInputControl {
|
|||||||
Quaternion facing = visual.getLocalRotation().clone();
|
Quaternion facing = visual.getLocalRotation().clone();
|
||||||
Vector3f worldOffset = facing.mult(new Vector3f(kf.tx, kf.ty, kf.tz));
|
Vector3f worldOffset = facing.mult(new Vector3f(kf.tx, kf.ty, kf.tz));
|
||||||
kfOffsetTarget.set(worldOffset);
|
kfOffsetTarget.set(worldOffset);
|
||||||
kfOffsetCurrent.set(worldOffset);
|
if (kfOffsetCurrent.distanceSquared(worldOffset) > 1e-4f) {
|
||||||
kfOffsetSpeed = 0f;
|
kfOffsetSpeed = 5.0f;
|
||||||
visual.setLocalTranslation(visualBaseTranslation.clone().addLocal(kfOffsetCurrent));
|
}
|
||||||
log.info("[KF] Clip '{}' → Offset ({},{},{}) sofort", clip, worldOffset.x, worldOffset.y, worldOffset.z);
|
log.info("[KF] Clip '{}' → Offset-Ziel ({},{},{})", clip, worldOffset.x, worldOffset.y, worldOffset.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearKfOffset() {
|
public void clearKfOffset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user