Adjust camera follow tween duration based on playback rate

This commit is contained in:
EliteMasterEric
2026-03-09 02:51:06 -06:00
committed by Hundrec
parent 939528a9bd
commit ec7bdd32e2
+3 -1
View File
@@ -3931,9 +3931,11 @@ class PlayState extends MusicBeatSubState
@:nullSafety(Off)
FlxG.camera.target = null;
var adjustedDuration:Float = duration * playbackRate;
// Follow tween! Caching it so we can cancel/pause it later if needed.
var followPos:FlxPoint = cameraFollowPoint.getPosition() - FlxPoint.weak(FlxG.camera.width * 0.5, FlxG.camera.height * 0.5);
cameraFollowTween = FlxTween.tween(FlxG.camera.scroll, {x: followPos.x, y: followPos.y}, duration, {
cameraFollowTween = FlxTween.tween(FlxG.camera.scroll, {x: followPos.x, y: followPos.y}, adjustedDuration, {
ease: ease,
onComplete: function(_)
{