removed delta from released actions

This commit is contained in:
orosmatthew 2022-02-07 11:09:08 -05:00
parent ad380ec3fe
commit bf7ef8bd76

View File

@ -58,26 +58,26 @@ public class ParticleSimulationScene : Node2D
shouldTweenStop = true;
// Zoom
_cameraZoomTarget -= new Vector2(0.1f, 0.1f) * (delta * 60f);
_cameraZoomTarget -= new Vector2(0.1f, 0.1f);
// Movement
var mousePos = GetGlobalMousePosition();
var posDelta = _cameraPosTarget - mousePos;
posDelta = posDelta.Clamped(500f);
_cameraPosTarget -= posDelta * 0.2f * (delta * 60f);
_cameraPosTarget -= posDelta * 0.2f;
}
if (Input.IsActionJustReleased("zoom_out"))
{
shouldTweenStop = true;
// Zoom
_cameraZoomTarget += new Vector2(0.1f, 0.1f) * (delta * 60f);
_cameraZoomTarget += new Vector2(0.1f, 0.1f);
// Movement
var mousePos = GetGlobalMousePosition();
var posDelta = _cameraPosTarget - mousePos;
posDelta = posDelta.Clamped(500f);
_cameraPosTarget += posDelta * 0.2f * (delta * 60f);
_cameraPosTarget += posDelta * 0.2f;
}
var cameraDir = new Vector2();