Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.6 Android can't change particle color in Emitter.onEmitParticles
Qt 6.11 is out! See what's new in the release blog

Qt 5.6 Android can't change particle color in Emitter.onEmitParticles

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 1.2k Views 2 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.
  • G Offline
    G Offline
    Galbarad
    wrote on last edited by
    #1

    HI all,
    I found problem with my Qml code

    onEmitParticles: {
                for (var i=0; i<particles.length; i++) {
                    var particle = particles[i];
                    particle.x = var_x; // work properly on both Android and Desctop
                    particle.y = var_y;  // too
                    particle.red = var_r;  // this line and all lines below
                    particle.green = var_g; // do not work on Android ((
                    particle.blue = var_b;
                    particle.startSize = var_ss;
                    particle.endSize = var_es;
                }
            }
    

    maybe someone have any ideas?
    thanks for help and good luck

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Galbarad
      wrote on last edited by
      #2

      use few ImageParticle with different colors, you stupid bastard ;)

      1 Reply Last reply
      1
      • GTDevG Offline
        GTDevG Offline
        GTDev
        wrote on last edited by
        #3

        Hi, I already replied to your other post in the game development forum (https://forum.qt.io/topic/73472/qml-particles-any-tutorial).
        You can have a look at V-Play Engine which offers easier usage of QML Particles with the ParticleVPlay type. There's also a ParticleEditor that makes custom particle creation easier.

        Best,
        Günther

        Senior Developer at Felgo - https://felgo.com/qt

        Develop mobile Apps for iOS & Android with Qt
        Felgo is an official Qt Technology Partner

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Galbarad
          wrote on last edited by
          #4
          particle.red = var_r;  // must be a float value 0..1
          particle.green = var_g; // must be a float value 0..1
          particle.blue = var_b; // must be a float value 0..1
          
          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