Forums

OverviewV-Play 2 Support (Qt 5)physics acceleration object over time › Reply To: physics acceleration object over time

OverviewV-Play 2 Support (Qt 5)physics acceleration object over time › Reply To: physics acceleration object over time
#11257

Bas
EntityBase {
    id: entity
    entityType: "ball"

    property int speed: 400

    CircleCollider {
        id: circleCollider
        property alias entity:entity
        radius: 172>>1
        // Entity does not have width and height, therefore we center the CircleCollider in the entity.
//        anchors.centerIn: parent
        // set friction between 0 and 1
        fixture.friction: 0.3
        // restitution is bounciness
        fixture.restitution: 1.0
        fixture.density: 0.3
//        body.angularDamping: 1
//        body.angularVelocity: 0
        force: Qt.point(1000000.0,1000000.0)
        // The ball is a fast and small object therefore, we set the bullet flag to true to get better physic results
        // during collision detection.
        bullet: true
//        body.fixedRotation: true
    }

 

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