summaryrefslogtreecommitdiff
path: root/scene/2d/collision_polygon_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-01 20:48:16 +0100
committerGitHub <noreply@github.com>2021-02-01 20:48:16 +0100
commit337564781884070ca3777a36d2a022a14d91176a (patch)
tree6bb9bcf0746614cc2e54b0aff1f9a5fb2792e6bd /scene/2d/collision_polygon_2d.cpp
parent2d134b6ddd5144f8caa5d30dd572740b50278dd5 (diff)
parent9199a681de39f8410f4987c63d66817eb5be56fc (diff)
Merge pull request #45564 from aaronfranke/physics-nodes-real_t
Use real_t in physics nodes
Diffstat (limited to 'scene/2d/collision_polygon_2d.cpp')
-rw-r--r--scene/2d/collision_polygon_2d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 851e40cda6..505c0beb45 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -158,7 +158,7 @@ void CollisionPolygon2D::_notification(int p_what) {
Vector2 line_to(0, 20);
draw_line(Vector2(), line_to, dcol, 3);
Vector<Vector2> pts;
- float tsize = 8;
+ real_t tsize = 8;
pts.push_back(line_to + (Vector2(0, tsize)));
pts.push_back(line_to + (Vector2(Math_SQRT12 * tsize, 0)));
pts.push_back(line_to + (Vector2(-Math_SQRT12 * tsize, 0)));
@@ -275,14 +275,14 @@ bool CollisionPolygon2D::is_one_way_collision_enabled() const {
return one_way_collision;
}
-void CollisionPolygon2D::set_one_way_collision_margin(float p_margin) {
+void CollisionPolygon2D::set_one_way_collision_margin(real_t p_margin) {
one_way_collision_margin = p_margin;
if (parent) {
parent->shape_owner_set_one_way_collision_margin(owner_id, one_way_collision_margin);
}
}
-float CollisionPolygon2D::get_one_way_collision_margin() const {
+real_t CollisionPolygon2D::get_one_way_collision_margin() const {
return one_way_collision_margin;
}