diff options
Diffstat (limited to 'servers/physics_server_3d.cpp')
-rw-r--r-- | servers/physics_server_3d.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index 27ebe32e50..a4dc80b0a6 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -42,13 +42,13 @@ void PhysicsDirectBodyState3D::integrate_forces() { Vector3 av = get_angular_velocity(); - float linear_damp = 1.0 - step * get_total_linear_damp(); + real_t linear_damp = 1.0 - step * get_total_linear_damp(); if (linear_damp < 0) { // reached zero in the given time linear_damp = 0; } - float angular_damp = 1.0 - step * get_total_angular_damp(); + real_t angular_damp = 1.0 - step * get_total_angular_damp(); if (angular_damp < 0) { // reached zero in the given time angular_damp = 0; @@ -128,7 +128,7 @@ void PhysicsDirectBodyState3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform"); } PhysicsDirectBodyState3D::PhysicsDirectBodyState3D() {} @@ -164,11 +164,11 @@ Transform PhysicsShapeQueryParameters3D::get_transform() const { return transform; } -void PhysicsShapeQueryParameters3D::set_margin(float p_margin) { +void PhysicsShapeQueryParameters3D::set_margin(real_t p_margin) { margin = p_margin; } -float PhysicsShapeQueryParameters3D::get_margin() const { +real_t PhysicsShapeQueryParameters3D::get_margin() const { return margin; } @@ -303,7 +303,7 @@ Array PhysicsDirectSpaceState3D::_intersect_shape(const Ref<PhysicsShapeQueryPar Array PhysicsDirectSpaceState3D::_cast_motion(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, const Vector3 &p_motion) { ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array()); - float closest_safe = 1.0f, closest_unsafe = 1.0f; + real_t closest_safe = 1.0f, closest_unsafe = 1.0f; bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_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(); |