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

New extension: Rectangular movement animator #1462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 9, 2024

Description

Change the animation based on the direction of the rectangular movement.
I took inspiration from the Platformer character animator extension.
Automatically change the animation based on the direction of the movement.
It can flip the animation horizontally (Flip right sprites to simulate left movement) and play idle animation if the object stop moving.

How to use the extension

It can be useful to animate NPC and enemies with the rectangular movement.
To use the extension set the animations' names according.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

Extension.zip

Extension file

RectangularMovementAnimator.zip

@github-actions github-actions bot added the ✨ New extension A new extension label Dec 9, 2024
@github-actions github-actions bot requested a review from a team as a code owner December 9, 2024 10:27
@D8H
Copy link
Contributor

D8H commented Dec 26, 2024

Thank you for submitting an extension.

The "platformer character animator" extension relies on player inputs which can be different from the current speed direction. In the case of the "rectangle movement" behavior, there is no input so you could rely on the movement direction instead without requiring a "rectangle movement" behavior. This way it would work for any kind of movement.

The "face forward" behavior do something similar but for rotation instead of animations, if it can help:
https://wiki.gdevelop.io/gdevelop5/extensions/face-forward/

@wasd-tech
Copy link

Hi thanks for the suggestion

I changed the extension and now it is based on the difference of the previous position for all types of animations so I delete the use of "Idle traker" and "rectangle movement". I don't know if I should change the name extension because it only allows animations in the 4 directions so it is still “rectangular”.

example: Extension.zip

extension: RectangularMovementAnimator.zip

@wasd-tech
Copy link

Checking again I noticed an error in a description, this is the correct version:
RectangularMovementAnimator.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New extension A new extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants