mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-22 09:59:25 +00:00
Merge pull request #795 from FunkinCrew/nebulazorua/classic-camera-fix
[PUBLIC PR] Fix an issue where the Classic FocusCamera event would cause the camera to snap in place
This commit is contained in:
commit
4669ac03a9
|
@ -3189,7 +3189,7 @@ class PlayState extends MusicBeatSubState
|
|||
/**
|
||||
* Resets the camera's zoom level and focus point.
|
||||
*/
|
||||
public function resetCamera(?resetZoom:Bool = true, ?cancelTweens:Bool = true):Void
|
||||
public function resetCamera(?resetZoom:Bool = true, ?cancelTweens:Bool = true, ?snap:Bool = true):Void
|
||||
{
|
||||
// Cancel camera tweens if any are active.
|
||||
if (cancelTweens)
|
||||
|
@ -3206,7 +3206,7 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
// Snap the camera to the follow point immediately.
|
||||
FlxG.camera.focusOn(cameraFollowPoint.getPosition());
|
||||
if (snap) FlxG.camera.focusOn(cameraFollowPoint.getPosition());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,7 +127,8 @@ class FocusCameraSongEvent extends SongEvent
|
|||
switch (ease)
|
||||
{
|
||||
case 'CLASSIC': // Old-school. No ease. Just set follow point.
|
||||
PlayState.instance.resetCamera(false, true);
|
||||
PlayState.instance.resetCamera(false, false, false);
|
||||
PlayState.instance.cancelCameraFollowTween();
|
||||
PlayState.instance.cameraFollowPoint.setPosition(targetX, targetY);
|
||||
case 'INSTANT': // Instant ease. Duration is automatically 0.
|
||||
PlayState.instance.tweenCameraToPosition(targetX, targetY, 0);
|
||||
|
|
Loading…
Reference in a new issue