SFML community forums

Help => General => Topic started by: baguettio on March 07, 2020, 08:56:01 pm

Title: All sprites disappear when i scale up any sprites. [solved]
Post by: baguettio on March 07, 2020, 08:56:01 pm
    Sprite player;
    player.setTexture(blue);
    player.setColor(Color(0, 255, 0));

    Sprite sprite1;
    sprite1.setTexture(blue);
    sprite1.setPosition(Vector2f(0, 700));


Works fine, but this:

    Sprite player;
    player.setTexture(blue);
    player.setColor(Color(0, 255, 0));

    Sprite sprite1;
    sprite1.setTexture(blue);
    sprite1.setPosition(Vector2f(0, 700));
    sprite1.setScale(10.f, 0.f);


causes sprite1 to not be drawn, or registered in my collision system, similar issue happens when I try and add a third sprite.
Title: Re: All sprites disappear when i scale up any sprites.
Post by: Hapax on March 07, 2020, 09:01:50 pm
That's because its height is zero after scaling.
Title: Re: All sprites disappear when i scale up any sprites.
Post by: baguettio on March 07, 2020, 09:08:38 pm
why am i this stupid
Title: Re: All sprites disappear when i scale up any sprites.
Post by: Hapax on March 07, 2020, 09:10:03 pm
Everyone makes these errors all the time. Don't worry about it! :D