Forums

OverviewV-Play 2 Support (Qt 5)V-Play 2.6 issues › Reply To: V-Play 2.6 issues

OverviewV-Play 2 Support (Qt 5)V-Play 2.6 issues › Reply To: V-Play 2.6 issues
#11292

Günther
V-Play Team

Hi Phil!

Currently, it is not possible anymore to directly access the collider object that is linked with the box2d body.
To get your game to work again, you could introduce a property alias within your entity that allows to access the collider properties.

    EntityBase {
      // ...

      property alias collider: collider

      BoxCollider {
        id: collider
        property string myProperty: "Hello from Collider!"
        // ...
      }
    }

    function myFunction() {
      var body = world.bodyAt(...)
      var entity = body.target
      var collider = entity.collider
      console.log("COLLIDER-PROPERTY: "+collider.myProperty)
    }

Of course, you can also move your properties to the entity and keep the collider clean, if you prefer that.

 

Best,
Günther

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