fixed Camera2D rotation with non-square zoom
This commit is contained in:
parent
6bd4074f76
commit
b9c0897713
@ -198,10 +198,10 @@ Transform2D Camera2D::get_camera_transform() {
|
|||||||
camera_screen_center = screen_rect.position + screen_rect.size * 0.5;
|
camera_screen_center = screen_rect.position + screen_rect.size * 0.5;
|
||||||
|
|
||||||
Transform2D xform;
|
Transform2D xform;
|
||||||
|
xform.scale_basis(zoom);
|
||||||
if (rotating) {
|
if (rotating) {
|
||||||
xform.set_rotation(angle);
|
xform.set_rotation(angle);
|
||||||
}
|
}
|
||||||
xform.scale_basis(zoom);
|
|
||||||
xform.set_origin(screen_rect.position /*.floor()*/);
|
xform.set_origin(screen_rect.position /*.floor()*/);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user