mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-14 10:17:20 +01:00
Fix collider transform.
This commit is contained in:
parent
bb2f13b075
commit
7777056af3
@ -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()) {
|
if (get_voxel_world()->is_inside_tree() && get_voxel_world()->is_inside_world()) {
|
||||||
Ref<World> world = get_voxel_world()->GET_WORLD();
|
Ref<World> 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_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);
|
_collider_bodies.push_back(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user