summaryrefslogtreecommitdiffstats
path: root/scene/2d
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-11 09:07:04 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-11 09:08:01 -0500
commit62fbec9f6f0722a1f9825c17f073742932082228 (patch)
treea10abf56ba93705731da1aaf338f2cf21403c6ad /scene/2d
parente7894c2c4efdd51049a21af4892005381fe57cd6 (diff)
parent0f5f3bc9546b46b2029fc8896dc859697f1eab97 (diff)
downloadredot-engine-62fbec9f6f0722a1f9825c17f073742932082228.tar.gz
Merge commit godotengine/godot@0f5f3bc9546b46b2029fc8896dc859697f1eab97
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/tile_map_layer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/tile_map_layer.cpp b/scene/2d/tile_map_layer.cpp
index a2dc394f64..eec1654759 100644
--- a/scene/2d/tile_map_layer.cpp
+++ b/scene/2d/tile_map_layer.cpp
@@ -825,6 +825,7 @@ void TileMapLayer::_physics_update_cell(CellData &r_cell_data) {
Ref<PhysicsMaterial> physics_material = tile_set->get_physics_layer_physics_material(tile_set_physics_layer);
uint32_t physics_layer = tile_set->get_physics_layer_collision_layer(tile_set_physics_layer);
uint32_t physics_mask = tile_set->get_physics_layer_collision_mask(tile_set_physics_layer);
+ real_t physics_priority = tile_set->get_physics_layer_collision_priority(tile_set_physics_layer);
RID body = r_cell_data.bodies[tile_set_physics_layer];
if (tile_data->get_collision_polygons_count(tile_set_physics_layer) == 0) {
@@ -851,6 +852,7 @@ void TileMapLayer::_physics_update_cell(CellData &r_cell_data) {
ps->body_attach_object_instance_id(body, tile_map_node ? tile_map_node->get_instance_id() : get_instance_id());
ps->body_set_collision_layer(body, physics_layer);
ps->body_set_collision_mask(body, physics_mask);
+ ps->body_set_collision_priority(body, physics_priority);
ps->body_set_pickable(body, false);
ps->body_set_state(body, PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, tile_data->get_constant_linear_velocity(tile_set_physics_layer));
ps->body_set_state(body, PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, tile_data->get_constant_angular_velocity(tile_set_physics_layer));