diff options
Diffstat (limited to 'doc/classes/RigidBody2D.xml')
-rw-r--r-- | doc/classes/RigidBody2D.xml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 35b5449c0a..75fbb48454 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -1,15 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.0-rc1"> +<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.1"> <brief_description> A body that is controlled by the 2D physics engine. </brief_description> <description> This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. - A RigidBody2D has 4 behavior modes (see [member mode]): - - [b]Rigid[/b]: The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode. - - [b]Static[/b]: The body behaves like a [StaticBody2D] and does not move. - - [b]Character[/b]: Similar to [code]Rigid[/code] mode, but the body can not rotate. - - [b]Kinematic[/b]: The body behaves like a [KinematicBody2D], and must be moved by code. + A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. [b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. If you need to override the default physics behavior, you can write a custom force integration. See [member custom_integrator]. </description> @@ -70,9 +66,11 @@ </return> <argument index="0" name="motion" type="Vector2"> </argument> - <argument index="1" name="margin" type="float" default="0.08"> + <argument index="1" name="infinite_inertia" type="bool" default="true"> </argument> - <argument index="2" name="result" type="Physics2DTestMotionResult" default="null"> + <argument index="2" name="margin" type="float" default="0.08"> + </argument> + <argument index="3" name="result" type="Physics2DTestMotionResult" default="null"> </argument> <description> Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one). |