Hi everyone,
Im doing a simply game and I have a problem with the collision. I want that when I throw the bird and this one collision with a box, the box move like a real life when something crash with other thing.
I let you the part of my code that I modify.
MyBox.qml FILE:
import QtQuick 2.0
import QtQuick.Window 2.2
import QtQuick.Controls 2.1
import Felgo 3.0
EntityBase {
id: boxElement
entityType: "mybox"
width: 100
height: 100
MultiResolutionImage {
id: box
width: boxElement.width
height: boxElement.height
source: "img/box.png"
}
BoxCollider {
id: collider
width: box.width
height: box.height
bodyType: Body.Static
collisionTestingOnlyMode: true
}
} Bird.qml FILE---> import QtQuick 2.0
import Felgo 3.0
EntityBase {
id: birdElement
entityType: "bird"
property int salud: 3
MultiResolutionImage{
id: bird
height: 75
width: 75
source: "img/pollito.png"
}
BoxCollider {
id: birdCollider
collisionTestingOnlyMode: true
bodyType: Body.Dynamic
height: bird.height
width: bird.width
}
}
Main.qml FILE: PhysicsWorld {
id: world
opacity: 0
updatesPerSecondForPhysics: 60
}
Thank you!