Hi all,
I’ve noticed something off with MovementAnimations. There seems to be a pause or ‘jitter’ as the position of the player changes. I’ve created a simple example that demonstrates this:
import Felgo 3.0
import QtQuick 2.0
GameWindow {
id: gameWindow
activeScene: scene
screenWidth: 960
screenHeight: 640
EntityManager {
id: entityManager
entityContainer: scene
}
Scene {
id: scene
width: 480
height: 320
Rectangle {
id: background
anchors.fill: parent
color: "black"
}
StyledButton {
id: startButtonn
text: "Restart"
anchors {top: parent.top; right: parent.right}
onClicked: player.x = parent.width
}
Item {
id: player
height: 100
width: 10
x: parent.width
y: parent.height / 2
Rectangle {
id: shape
anchors.fill: parent
color: "white"
radius: 5
}
MovementAnimation {
id: movement
target: player
property: "x"
velocity: -75
running: true
}
}
}
}
Press the button to restart and view it again. I’ve looked at the QML profiler and nothing seems out of the ordinary. Any clues on what’s causing this? Is there an alternative to achieve the desired effect, or a way to mitigate against the visible pauses? The actual object I noticed this with only needs to move on the x axis at a constant velocity.
Cheers!