diff options
Diffstat (limited to 'servers/physics_server_2d.cpp')
-rw-r--r-- | servers/physics_server_2d.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index a6f64f5848..7c36229e9f 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -42,7 +42,7 @@ void PhysicsDirectBodyState2D::integrate_forces() { real_t av = get_angular_velocity(); - float damp = 1.0 - step * get_total_linear_damp(); + real_t damp = 1.0 - step * get_total_linear_damp(); if (damp < 0) { // reached zero in the given time damp = 0; @@ -168,11 +168,11 @@ Vector2 PhysicsShapeQueryParameters2D::get_motion() const { return motion; } -void PhysicsShapeQueryParameters2D::set_margin(float p_margin) { +void PhysicsShapeQueryParameters2D::set_margin(real_t p_margin) { margin = p_margin; } -float PhysicsShapeQueryParameters2D::get_margin() const { +real_t PhysicsShapeQueryParameters2D::get_margin() const { return margin; } @@ -311,7 +311,7 @@ Array PhysicsDirectSpaceState2D::_intersect_shape(const Ref<PhysicsShapeQueryPar Array PhysicsDirectSpaceState2D::_cast_motion(const Ref<PhysicsShapeQueryParameters2D> &p_shape_query) { ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array()); - float closest_safe, closest_unsafe; + real_t closest_safe, closest_unsafe; bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_mask, p_shape_query->collide_with_bodies, p_shape_query->collide_with_areas); if (!res) { return Array(); @@ -517,7 +517,7 @@ PhysicsTestMotionResult2D::PhysicsTestMotionResult2D() { /////////////////////////////////////// -bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) { +bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) { MotionResult *r = nullptr; if (p_result.is_valid()) { r = p_result->get_result_ptr(); |