removed delta from released actions
This commit is contained in:
parent
ad380ec3fe
commit
bf7ef8bd76
@ -58,26 +58,26 @@ public class ParticleSimulationScene : Node2D
|
|||||||
shouldTweenStop = true;
|
shouldTweenStop = true;
|
||||||
|
|
||||||
// Zoom
|
// Zoom
|
||||||
_cameraZoomTarget -= new Vector2(0.1f, 0.1f) * (delta * 60f);
|
_cameraZoomTarget -= new Vector2(0.1f, 0.1f);
|
||||||
|
|
||||||
// Movement
|
// Movement
|
||||||
var mousePos = GetGlobalMousePosition();
|
var mousePos = GetGlobalMousePosition();
|
||||||
var posDelta = _cameraPosTarget - mousePos;
|
var posDelta = _cameraPosTarget - mousePos;
|
||||||
posDelta = posDelta.Clamped(500f);
|
posDelta = posDelta.Clamped(500f);
|
||||||
_cameraPosTarget -= posDelta * 0.2f * (delta * 60f);
|
_cameraPosTarget -= posDelta * 0.2f;
|
||||||
}
|
}
|
||||||
if (Input.IsActionJustReleased("zoom_out"))
|
if (Input.IsActionJustReleased("zoom_out"))
|
||||||
{
|
{
|
||||||
shouldTweenStop = true;
|
shouldTweenStop = true;
|
||||||
|
|
||||||
// Zoom
|
// Zoom
|
||||||
_cameraZoomTarget += new Vector2(0.1f, 0.1f) * (delta * 60f);
|
_cameraZoomTarget += new Vector2(0.1f, 0.1f);
|
||||||
|
|
||||||
// Movement
|
// Movement
|
||||||
var mousePos = GetGlobalMousePosition();
|
var mousePos = GetGlobalMousePosition();
|
||||||
var posDelta = _cameraPosTarget - mousePos;
|
var posDelta = _cameraPosTarget - mousePos;
|
||||||
posDelta = posDelta.Clamped(500f);
|
posDelta = posDelta.Clamped(500f);
|
||||||
_cameraPosTarget += posDelta * 0.2f * (delta * 60f);
|
_cameraPosTarget += posDelta * 0.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cameraDir = new Vector2();
|
var cameraDir = new Vector2();
|
||||||
|
Loading…
Reference in New Issue
Block a user