Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Particles slow down when mouse is moving
Forum Updated to NodeBB v4.3 + New Features

Particles slow down when mouse is moving

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 860 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imaqt 0
    wrote on last edited by
    #1

    I have the following QML code:

    import QtQuick 2.11
    import QtQuick.Controls 2.0
    import QtQuick.Particles 2.0
    
    ApplicationWindow {
    
        // ...
        id: window
        visible: true
        width: 1200
        height: 300
        title: qsTr("Hello World")
    
        Rectangle{
            id: root
            width: 480; height: 160
            color: "#1f1f1f"
    
            ParticleSystem{
                id: particleSystem
            }
    
            Emitter{
                id: emmiter
                anchors.centerIn: parent
                width: 160; height: 80
                system: particleSystem
                emitRate: 10
                lifeSpan: 6400
                lifeSpanVariation: 500
                size: 32
               velocity: TargetDirection{
                  targetX: 100
                   targetY: 0
                    targetVariation: 100/6
                    magnitude: 100
                }
    
            }
    
            ImageParticle{
                source: "image.png"
                system: particleSystem
                rotation: 15
                rotationVelocity: 45
            }
        }
    }
    

    The code runs as expected, but when my move is moving inside the window everything slows down(the movement speed, the rotation speed). Is this expected behaviour and if so how can i disable it?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      imaqt 0
      wrote on last edited by
      #2

      Can anyone at least confirm that this issue persists in their device please?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jake Kirk
        wrote on last edited by
        #3

        Hi @imaqt-0

        I do not see the delay/slow down in animation that you are experiencing.

        I took your code... (used your imports and more recent import statements). Using your version or this more recent imports did not make a difference:
        import QtQuick 2.11
        import QtQuick.Controls 2.5
        import QtQuick.Particles 2.12

        I do not have your "image.png", I therefore added to the project qrc resource "earth.png" & "sun.png" that I found within the Qt samples. Maybe your PNG is different? Much larger?

        My laptop is recent (uses the built in Intel 620 graphics chip, I don't think it's anything special)
        A Logitech mouse with recent drivers, M310 mouse, etc...

        Have you seen this behavior on other hardware?
        Maybe it's your video card/software driver?
        Or mouse/software. I'd try your code on another device just to see if it's reproducible.

        Best,
        Jake

        1 Reply Last reply
        1
        • I Offline
          I Offline
          imaqt 0
          wrote on last edited by
          #4

          The image isn't important as its reproducible even without it and it's a general problem with any qml animation as far as i can tell. If it doesn't happen on your device it might be a problem with my amd apu.

          J 1 Reply Last reply
          0
          • I imaqt 0

            The image isn't important as its reproducible even without it and it's a general problem with any qml animation as far as i can tell. If it doesn't happen on your device it might be a problem with my amd apu.

            J Offline
            J Offline
            Jake Kirk
            wrote on last edited by
            #5

            @imaqt-0
            I forgot to mentioned that I tested your code on Win10 using the Desktop MSVC2017 64 bit
            (community edition of VC2017) as my tool set.
            What tools set are you using?

            1 Reply Last reply
            0
            • I Offline
              I Offline
              imaqt 0
              wrote on last edited by
              #6

              Win 10 as well, tried with msvc2017 32/64 and mingw 32/64.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved