mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-21 21:41:20 +02:00
Chunk's mesh_data_resource_add expects a local transform.
This commit is contained in:
parent
c7f7d0919d
commit
f76a7f9df4
@ -599,7 +599,11 @@ void TerraWorld::prop_add(Transform transform, const Ref<PropData> &prop, const
|
||||
if (!mdr.is_valid())
|
||||
continue;
|
||||
|
||||
chunk->mesh_data_resource_add(t, mdr, mesh_data->get_texture(), Color(1, 1, 1, 1), false);
|
||||
Transform chunk_local_tform = t;
|
||||
|
||||
chunk_local_tform.origin = chunk->to_local(chunk_local_tform.origin);
|
||||
|
||||
chunk->mesh_data_resource_add(chunk_local_tform, mdr, mesh_data->get_texture(), Color(1, 1, 1, 1), false);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user