building rotation

This commit is contained in:
Victor Turgeon 2023-06-11 13:15:53 -04:00
parent 828016be6a
commit bf28b50a83

View File

@ -153,6 +153,11 @@ public partial class player : Camera3D
{ {
CurrentBuilding.GlobalPosition = _cursorPoint.GlobalPosition; CurrentBuilding.GlobalPosition = _cursorPoint.GlobalPosition;
if (Input.IsActionJustPressed("rotate"))
{
CurrentBuilding.RotateY(Mathf.DegToRad(90));
}
if (Input.IsActionJustPressed("build")) if (Input.IsActionJustPressed("build"))
{ {
if (CurrentBuilding.IsPlaceable) if (CurrentBuilding.IsPlaceable)