Skip to content

Add RotationDirection to SpriteComponent #6091

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

Conversation

notquitehadouken
Copy link
Contributor

When enabled, the sprite of anything that possesses both a rotation and an RSI with directions will have the direction rotated with the sprite

image

@K-Dynamic
Copy link

I'm a bit confused, could you explain what this allows you to do

@notquitehadouken
Copy link
Contributor Author

I'm a bit confused, could you explain what this allows you to do

when a sprite is rotated by changing the Rotation value it will also rotate the directional sprite in the opposite direction so it looks like it always faces the same direction even when upside down or whatever

@notquitehadouken
Copy link
Contributor Author

image consult the graph

Copy link
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would DirOffset not be sufficient for this? With this system you still can't have a rotation and a direction rotation if they don't match.

@notquitehadouken
Copy link
Contributor Author

Would DirOffset not be sufficient for this? With this system you still can't have a rotation and a direction rotation if they don't match.

i'm not entirely sure i know what this means

@PJB3005
Copy link
Member

PJB3005 commented Jul 22, 2025

i'm not entirely sure i know what this means

What if I want to apply RotationDirection only 90 degrees, but have the entire sprite rotated 180 degrees?

@notquitehadouken
Copy link
Contributor Author

i'm not entirely sure i know what this means

What if I want to apply RotationDirection only 90 degrees, but have the entire sprite rotated 180 degrees?

oh okay one sec

@notquitehadouken
Copy link
Contributor Author

float :trollface:

Copy link
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I specifically mentioned DirOffset as it seemed like the best solution to me. In what scenario would a float parameter make sense here?

@notquitehadouken
Copy link
Contributor Author

well if you set it to 1/2 and rotate the sprite 180 degrees it'll only rotate the direction 90 degrees

@PJB3005
Copy link
Member

PJB3005 commented Jul 22, 2025

well if you set it to 1/2 and rotate the sprite 180 degrees it'll only rotate the direction 90 degrees

Doing it by fractions like this sounds extremely impractical, when the obvious use case is single step offsets.

@notquitehadouken
Copy link
Contributor Author

...

@notquitehadouken notquitehadouken deleted the 25-07-20-rotationdirection branch July 29, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants