Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

ChickenOutbreak2 Demo

 import QtQuick 2.0
 import Felgo 3.0

 EntityBase {
   entityType: "wheel"
   poolingEnabled: true
   // put them before the windows
   z:1

   Image {
     id: sprite
     source: "../../assets/wheel.png"
     width: 86
     height: 86
     anchors.centerIn: parent
   }

   // outer collider for the wheel
   CircleCollider {
     id: wheelCollider
     sleepingAllowed: false
     density: 0.0005
     friction: 1
     restitution: 0
     radius: 43
     gravityScale: 0
     angularDamping: 2
     x: -43
     y: -43
   }

   // inner collider for the base, around which the wheel rotates
   CircleCollider {
     id: baseCollider
     radius: 5
     density: 0.005
     friction: 0.3
     restitution: 0.2
     fixedRotation: true
     sleepingAllowed: false
     bodyType: Body.Static
   }

   // connecting the colliders to achieve the hanging wheel behavior
   RevoluteJoint {
     id: revolute
     bodyA: baseCollider.body
     bodyB: wheelCollider.body
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded