<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Need Help: Wander affector - some particles never wiggle, and xVariance seems to do nothing]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I'm playing with the Wander affector in <code>QtQuick.Particles</code> and I'm stuck on something weird.<br />
My setup: a simple rocket emitter shooting particles straight up from the bottom of the window. I added a Wander on the rocket group to make them drift left and right a bit, like they're wobbling in the wind. I also added a <code>TrailEmitter</code> so I can see the actual path each particle takes.<br />
Here's the code.</p>
<pre><code>import QtQuick 2.5
import QtQuick.Particles 2.0

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Rocket Wander Test")

    Rectangle {
        id: root
        width: parent.width
        height: parent.height
        color: "#1F1F1F"

        ParticleSystem {
            id: particleSystem
        }

        ImageParticle {
            id: trailPainter
            system: particleSystem
            groups: ['trail']
            source: "assets/particle.png"
            color: "cyan"
            alpha: 0.6
        }

        ImageParticle {
            id: rocketPainter
            system: particleSystem
            groups: ['rocket']
            source: "assets/rocket.png"
            entryEffect: ImageParticle.Fade
        }

        Emitter {
            id: rocketEmitter
            anchors.bottom: parent.bottom
            width: parent.width; height: 40
            system: particleSystem
            group: 'rocket'
            emitRate: 2
            maximumEmitted: 4
            lifeSpan: 5200
            lifeSpanVariation: 400
            size: 64
            velocity: AngleDirection { angle: 270; magnitude: 150; magnitudeVariation: 10 }
        }

        TrailEmitter {
            id: pathTrail
            system: particleSystem
            group: 'trail'
            follow: 'rocket'
            emitRatePerParticle: 30
            lifeSpan: 6000
            size: 6
            sizeVariation: 1
            velocity: PointDirection { x: 0; y: 0 }
        }

        Wander {
            groups: ['rocket']
            anchors.fill: parent
            system: particleSystem
            affectedParameter: Wander.Position
            pace: 150
            xVariance: 1200
            yVariance: 0
        }
    }
}
</code></pre>
<p dir="auto">I expected that, every rocket wiggles left and right by some amount, and turning <code>xVariance</code> up makes the wiggle wider. But instead this is what I'm seeing:</p>
<p dir="auto">Some rockets wiggle, some come out as a perfectly straight line, even though they all go through the same Wander block. I attached a screenshot showing this (some straight trails, some wavy trails, side by side).</p>
<p dir="auto">I ran the same test four times, only changing <code>xVariance</code> each time (500, then 700, then 900, then 1200). The wiggle width looked exactly the same every single time. Changing <code>xVariance</code> did not seem to make the wiggle any wider or narrower.<br />
The only thing that changing <code>xVariance</code> from 500 to 700 to 900 to 1200 affected was how much of the x axis range it covered, not the wiggle amplitude itself.</p>
<p dir="auto">I tried making the Wander region smaller and moving it (using <code>anchors.horizontalCenter</code> and a fixed width instead of <code>anchors.fill: parent</code>). With this setup, nothing wiggled at all, no matter what I set <code>xVariance</code> to (I tried 30 and 500, both flat lines). I also attached a screenshot of this test.</p>
<p dir="auto">So right now it looks like, <code>xVariance</code> does not seem to control how wide the wiggle is.<br />
Whether a rocket wiggles at all seems to depend on something else, maybe where it spawns, or where the Wander box sits on screen, but I have not been able to pin down what exactly.</p>
<p dir="auto">Has anyone run into this before? Is there something about how Wander picks which particles to affect, or how <code>xVariance</code> is supposed to work, that I am missing? Any pointers to the actual source or a working example would help a lot.<br />
Thanks in advance.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/c91b5c4a-7b0b-44a5-82e1-64755c8bbe02.png" alt="x500.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/f1192074-0ec5-473c-bd0e-e2d425311f17.png" alt="x700.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/4107f786-a8c9-4b79-afe1-96668e6cde59.png" alt="x900.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/ca6a7dd8-548b-4845-a040-ceda9d398386.png" alt="x1200.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/164857/need-help-wander-affector-some-particles-never-wiggle-and-xvariance-seems-to-do-nothing</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 22:30:28 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164857.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Jul 2026 06:45:53 GMT</pubDate><ttl>60</ttl></channel></rss>