Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    createPoly() is broken for concave polygons!

    Bug Reporting (FUZE 4 Nintendo Switch)
    3
    5
    231
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vinicity
      vinicity F last edited by vinicity

      When drawing a filled concave polygon with creatPoly(), the resulting shape is not colored correctly.

      This is what happens when I try to draw a filled polygon with four points:

      createPolyProblem3.jpg
      I would not expect the area below and to the left of 0-1 and 1-2 to be filled.

      It appears that as long as the polygon is convex, it works as expected, but for concave polygons, the color fill is not drawn correctly.

      The program is shared here:
      ID: 55C63MND5C

      1 Reply Last reply Reply Quote 2
      • vinicity
        vinicity F last edited by

        I really hope this gets fixed, as it is kind of a blocker for my new game.

        Until that time, if anyone has any insight on how to draw concave polygons using triangles or similar instead, feel free to share...

        1 Reply Last reply Reply Quote 0
        • D
          DaddyJDM last edited by DaddyJDM

          As you describe, the best approach is likely to divide the concave polygons into convex polygons, such as triangles. I am unaware of how to do that automatically, but I would be optimistic that tesselation or triangular mesh algorithms should be "out there" to at least help.

          1 Reply Last reply Reply Quote 1
          • PickleCatStars
            PickleCatStars F last edited by

            Well that’s a shame. I was planning to use that myself sometime. I dare say it’ll be fixed long before I get around to it though :P

            1 Reply Last reply Reply Quote 1
            • vinicity
              vinicity F last edited by

              Turns out it was pretty easy to switch to using triangles instead!

              1 Reply Last reply Reply Quote 3
              • First post
                Last post