Corgi Engine  v9.1
MoreMountains.CorgiEngine.Zipline Class Reference

A zipline will allow you to travel between two poles (from Pole1 to Pole2) using a grip. It requires a little bit of setup, as you'll need two poles, a line renderer, a grip, and all that bound together. You'll find an example of that in situation in the RetroForest demo scene. More...

Inheritance diagram for MoreMountains.CorgiEngine.Zipline:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Member Functions

virtual void ResetPosition ()
 Resets the position of the zipline More...
 

Public Attributes

LineRenderer BoundLineRenderer
 the line renderer used to draw a line between the two poles More...
 
MMPathMovement Grip
 the Grip object (that should have both a Grip and MMPathMovement component on it) More...
 
GameObject Pole1
 the object to use as the first pole More...
 
GameObject Pole2
 the object to use as the second pole More...
 
Vector3 LineRendererOffset
 the offset to apply from the pole's origins to draw the line renderer More...
 
Vector3 PathOffset
 the offset to apply from the pole's origins to draw the path the Grip will follow More...
 
bool ResetPositionButton
 a debug button to reset the position of this zipline from the inspector More...
 

Protected Member Functions

virtual void Start ()
 On start we prevent our Grip from moving More...
 
virtual void Update ()
 On Update we draw a path and a line renderer between our two poles More...
 

Protected Attributes

Vector3[] _polePositions = new Vector3[2]
 
Vector3 _pole1
 
Vector3 _pole2
 

Detailed Description

A zipline will allow you to travel between two poles (from Pole1 to Pole2) using a grip. It requires a little bit of setup, as you'll need two poles, a line renderer, a grip, and all that bound together. You'll find an example of that in situation in the RetroForest demo scene.

Member Function Documentation

◆ ResetPosition()

virtual void MoreMountains.CorgiEngine.Zipline.ResetPosition ( )
virtual

Resets the position of the zipline

◆ Start()

virtual void MoreMountains.CorgiEngine.Zipline.Start ( )
protectedvirtual

On start we prevent our Grip from moving

◆ Update()

virtual void MoreMountains.CorgiEngine.Zipline.Update ( )
protectedvirtual

On Update we draw a path and a line renderer between our two poles

Member Data Documentation

◆ _pole1

Vector3 MoreMountains.CorgiEngine.Zipline._pole1
protected

◆ _pole2

Vector3 MoreMountains.CorgiEngine.Zipline._pole2
protected

◆ _polePositions

Vector3 [] MoreMountains.CorgiEngine.Zipline._polePositions = new Vector3[2]
protected

◆ BoundLineRenderer

LineRenderer MoreMountains.CorgiEngine.Zipline.BoundLineRenderer

the line renderer used to draw a line between the two poles

◆ Grip

MMPathMovement MoreMountains.CorgiEngine.Zipline.Grip

the Grip object (that should have both a Grip and MMPathMovement component on it)

◆ LineRendererOffset

Vector3 MoreMountains.CorgiEngine.Zipline.LineRendererOffset

the offset to apply from the pole's origins to draw the line renderer

◆ PathOffset

Vector3 MoreMountains.CorgiEngine.Zipline.PathOffset

the offset to apply from the pole's origins to draw the path the Grip will follow

◆ Pole1

GameObject MoreMountains.CorgiEngine.Zipline.Pole1

the object to use as the first pole

◆ Pole2

GameObject MoreMountains.CorgiEngine.Zipline.Pole2

the object to use as the second pole

◆ ResetPositionButton

bool MoreMountains.CorgiEngine.Zipline.ResetPositionButton

a debug button to reset the position of this zipline from the inspector


The documentation for this class was generated from the following file: