Forums

OverviewV-Play 2 Support (Qt 5) › PolygonItem in V-Play 2

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #7965

    Martin

    Hey,

    we are currently trying to port our code to V-Play 2 and it seems that PolygonItem is not supported yet. Are there any plans or alternatives for this? Advise is greatly appreciated since our level construction relies on it. Could you add it in one of the upcoming releases?

    Cheers Martin

    #7967

    Christian
    V-Play Team

    Hi Martin,

    thanks for your upvote for PloygonItem! We will add it to the upcoming release..

    Cheers, Chris

    #7968

    Christian
    V-Play Team

    Do you also need the texture property or only the drawing part?

    More specifically, which of the PolyognItem properties are you using at the moment?

    Cheers, Chris

    #7974

    Martin

    Hey Chris,

    We use color filled polygons, no textures.

    Cheers, Martin

    #11856

    Paweł

    Hi,

    is there any chance to use texture or clip properties already?

    I’m trying to create an item which can be cut into pieces.

    #11874

    Günther
    V-Play Team

    Hi Pawel!

    Yes, you can use the texture property already to fill the specified polygon with a texture (which is clipped to fit the polygon and repeated in x,y dimensions if necessary). Another way to achieve a similar effect would be to use an OpacityMask to hide certain areas of an Item. (maybe this solutions works better for your idea).

    Best,
    Günther

    #11893

    Paweł

    The problem is I cannot see the texture property.

    import VPlay 2.0
    import QtQuick 2.0
    
    ...
    
    Scene {
    	
    	...
    
    	PolygonItem {
    		id: polygon
    
    		anchors.centerIn: logo
    		vertices: [
    			Qt.point(0, 0),
    			Qt.point(100, 0),
    			Qt.point(50, 100)
    		]
    
    		//texture: "../../assets/img/splash/logo.png" //not visible
    	}
    }

    QtCreator says “Invalid property name”. I am using the VPlayBase Plugin v1.0.13.

    However OpacityMask works just fine. Thanks! :)

    #11897

    Günther
    V-Play Team

    No problem!

    It’s true that we missed to add the property to the auto-completion, I corrected that just now and it should work for the next update.

    Anyhow, the property should be usable even without auto-completion. I tried the texture-feature in a demo project myself and had no problems. Also, the PolygonItem is unrelated to any plugins – maybe your error came from somewhere else?

    Best,
    Günther

     

    #11899

    Paweł

    I’ve tried it now and it works fine. Probably my bad. Thank you again :)

    Btw. I’ve noticed that there is the same auto-completion issue with localAxisA from PrismaticJoint. However it worked like a charm for the first time 😉

    #11902

    Günther
    V-Play Team

    Cool – thanks for helping to solve these auto-completion problems 😀

Viewing 10 posts - 1 through 10 (of 10 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