Wheel.qml Example File

 import QtQuick 2.0
 import Felgo 3.0

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

   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
 //    world: physicsWorld

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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support