瀏覽代碼

Merge pull request #91596 from TheKiromen/improve-body-create-documentation

Update `body_create` description in PhysicsServer2D/3D
Rémi Verschelde 1 年之前
父節點
當前提交
e9c980d857
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 2 1
      doc/classes/PhysicsServer2D.xml
  2. 2 0
      doc/classes/PhysicsServer3D.xml

+ 2 - 1
doc/classes/PhysicsServer2D.xml

@@ -370,7 +370,8 @@
 		<method name="body_create">
 			<return type="RID" />
 			<description>
-				Creates a 2D body object in the physics server, and returns the [RID] that identifies it. Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
+				Creates a 2D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID].
+				Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
 			</description>
 		</method>
 		<method name="body_get_canvas_instance_id" qualifiers="const">

+ 2 - 0
doc/classes/PhysicsServer3D.xml

@@ -352,6 +352,8 @@
 		<method name="body_create">
 			<return type="RID" />
 			<description>
+				Creates a 3D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID].
+				Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.
 			</description>
 		</method>
 		<method name="body_get_collision_layer" qualifiers="const">