Forums

OverviewV-Play 2 Support (Qt 5) › DistanceJoint visual representation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8307

    Senad

    Hi,

    Is it possible to show a visual line between two items that are connected

    For example:

    Ball{
    id:ball
    x:100
    y:100
    rotation:0
    radius:20
    }
    
    
    Square{
    id:square
    x:220
    y:180
    rotation:0
    width:40
    height:40
    anchors.top:parent.top
    MouseArea{
    anchors.fill:parent
    onClicked:{
    joint.destroy();
    }
    
    
    }
    }
    
    
    DistanceJoint{
    id:joint
    frequencyHz:15
    dampingRatio:0.5
    collideConnected:true
    bodyA:ball.body
    bodyB:square.body
    world:world
    }
    
    Can there be a thin line that will connect the Ball with the Square.. The line should adjust its rotation as the either items change position.
    #8308

    Christian
    V-Play Team
    #8309

    Senad

    Nice,

     

    Thanks

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