@@ -6805,8 +6805,20 @@ void TileData::_get_property_list(List<PropertyInfo> *p_list) const {
6805
6805
// Physics layers.
6806
6806
p_list->push_back (PropertyInfo (Variant::NIL, GNAME (" Physics" , " " ), PROPERTY_HINT_NONE, " " , PROPERTY_USAGE_GROUP));
6807
6807
for (int i = 0 ; i < physics.size (); i++) {
6808
- p_list->push_back (PropertyInfo (Variant::VECTOR2, vformat (" physics_layer_%d/%s" , i, PNAME (" linear_velocity" )), PROPERTY_HINT_NONE));
6809
- p_list->push_back (PropertyInfo (Variant::FLOAT, vformat (" physics_layer_%d/%s" , i, PNAME (" angular_velocity" )), PROPERTY_HINT_NONE));
6808
+ // physics_layer_%d/linear_velocity
6809
+ property_info = PropertyInfo (Variant::VECTOR2, vformat (" physics_layer_%d/%s" , i, PNAME (" linear_velocity" )), PROPERTY_HINT_NONE);
6810
+ if (physics[i].linear_velocity == Vector2 ()) {
6811
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
6812
+ }
6813
+ p_list->push_back (property_info);
6814
+
6815
+ // physics_layer_%d/angular_velocity
6816
+ property_info = PropertyInfo (Variant::FLOAT, vformat (" physics_layer_%d/%s" , i, PNAME (" angular_velocity" )), PROPERTY_HINT_NONE);
6817
+ if (physics[i].angular_velocity == 0.0 ) {
6818
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
6819
+ }
6820
+ p_list->push_back (property_info);
6821
+
6810
6822
p_list->push_back (PropertyInfo (Variant::INT, vformat (" physics_layer_%d/%s" , i, PNAME (" polygons_count" )), PROPERTY_HINT_NONE, " " , PROPERTY_USAGE_EDITOR));
6811
6823
6812
6824
for (int j = 0 ; j < physics[i].polygons .size (); j++) {
0 commit comments