Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › PolygonCollider visible?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #4326

    Thomas

    Hello!

    I want to create a non-linear world by using PolygonColliders. in the end it should be something like a cave.

    But how can i make the borders of the collider visible? is there a way? or to fill them with a color?

     

    Cheers,

    TS

    #4328

    Christian
    Felgo Team

    Hi,

    if you are a Pro subscriber, you could use the (yet undocumented) PolygonItem for that, which is available since version 1.1. You will find examples for it in the Felgo SDK directory and then in Examples/FelgoSDK/VPlayTests/basicTests/PolygonItemTest.qml and  Examples/FelgoSDK/VPlayTests/basicTests/SimplePolygon.qml.

    Cheers, Chris

    #4344

    Thomas

    okay, thanks for the advice!

    is it somehow possible to visually “draw” some points of the PolygonItem? Or is it only possible by calculations and guesstimates?

     

    Cheers,

    TS

    #4347

    Christian
    Felgo Team

    What do you mean with some points of a PolygonItem? What it does, is drawing a polygon around its vertices. For debugging, you can also enable the QML renderer and have a look at the physics debug shapes there. To enable the QML renderer, go to main.cpp and comment the line

    vplayApplication.setQmlRendererEnabled(false);

    Cheers, Chris

     

    #4358

    Thomas

    OK, i just wanted to know, if it is possible to draw the polygon in the designer, so i can see, where my polygon is and what it looks like in the level.

    my polygon should be a wall, and the object should not collide with the wall.

    #4372

    Christian
    Felgo Team

    Hi, what do you mean with the “designer”? Do you really need a polygon for the wall, isnt a BoxCollider sufficent?

    Cheers, Chris

    #4407

    Thomas

    i want to create a cave, where the object flies through.. so for the level borders, a BoxCollider is sufficient enough, but to create a way from start to finish, it looks kinda strange with so many BoxColliders.

    And designing a Cave with a visual designer would be much easier than either putting BoxColliders one to another or to guess the points of a Polygon..

     

    Cheers

    TS

    #4409

    Christian
    Felgo Team

    Ah now I get what you meant 😉

    There is an awesome tool called Physics Editor which you could use to generate vertices from an image. You could then export the file and inser the vertices into the PolygonCollider.

    Cheers, Chris

    #4418

    Thomas

    hey!

    thanks, thats a really practical tool.

    all i want to know now is, which exporter is best-suited for a PolygonCollider? i tried with Plain Text, Box2D pList and Box2D XML. But each of them creates multiple arrays, allthough i only created one.. though its a big one.

     

    Cheers,

    TS

    #4441

    Christian
    Felgo Team

    If you get multiple arrays, you probably created a concave polygon, which are not supported by Felgo yet?

    Can you make up your world of multiple convex polygons?

    Cheers, Chris

    #4443

    Thomas

    yes, i just included all the polygons in my level and it somehow works nearly correct. some little issues with rounding errors, i guess, but thats no problem.

    Thx for the advice of using this tool, it really helped me a lot.

     

    Cheers,

    TS

Viewing 11 posts - 1 through 11 (of 11 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded