Skip to content

Commit

Permalink
Update of RigidBody2D class description
Browse files Browse the repository at this point in the history
Added a hint in the RigidBody2D class description regarding the transformation issue mentioned in godotengine#5734

(cherry picked from commit 1170b78)
  • Loading branch information
t-karcher authored and akien-mga committed Jul 3, 2019
1 parent 2ccca78 commit b977e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/classes/RigidBody2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
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 [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].
Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime.
If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator].
</description>
<tutorials>
</tutorials>
Expand Down

0 comments on commit b977e8a

Please sign in to comment.