classes/class_animatablebody2d #203
Replies: 3 comments 2 replies
-
If animating using AnimationPlayer, animate a RemoteTransform2D and have the AnimatableBody2D follow this, not the AnimatableBody2D directly. Enabling sync_to_physics and animating the AnimatableBody2D directly will cause the AnimatableBody2D not to move. |
Beta Was this translation helpful? Give feedback.
-
As mentioned by @NancokPS2 in the documentation page for StaticBody2D, it seems that this would be a better choice comparing to StaticBody when you need a PhysicsBody that moves manually:
This should probably be stated on both documentation pages. |
Beta Was this translation helpful? Give feedback.
-
这段代码只会让我的节点向左运动,但在staticbody2d上工作正常;我认为是 sync_to_physics = true 导致了这一点。 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
classes/class_animatablebody2d
Inherits: StaticBody2D< PhysicsBody2D< CollisionObject2D< Node2D< CanvasItem< Node< Object A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in ...
https://docs.godotengine.org/en/4.3/classes/class_animatablebody2d.html
Beta Was this translation helpful? Give feedback.
All reactions