Răsfoiți Sursa

tools: fixed Lua error when setting camera parameters

Daniele Bartolini 5 ani în urmă
părinte
comite
a53d5aec6d

+ 1 - 0
docs/changelog.rst

@@ -24,6 +24,7 @@ Changelog
 * The Editor View now will use the actual unit being placed as a preview instead of its wireframe
 * Fixed an issue that caused textures with supported extension types to be skipped by the importer
 * Added the ability select distinct resource types in the Import dialog
+* Fixed Lua error when setting camera parameters
 
 0.40.0
 ------

+ 1 - 1
samples/core/editors/level_editor/level_editor.lua

@@ -404,7 +404,7 @@ function UnitBox:set_sprite(material, layer, depth, visible)
 end
 
 function UnitBox:set_camera(projection, fov, near_range, far_range)
-	local camera = World.camera_instance(LevelEditor._rw, self._unit_id)
+	local camera = World.camera_instance(LevelEditor._world, self._unit_id)
 	World.camera_set_projection_type(LevelEditor._world, camera, projection)
 	World.camera_set_fov(LevelEditor._world, camera, fov)
 	World.camera_set_near_clip_distance(LevelEditor._world, camera, near_range)