Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spine sprites don't update their bone positions for skeleton_bone_state_get until AFTER the sprite is drawn #2364

Closed
KormexGit opened this issue Dec 2, 2023 — with GM Bug Reporter · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue project This issue has a sample project attached

Comments

@KormexGit
Copy link

KormexGit commented Dec 2, 2023

Description

Previously, you could use skeleton_bone_state_get in the end step event and it would have updated bone data for what's going to draw that frame, since it would update between step and end step. Now, the bone data will never update until after the sprite is drawn. It won't even be updated for the animation update event, it's updated after the animation update event runs. This means the only way to have up to date bone data is to call draw_self() in a step event prior to using skeleton_bone_state_get.
This also means bone data will never update at all if the sprite isn't actually being drawn.
The animation update event still has the issue where it will run every single time the sprite is drawn instead of once at a specific time, so I'd like if it could go back to updating between step and end step, so I can run state machines and such without needing to call draw_self() in step.

Steps To Reproduce

Assign a spine sprite to an object, and add some code to move it in step. Call skeleton_bone_state_get in various events, and see that it doesn't update until after the sprite is drawn.

skeleton_bone_state_get("Shield", map);
show_debug_message("draw, before draw_self " + string(map[? "worldX"]));
//still using last frame's data here 

draw_self();

skeleton_bone_state_get("Shield", map);
show_debug_message("draw, after draw_self " + string(map[? "worldX"]));
//Data is only updated here, it does not update until AFTER the sprite is drawn

22439771-8446-45dd-9c12-496f17735ee2

@gm-bug-reporter gm-bug-reporter bot added runner-bug In-game bugs with the "GameMaker Studio 2" runtimes project This issue has a sample project attached labels Dec 2, 2023
@stuckie stuckie added documentation Improvements or additions to documentation are required by this issue and removed runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Dec 4, 2023
gurpreetsinghmatharoo added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 7, 2024
* Add extra links to the manual entry that specifies YUV platforms for videos - YoYoGames/GameMaker-Bugs#4665
* Build Menu page should specify that 'Create Executable and Launch' will not launch executables packaged as installers - YoYoGames/GameMaker-Bugs#4706
* Spine sprites don't update their bone positions for skeleton_bone_state_get until AFTER the sprite is drawn - YoYoGames/GameMaker-Bugs#2364
* Functions Related to Following a Target Are Unclear - YoYoGames/GameMaker-Bugs#4529
@github-project-automation github-project-automation bot moved this from Backlog to Done in Team Workload May 7, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo moved this from Done to Ready for QA in Team Workload May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue project This issue has a sample project attached
Projects
Status: Ready for QA
Development

No branches or pull requests

3 participants