summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/camera_2d.cpp2
-rw-r--r--scene/2d/physics_body_2d.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index bf91ce8e65..8195d98f55 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -198,7 +198,7 @@ Transform2D Camera2D::get_camera_transform() {
screen_rect.position += offset;
}
- camera_screen_center = screen_rect.position + screen_rect.size * 0.5;
+ camera_screen_center = screen_rect.get_center();
Transform2D xform;
xform.scale_basis(zoom);
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index e9930b13a0..5d0d98a2df 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -334,7 +334,7 @@ private:
int max_slides = 4;
int platform_layer;
real_t floor_max_angle = Math::deg2rad((real_t)45.0);
- float floor_snap_length = 0;
+ real_t floor_snap_length = 0;
real_t free_mode_min_slide_angle = Math::deg2rad((real_t)15.0);
Vector2 up_direction = Vector2(0.0, -1.0);
uint32_t moving_platform_floor_layers = UINT32_MAX;