26 lines
769 B
C#
26 lines
769 B
C#
using EnglewoodLAB.Object;
|
|
using UVC.UI.Commands;
|
|
|
|
namespace EnglewoodLAB.Command
|
|
{
|
|
public class ChangedCameraCommand : ICommand
|
|
{
|
|
private readonly CameraPoint point;
|
|
|
|
public ChangedCameraCommand(CameraPoint point)
|
|
{
|
|
this.point = point;
|
|
}
|
|
|
|
public void Execute(object? parameter = null)
|
|
{
|
|
var orbitalController = AppMain.Instance.cameraController;
|
|
if (orbitalController == null) return;
|
|
|
|
orbitalController.currentElevation = point.elevation;
|
|
orbitalController.currentAzimuth = point.azimuth;
|
|
orbitalController.currentDistance = point.distance;
|
|
orbitalController.SetTargetPos(point.TargetPivotTransform.position);
|
|
}
|
|
}
|
|
} |