godotengine / godotengine/godot
AnimatableBody2D animates only one property when sync_to_physics is enabled (using AnimationPlayer)
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Godot v4.3.stable
### System information
macOS 14.6.1 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)
### Issue description
1. I am animating a `AnimatableBody2D` using an `AnimationPlayer`
2. The `AnimatableBody2D` is not moving unless I turn **off** `sync_to_physics`
3. I tried with bezier curve animation and without, no change
4. At some point it animated at least partially, now (with no conscious change) it doesn't animate at all
5. Since it does animate with `sync_to_physics` turned off I assume it's not an error on my side
If anybody has any ideas, please. I have no clue anymore ...
**Potentially related issues:**
- #76685
- #58269
### Steps to reproduce
I am not able to reproduce it from scratch, but I extracted the problem from my larger project:
1. Open and run the project (with visible collision shapes)
2. Shape should move, but doesn't 😭
3. Turn off `sync_to_physics` on to animatable_body_2d and run scene
4. It now moves 😤
### Minimal reproduction project (MRP)
[bug-animating-animatable-body-zip.zip](https://github.com/user-attachments/files/17681220/bug-animating-animatable-body-zip.zip)
Contributor guide
Research direction
Start by opening and running the attached bug-animating-animatable-body-zip.zip minimal reproduction project with visible collision shapes. Compare the AnimatableBody2D and AnimationPlayer behavior with sync_to_physics enabled and disabled, and inspect the related issues #76685 and #58269. Done means identifying the cause of the missing animation and confirming the fix against the reproduction steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100