I am trying to flip a sprite based on whether the player is moving left or right on the screen. My current approach of modifying the transform of the SpriteSheetComponents as follows does not seem to change the sprite at all:
fn player_direction_system(
velocity: &Velocity,
_: &FaceMovementDirection,
mut transform: Mut<Transform>,
) {
let flip = velocity.horizontal.signum();
transform.value = transform.value * Mat4::from_scale(Vec3::unit_y() * flip);
}
Is there a different component of the sprite that I should modify in order to flip it?