Browse Source

Fix Decal clamping to positive values not being applied to RenderingServer

This means the Decal editor gizmo could be incorrect compared to the actual
rendering if you enter a negative value in the inspector.
Hugo Locurcio 1 year ago
parent
commit
a052d34129
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/3d/decal.cpp

+ 1 - 1
scene/3d/decal.cpp

@@ -32,7 +32,7 @@
 
 
 void Decal::set_size(const Vector3 &p_size) {
 void Decal::set_size(const Vector3 &p_size) {
 	size = Vector3(MAX(0.001, p_size.x), MAX(0.001, p_size.y), MAX(0.001, p_size.z));
 	size = Vector3(MAX(0.001, p_size.x), MAX(0.001, p_size.y), MAX(0.001, p_size.z));
-	RS::get_singleton()->decal_set_size(decal, p_size);
+	RS::get_singleton()->decal_set_size(decal, size);
 	update_gizmos();
 	update_gizmos();
 }
 }