diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-04 17:14:18 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-07-15 10:13:27 -0700 |
commit | d12b44ca13bf442560fdfaa2353806991505201b (patch) | |
tree | 0110437fd2fdd17bacd1ebc688193427a9c98675 /doc | |
parent | 9427bf38427da6366118bfd21fbb2f064bc5719d (diff) |
Move sync to physics to StaticBody2D
Now static body is used for moving platforms through kinematic motion
property, so sync to physics needs to be in StaticBody2D instead of
CharacterBody2D.
Constant kinematic motion is also supported in combination with sync to
physics for smoother movements.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/CharacterBody2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/StaticBody2D.xml | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index b2d8aba174..e184e7dc82 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -110,9 +110,6 @@ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions. - </member> <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)"> When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 85915a53fe..326bf58e22 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -29,6 +29,9 @@ The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]. + </member> </members> <constants> </constants> |