From 7777056af3b5be1a2c1e06999c5da165013698f2 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 30 Jun 2020 11:59:22 +0200 Subject: [PATCH] Fix collider transform. --- world/default/voxel_chunk_default.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/world/default/voxel_chunk_default.cpp b/world/default/voxel_chunk_default.cpp index 381c7ca..7beef97 100644 --- a/world/default/voxel_chunk_default.cpp +++ b/world/default/voxel_chunk_default.cpp @@ -1769,10 +1769,13 @@ void VoxelChunkDefault::_build_phase_physics_process(int phase) { if (get_voxel_world()->is_inside_tree() && get_voxel_world()->is_inside_world()) { Ref world = get_voxel_world()->GET_WORLD(); - if (world.is_valid() && world->get_space() != RID()) + if (world.is_valid() && world->get_space() != RID()) { PhysicsServer::get_singleton()->body_set_space(body, world->get_space()); + } } + PhysicsServer::get_singleton()->body_set_state(body, PhysicsServer::BODY_STATE_TRANSFORM, get_transform() * c.transform); + _collider_bodies.push_back(c); } }