feat: bounds-based mesh reloading
This commit is contained in:
parent
953e4abe5b
commit
226c821454
7 changed files with 93 additions and 38 deletions
|
|
@ -60,8 +60,10 @@ void TerrainChunkMesh::_notification(int what) {
|
|||
default:
|
||||
return;
|
||||
case NOTIFICATION_READY:
|
||||
set_process_thread_group(ProcessThreadGroup::PROCESS_THREAD_GROUP_SUB_THREAD);
|
||||
this->safe_position = get_global_position();
|
||||
float const sizef{ (float)get_size() };
|
||||
this->bounds.position = { this->safe_position.x - sizef / 2.f, this->safe_position.z - sizef / 2.f };
|
||||
this->bounds.size = { sizef, sizef };
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue