bevyengine / bevyengine/bevy

Non-painful sprite hierarchy flipping

Open
#4,930 7 comments 3 reactions 0 assignees View on GitHub
A-Animation A-Rendering C-Usability D-Trivial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

I've have character created out of a hierarchy of sprites, to allow me to procedurally animate by moving individual pieces.

I want some way to flip the whole character, left to right.

## What solution would you like?

I'd love to just negate the x-scale on the transform, which would require disabling back-face culling on sprites, and possibly some work to get negative transform scales working correctly.

## What alternative(s) have you considered?

Because of the hierarchy approach, just toggling `flip_x` on every sub-sprite isn't enough (they stay in place relative to their own transforms), and rotating the character by `pi` on the y-axis means all the tiny z-offsets I have to set the sub-sprite rendering order are reversed.

There's always the long-way workaround of just flipping each sub-sprite and recalculating position, but that's not great.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.