Home Unreal Engine

Cascade: Best method for "tracers"?

polycounter lvl 12
Offline / Send Message
Cybergooch polycounter lvl 12
I'm working on an effect where I'm emulating the tracers one might see from the barrel of a machine gun. I want to see some rotation, as if there's not a lot of accuracy to the shots.
Here's the problem: I'm stretching the particles out a lot so that they're pretty long, which actually causes two problems...
First, although I'm getting some random rotation, the rotation occurs from the center of the emitter.
Second, since I've stretched out the sprites, I'm not just seeing them in front of the weapon, I'm seeing them behind it as well.

So the effect I'm after is to see the particles only from the tip of the gun barrel outward.

Any suggestions about what to do here? It's almost like I need to offset the point of rotation, but I don't know if that would even work since I've scaled (stretched) out the sprite so much.

Thanks!

Replies

  • imbueFX
    Offline / Send Message
    imbueFX polycounter lvl 5
    As far as I know, there is no way to adjust the pivot point of a particle (unless someone else knows how, I'd love to hear it).

    But there is a method we use to get around this. You could make a simple mesh that is off center. Meaning: It has one end starting at 0,0,0, and the other going towards positive X (it doesn't have to be positive X, but that's the standard we set for all of our fx). So since the particle's pivot is always centered, but our mesh is only going in one direction, it will look like it's pivoting on the end, not center. And since it's a mesh, you aren't wasting fillrate doing a similar method with a texture.

    Let me know if this makes sense, otherwise I can try and give a better visual example.
  • LoTekK
    Offline / Send Message
    LoTekK polycounter lvl 17
    A quick and dirty way is to make your sprite texture only occupy half the texture. :p You'll have to figure out which half (top/bottom/left/right), but once you've done that, you've basically got the particles rotating about the "end" of the particle.
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    I'd suggest taking a look at the stinger from UT3. It's probably very much the kind of effect you're after (except being blue, of course).
  • Cybergooch
    Offline / Send Message
    Cybergooch polycounter lvl 12
    Thanks for the replies...I'll experiment with both the mesh and the half-empty sprites.

    ambershee: where do I find this stinger to check it out?
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    UT3 = Unreal Tournament 3.
Sign In or Register to comment.