Commit 2583e66a authored by Gus Grubba's avatar Gus Grubba

Merge pull request #2136 from dogmaphobic/artificialHorizon

Fix artificial horizon (it was stuck)
parents 783bfcd1 f6166d4b
......@@ -35,6 +35,9 @@ Item {
property real pitchAngle: 0
clip: true
anchors.fill: parent
property real angularScale: pitchAngle * root.height / 45
Item {
id: artificialHorizon
width: root.width * 4
......@@ -67,12 +70,12 @@ Item {
}
transform: [
Translate {
y: root.visible ? pitchAngle * 4 : 0
y: angularScale
},
Rotation {
origin.x: artificialHorizon.width / 2
origin.y: artificialHorizon.height / 2
angle: root.visible ? -rollAngle : 0
angle: -rollAngle
}]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment