gd: fixed look inputs
This commit is contained in:
@ -8,8 +8,6 @@ public partial class Mouse : Node3D
|
||||
[Export(PropertyHint.Range, "0,0.1,0.001,or_greater")]
|
||||
public float Sensitivity { get; set; } = 0.004f;
|
||||
|
||||
|
||||
|
||||
private Node3D _head;
|
||||
private Camera3D _camera;
|
||||
|
||||
@ -40,17 +38,4 @@ public partial class Mouse : Node3D
|
||||
_camera.Rotation = currentCameraRotation;
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (_isPlayerDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (@event is InputEventMouseMotion eventMouseMotion)
|
||||
{
|
||||
var lookDir = new Vector2(-eventMouseMotion.Relative.X, -eventMouseMotion.Relative.Y);
|
||||
LookAround(lookDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user