mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	aabb change updates bounding box
spatial editor will now update the bounding box if aabb or transform
changes
(cherry picked from commit 7701889048)
			
			
This commit is contained in:
		
							parent
							
								
									9f4dc87739
								
							
						
					
					
						commit
						f601e15b92
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -2420,17 +2420,17 @@ void SpatialEditorViewport::_notification(int p_what) { | |||
| 				continue; | ||||
| 
 | ||||
| 			Transform t = sp->get_global_gizmo_transform(); | ||||
| 			VisualInstance *vi = Object::cast_to<VisualInstance>(sp); | ||||
| 			AABB new_aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp); | ||||
| 
 | ||||
| 			exist = true; | ||||
| 			if (se->last_xform == t && !se->last_xform_dirty) | ||||
| 			if (se->last_xform == t && se->aabb == new_aabb && !se->last_xform_dirty) | ||||
| 				continue; | ||||
| 			changed = true; | ||||
| 			se->last_xform_dirty = false; | ||||
| 			se->last_xform = t; | ||||
| 
 | ||||
| 			VisualInstance *vi = Object::cast_to<VisualInstance>(sp); | ||||
| 
 | ||||
| 			se->aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp); | ||||
| 			se->aabb = new_aabb; | ||||
| 
 | ||||
| 			t.translate(se->aabb.position); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 David Sichma
						David Sichma