Project cleanup: Removed 3D scripts and scenes from project. Also renamed and moved some minor stuff.
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Camera;
|
||||
|
||||
public partial class CameraPivot : Node3D
|
||||
{
|
||||
[Export] private bool _canPitch;
|
||||
[Export] private bool _canYaw;
|
||||
[Export] private float _rotateSpeed = 0.003f;
|
||||
[Export] private Node3D _subPivot;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Input.MouseMode = Input.MouseModeEnum.Captured;
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if(@event.IsActionPressed("click"))
|
||||
{
|
||||
if (Input.MouseMode == Input.MouseModeEnum.Visible)
|
||||
{
|
||||
Input.MouseMode = Input.MouseModeEnum.Captured;
|
||||
}
|
||||
}
|
||||
|
||||
if (@event.IsActionPressed("ui_cancel"))
|
||||
{
|
||||
Input.MouseMode = Input.MouseModeEnum.Visible;
|
||||
}
|
||||
|
||||
if (@event is InputEventMouseMotion test)
|
||||
{
|
||||
if (Input.MouseMode != Input.MouseModeEnum.Captured)
|
||||
return;
|
||||
|
||||
if (_canYaw)
|
||||
_subPivot.RotateX(test.Relative.Y * -_rotateSpeed);
|
||||
if(_canPitch)
|
||||
this.RotateY(test.Relative.X * -_rotateSpeed);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://r5tahuqvbucy
|
||||
Reference in New Issue
Block a user