SkinRenderer - Add camera position clamping to screen space

This commit is contained in:
miku-666
2024-01-20 17:05:50 +01:00
parent 520f48c9f7
commit b98222e00a

View File

@@ -87,7 +87,11 @@ namespace PckStudio.Rendering
public Vector2 CameraTarget
{
get => camera.Position;
set => camera.LookAt(value);
set
{
value = Vector2.Clamp(value, new Vector2(camera.Distance / 2f * -1), new Vector2(camera.Distance / 2f));
camera.LookAt(value);
}
}
private Vector2 _globalModelRotation;