wiki.sine.space | sinespace

Scripting/STrailRenderer

From wiki.sine.space
Revision as of 14:50, 22 December 2020 by Voidtech (Talk | contribs)

Jump to: navigation, search

Members

Clear

void Clear ();

Removes all points from the TrailRenderer. Useful for restarting a trail from a new position.

Space.Host.ExecutingObject.TrailRenderer.Clear()


GetPosition

SVector GetPosition (int index);

Get the position of a vertex in the trail.

vectorPos = Space.Host.ExecutingObject.TrailRenderer.GetPosition(0)



Properties

Alignment

int Alignment { get;set; }

No documentation

Space.Host.ExecutingObject.TrailRenderer.Alignment = 1


Autodestruct

bool Autodestruct { get;set; }

Does the GameObject of this Trail Renderer auto destruct?

Space.Host.ExecutingObject.TrailRenderer.Autodestruct = true


CastShadows

bool CastShadows { get;set; }

Does the trail cast a shadow when a shadow-casting Light shines on it?

Space.Host.ExecutingObject.TrailRenderer.CastShadows = true


Enabled

bool Enabled { get;set }

Whether this TrailRenderer component is Enabled or not

Space.Host.ExecutingObject.TrailRenderer.Enabled = true


EndColor

Scolor EndColor { get;set; }

Set the color at the end of the trail.

Space.Host.ExecutingObject.TrailRenderer.EndColor = Color.Red


EndWidth

float EndWidth { get;set; }

The width of the trail at the end of the trail. A width of 1 corresponds to 1 unit in the game world.

Space.Host.ExecutingObject.TrailRenderer.EndWidth = 0.1


IsVisible

bool IsVisible { get; }

Is this renderer visible in any camera?

Space.Log(Space.Host.ExecutingObject.TrailRenderer.IsVisible)


MinVertexDistance

float MinVertexDistance { get;set; }

Set the minimum distance the trail can travel before a new vertex is added to it. Smaller values with give smoother trails, consisting of more vertices, but costing more performance.

Space.Host.ExecutingObject.TrailRenderer.MinVertexDistance = 1


MotionVectors

bool MotionVectors { get;set; }

Set whether to use motion vectors to track this Renderer’s per-pixel, screen-space motion from one frame to the next. You can use this information to apply post-processing effects such as motion blur.

Space.Host.ExecutingObject.TrailRenderer.MotionVectors = true


NumCapVertices

int NumCapVertices { get;set; }

Set this to a value greater than 0, to get rounded corners on each end of the trail.

Space.Host.ExecutingObject.TrailRenderer.NumCapVertices = 3


NumCornerVertices

int NumCornerVertices { get;set; }

Set this to a value greater than 0, to get rounded corners between each segment of the trail.

Space.Host.ExecutingObject.TrailRenderer.NumCornerVertices = 2


PositionCount

int PositionCount { get; }

Get the number of line segments in the trail.

numLineSegments = Space.Host.ExecutingObject.TrailRenderer.PositionCount


ReceiveShadows

bool ReceiveShadows { get;set; }

Does this object receive shadows?

Space.Host.ExecutingObject.TrailRenderer.ReceiveShadows = true


StartColor

SColor StartColor { get;set; }

Set the color at the start of the trail.

Space.Host.ExecutingObject.TrailRenderer.StartColor = Color.Black


StartWidth

float StartWidth { get;set; }

The width of the trail at the spawning point. A width of 1 corresponds to 1 unit in the game world.

Space.Host.ExecutingObject.TrailRenderer.StartWidth = 1.1


TextureMode

int TextureMode { get;set; }

Choose whether the U coordinate of the trail texture is tiled or stretched. 0 Stretch, 1 Tile, 2 Distribute Per Segment, 3 Repeat Per Segment

Space.Host.ExecutingObject.TrailRenderer.TextureMode = 2


Time

float Time { get;set; }

How long does the trail take to fade out. (seconds)

Space.Host.ExecutingObject.TrailRenderer.Time = 10


UseLightProbes

bool UseLightProbes { get;set; }

Enable Light Probes on the trail.

Space.Host.ExecutingObject.TrailRenderer.UseLightProbes = true


WidthMultiplier

float WidthMultiplier { get;set; }

Set an overall multiplier that is applied to the TrailRenderer.widthCurve to get the final width of the trail.

Space.Host.ExecutingObject.TrailRenderer.WidthMultiplier = 2