Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wiiqwertyuiop

Pages: [1]
1
Graphics / Re: Convex Shape issue
« on: December 28, 2023, 09:09:07 am »
That's awesome thanks texus! For now I've switched to using sf::Vertex, since I've noticed this bug isn't present there. But good to know there is a fix for it!

2
Graphics / Re: Convex Shape issue
« on: December 28, 2023, 04:36:51 am »
My only question is why does it go across the whole screen? I'm trying to make it maintain the size.

3
Graphics / Convex Shape issue
« on: December 28, 2023, 12:46:13 am »
I am trying to do some rotation on a object constructed of triangles. For the most part, this works. The issue I am having is at certain points, some of the convex shapes form a "line", and SFML seems to not like it or something. Here is the code I am using:

        sf::ConvexShape drawObj;

        drawObj.setPointCount(3);
        drawObj.setFillColor(sf::Color::Transparent);
        drawObj.setOutlineColor(sf::Color::White);
        drawObj.setOutlineThickness(2.0f);

        drawObj.setPoint(0, sf::Vector2f(249, 258));
        drawObj.setPoint(1, sf::Vector2f(353, 257));
        drawObj.setPoint(2, sf::Vector2f(529, 258));

        window.draw(drawObj);

which produces:



If I modify the middle point so it is further out (257 -> 275), it becomes more "normal":



I'm wondering what the problem is here, or what can be done about this.

Pages: [1]
anything