Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Help with Particle Movement

Discussion in 'Scripting' started by theTalorian, Jul 14, 2018.

  1. theTalorian


    Jun 26, 2018
    I'm just getting into unity programming and working my way through some tutorials and exercises, but I've run into a hiccup. I apologize if this has been addressed before, but I couldn't find anything on it in the forums so here goes.
    I was working my way through the "Controlling Particles via Script" tutorial here:
    I assume that I'm just doing something wrong, but I've gone over it a few times now and I don't think I missed any steps. The issue that I'm having is that the particles coming off of the ParticleLauncher emitter are supposed to be behaving like bullets, or in this case paint balls, fired from a gun. Once fired they should pretty much follow a straight line along their initial orientation (based on the direction of the gun upon emission) until they collide with something, at which point they die and kick off some other particle effects to leave paint on the walls and floors.
    What I'm getting instead is more of a whip behavior. Even though the particle simulation is set to world space, the emitted particles are still reacting to movement of the emitter, so moving the gun to the left or right causes the shots that were already fired to follow suit, if a bit lagged behind. If I fire several shots at one wall I can quickly turn around and have the paintballs splat against the wall that was behind me when I fired.
    My understanding was that if the particles were being simulated in the World space then changes to the position and orientation of the emitter would have no effect on the particles that were already emitted, but that simply doesn't seem to be the case, and it is making the end shooting effect really weird.
    So that's my issue. What am I missing / mis-understanding about this setup? I've tried tweaking and playing around with several different settings with no luck. If its revealing at all I've also found that the gun sometimes gets "stuck", as in for a little while it won't matter what direction I'm pointing in, all of the shots will continue to go off in one of its older positions.
    Is it possible that it's some versioning difference? The tutorial was certified for version 5.5, but I'm using 2018. Is there something else I need to add to the particle system to further break the chain from the emitter?
    I find the whole scenario rather perplexing, so any help or insight would be greatly appreciated. Thanks in advance!