Merge pull request #89468 from MrPersonDev/increase-rigidbody-mass-precision
Increase precision of RigidBody `mass` property
This commit is contained in:
commit
c6d5a782c7
|
@ -740,7 +740,7 @@ void RigidBody2D::_bind_methods() {
|
|||
|
||||
GDVIRTUAL_BIND(_integrate_forces, "state");
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp,suffix:kg"), "set_mass", "get_mass");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,exp,suffix:kg"), "set_mass", "get_mass");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-8,8,0.001,or_less,or_greater"), "set_gravity_scale", "get_gravity_scale");
|
||||
ADD_GROUP("Mass Distribution", "");
|
||||
|
|
|
@ -762,7 +762,7 @@ void RigidBody3D::_bind_methods() {
|
|||
|
||||
GDVIRTUAL_BIND(_integrate_forces, "state");
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp,suffix:kg"), "set_mass", "get_mass");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,exp,suffix:kg"), "set_mass", "get_mass");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-8,8,0.001,or_less,or_greater"), "set_gravity_scale", "get_gravity_scale");
|
||||
ADD_GROUP("Mass Distribution", "");
|
||||
|
|
Loading…
Reference in New Issue