Skip to content
0.2.0-dev Download ZIP
19 lines ·1.6 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="AnimatableBody2D" inherits="StaticBody2D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path.
5 </brief_description>
6 <description>
7 An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, [AnimationMixer]s (with [member AnimationMixer.callback_mode_process] set to [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]), and [RemoteTransform2D].
8 When [AnimatableBody2D] is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects.
9 </description>
10 <tutorials>
11 <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
12 <link title="Troubleshooting physics issues">$DOCS_URL/tutorials/physics/troubleshooting_physics_issues.html</link>
13 </tutorials>
14 <members>
15 <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="true">
16 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 PhysicsBody2D.move_and_collide].
17 </member>
18 </members>
19</class>