Hi,
CameraVPlay does not work (it only zooms , but does not drag ) , when a child item has a MouseArea defined, but when I remove the MouseArea from the child item it drags and zooms properly.
In the next example the last red rectangle ( at the center ), it does not drag the view , but if you remove the MouseArea it allows it.
Is this an intended feature?
import Felgo 3.0
import QtQuick 2.0
GameWindow {
activeScene: gameScene
EntityManager {
id: entityManager
entityContainer: gameScene.container
}
Scene {
id: gameScene
// set scene alignment
sceneAlignmentX: "left"
sceneAlignmentY: "top"
CameraVPlay {
id: camera
// set the gameWindowSize and entityContainer required for the camera
gameWindowSize: Qt.point(gameScene.gameWindowAnchorItem.width, gameScene.gameWindowAnchorItem.height)
entityContainer: container
// if you don't set the focusedObject property, or set it to null, the camera is freely movable
focusedObject: null
// set the camera's limits
limitLeft: 0
limitRight: 600
limitTop: 0
limitBottom: 400
}
Item {
id: container
// 5 green rectangles to make the player's movement visible
Rectangle {
x: 0; y: 0
width: 32; height: 32
color: "green"
}
Rectangle {
x: 568; y: 368
width: 32; height: 32
color: "green"
}
Rectangle {
x: 568; y: 0
width: 32; height: 32
color: "green"
}
Rectangle {
x: 0; y: 368
width: 32; height: 32
color: "green"
}
Rectangle {
x: 284; y: 184
width: 32; height: 32
color: "red"
MouseArea{
anchors.fill: parent
}
}
}
}
}