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

3D model animation actions/conditions #6953

Closed
HelperWesley opened this issue Sep 12, 2024 · 9 comments · Fixed by #7020
Closed

3D model animation actions/conditions #6953

HelperWesley opened this issue Sep 12, 2024 · 9 comments · Fixed by #7020
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop

Comments

@HelperWesley
Copy link

HelperWesley commented Sep 12, 2024

Description

There isn't currently a way to restart an animation that is already playing. With 2D sprites you can set the frame of the animation back to 0. But that isn't the case with 3D models.

Solution suggested

Allow animations to be restarted in the same way as sprite animations.


(Edit: The animation can be restarted by switching the animation to something else before changing it to the one you want to use, but this is sort of a "hack" solution. It would be better if the time elapsed action worked as consistently as the frame action, allowing users to reset animations during and after the animation has finished playing.)

@4ian 4ian added the 👌good first issue Good issue if you want to start contributing to GDevelop label Sep 12, 2024
@stanikeva
Copy link

stanikeva commented Sep 16, 2024

@HelperWesley @4ian Is this still available?
If so, I would like to contribute

@4ian
Copy link
Owner

4ian commented Sep 17, 2024

@stanikeva Yes please, you're welcome to contribute a PR to add this :)

@Ahmad986Ferdaws
Copy link

I would like to contribute

@4ian
Copy link
Owner

4ian commented Sep 17, 2024

Feel free to start working on an issue, no need to ask for permission (though discussion can be useful if it's a complex problem) :)

@kitsiosvas
Copy link

kitsiosvas commented Sep 21, 2024

@HelperWesley, @4ian Good evening, could you please provide a bit more information about this issue? Maybe where in the pipeline this feature is implemented in the 2D sprites so we can start from there? Also maybe where would this new implementation go in the code? Thank you for your time!

@D8H
Copy link
Collaborator

D8H commented Sep 21, 2024

There isn't currently a way to restart an animation that is already playing. With 2D sprites you can set the frame of the animation back to 0, or switch to a different animation and then back to the one you want to restart. But that isn't the case with 3D models.

Actually, the following action can be used on any object that has animations:

image

@HelperWesley
Copy link
Author

HelperWesley commented Sep 22, 2024

@D8H @kitsiosvas

The elapsed time action doesn't work once an animation has finished playing, so it's inconsistent, and doesn't work as consistently as the frames action does for 2D sprites.

2024-09-22.10-54-11.mp4

@AlexandreSi
Copy link
Collaborator

@HelperWesley thanks for the analysis.
If you still have the project, sending it here would be a great addition to the issue for contributors to have a reproductible bug.
@kitsiosvas @stanikeva @Ahmad986Ferdaws I think you have everything to submit a PR:

  • The action that should work (you can search the sentence in the codebase in order to get the function that is executed in game)
  • The fact that it does work for Sprites but not 3D models (both are Animatable objects) so it can be considered as a bug. Plus you can have a look at the sprite object way of doing things to get ideas about how to fix this for 3D models.

@AlexandreSi
Copy link
Collaborator

Closing this since I think it's been fixed in the latest release. Feel free to re-open if there is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants