The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:TrailEmitter

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 :: Object >> ParticleEmitter >> TrailEmitter

Description[edit]

General[edit]

A Trail emitter is used when creating some sort of effect that 'follows' a specific object as it moves. The way the effect is accomplished is by taking the desired texture and stretching it to the desired length and then following the projectile at that given length untill the projectile is no longer flying.

Additional effects are applied to the texture, ColorScale and SizeScale (see ParticleEmitter) are two you'll likely want to play with first.

The behaviour of TrailEmitters in UT2003 and earlier builds behaves differently, however. Instead of trailing behind the Emitter, the trails are more like a thrown ball of toilet paper - the individual particle moves, and a trail follows IT - this means that the movement of the thing to be trailed has to be defined when the particle is created. The rest of the text on this page refers to TrailEmitters in UT2004 and later builds.

Particle Life[edit]

This is affected by a number of things. It would be best to think of each unit worth of trail to cost x points in the total trail length. Therefore when MaxPointsPerTrail is exceeded by x*(somedistance) the first point get's removed to make room for new points.

Providing this does not come into play we have to deal with PointLifeTime and it's very similar cousin LifetimeRange. Both specify a specific amount of time that pieces of the trail exist. Therefore, the smaller value between these two variables is going to be the one that defines the life of your trail points.

Properties[edit]

var ETrailShadeType TrailShadeType 
enum ETrailShadeType
{
	PTTST_None,				// Full particle color
	PTTST_RandomStatic,		// particle color * random opacity set once
	PTTST_RandomDynamic,	// particle color * random opacity, updated every tick
	PTTST_Linear,			// smooth linear fade out (begining = 100%, end = 0%)
	PTTST_PointLife			// linear fade relative to point's life
};
var ETrailLocation TrailLocation 
enum ETrailLocation
{
	PTTL_AttachedToParticle,	// Attached to Particle
	PTTL_FollowEmitter			// Attached to Particle, with added emitter's velocity
};
var int MaxPointsPerTrail 
This defines the 'complexity' of the emitter, the lower the value is, the smaller the MAXIMUM distance is from the projectile to the end of the trail.
var float DistanceThreshold 
The maximum length of any given segment of the trail. If you set it to zero, the engine will hang.
var it MaxTrailTwistAngle 
var float PointLifeTime 
This controls the amount of time *in seconds?* that pieces of the trail will stay visible. This is not an ultimate definition of the life of pieces of the trail, however.
var bool UseCrossedSheets 
Although this is a guess, it looks like this applies the texture 2 times, one at a *rotation* 90 degrees from that of the first. This both makes the trail look a little more complex but increases overall trail brightness as well.
var transient array<ParticleTrailData> TrailData 
var transient array<ParticleTrailInfo> TrailInfo 
var transient vertexbuffer VertexBuffer 
var transient indexbuffer IndexBuffer 
var transient int VerticesPerParticle 
var transient int IndicesPerParticle 
var transient int PrimitivesPerParticle