bevy_fixed_sprites 0.1.5

Bevy sprites that don't rotate or scale with their transform
Documentation

bevy_fixed_sprites

crates.io MIT/Apache 2.0 crates.io

Bevy sprites that ignore rotation and scaling.

image

All these sprite's transforms have the same scale and rotation.

Supports Bevy 0.8

Cargo

[dependency]

bevy_fixed_sprites = 0.1

Plugin

You need to add the FixedSpritePlugin to your Bevy App before you can draw a FixedSprite

use bevy_fixed_sprites::*;
app.add_plugin(FixedSpritesPlugin);

Usage

The interface is identical to normal Bevy sprites, just change the names:

  • bevy::sprite::Sprite -> bevy_fixed_sprites::FixedSprite
  • bevy::sprite::SpriteBundle -> bevy_fixed_sprites::FixedSpriteBundle
  • bevy::sprite::TextureAtlasSprite -> bevy_fixed_sprites::FixedTextureAtlasSprite
  • bevy::sprite::SpriteSheetBundle -> bevy_fixed_sprites::FixedSpriteSheetBundle

Although rotation and scale aren't applied to FixedSprites, the flip_* fields and the custom_size fields still work as normal.

FixedSprites respect the Bevy transform hierarchy, entities with a FixedSprite component can have children that rotate and scale relative to their parent's Transform.

Examples

cargo run --example fixed_sprite
cargo run --example hierarchy