Forums

OverviewV-Play 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
    V-Play 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 V-Play SDK directory and then in Examples/V-PlaySDK/VPlayTests/basicTests/PolygonItemTest.qml and  Examples/V-PlaySDK/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
    V-Play 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
    V-Play 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
    V-Play 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
    V-Play Team

    If you get multiple arrays, you probably created a concave polygon, which are not supported by V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support