#y no work

8 messages · Page 1 of 1 (latest)

brave harbor
#

this is what legs.png looks like. 6 columns, 1 row

distant bobcat
#

I think your player entity is missing a Visibility and ViewVisibility component

#

Note that SpatialBundle is meant to help with ensuring all necessary visibility/transform components exist

brave harbor
#

Ok, I will try that. Thanks!

#

I added the spatial bundle to the parent entity like you suggested, but it still isn't showing up.

#

Its' weird because a different texture, player_head.png, works just fine.

#

and I load it like this:

#
        let texture: Handle<Image> = asset_server.load("player_head.png");
        let layout = TextureAtlasLayout::from_grid(Vec2::new(9.0, 9.0), 2, 1, None, None);
        let layout = texture_atlas_layouts.add(layout);

        parent.spawn(
            HeadBundle {
                sprite: SpriteSheetBundle {
                    transform: Transform::from_xyz(0.0, 0.0, 0.0),
                    texture,
                    atlas: TextureAtlas {
                        layout,
                        index: 0,
                    },
                    ..default()
                },
                head: Head,
                timer: HeadAnimationTimer::default(),
            },
        );