소스 검색

Clarify 2D lighting `height` property in class reference

It's easy to assume they are the same, but they are quite different for the two types of 2D lights. For myself, it took a bit of confusion and experimentation for me to figure out why this behaviour changed when I changed from point to directional. Hopefully it can save somebody else the trouble.
nabfrew 3 년 전
부모
커밋
e2e77bbb04
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      doc/classes/DirectionalLight2D.xml
  2. 1 1
      doc/classes/PointLight2D.xml

+ 1 - 1
doc/classes/DirectionalLight2D.xml

@@ -8,7 +8,7 @@
 	</tutorials>
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
-			The height of the light. Used with 2D normal mapping.
+			The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane).
 		</member>
 		<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0">
 		</member>

+ 1 - 1
doc/classes/PointLight2D.xml

@@ -8,7 +8,7 @@
 	</tutorials>
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
-			The height of the light. Used with 2D normal mapping.
+			The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane.
 		</member>
 		<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
 			The offset of the light's [member texture].