ELASTIC STRING RENDERER


Elastic String Renderer Preview

The Elastic String Renderer is used to draw elastic cables that can be pulled and bounce back when released.


Creating and editing Cables

See Creating Cables for instructions on how to add renderers to the scene.

Elastic String Renderer Editing

Use the provided Editor Gizmos to set the anchor points (left/right). Use the the yellow handle at the bottom to change Elasticity and the purple one to set the Pull value.

NOTE: It is always best to use the provided handles to move and rotate the cables around in the scene, as some Transform parameters such scale and rotation will be calculated by the renderer itself.


Cable Parameters

Elastic String Renderer Parameters

  • Cable Parameters
    • Elasticity: higher values mean the string will bend more when pulled.
    • Release Strength: how strong and fast the string will return to its idle position.
    • Rigidity: high values means the rebound will decay sooner.
    • Thickness: the "resolution" (pixel size) of the cable. See the FAQs for more details on scaling cables.
    • Edge Smoothness: Applies a fading effect to the edges. Use this as an antialias to blend the cable with background images.
  • Pull Settings
    • Pull: the percentage of the pull strength applied to the string in both directions (-1 to 1). Turn Hold on if you want to see this applied to the string.
    • Hold: when turned on the string will remain in its pulled state and won't bounce back.
  • Color Settings
    • Color Mode: use this to select one of the available coloring modes.
  • Other Settings
    • Static Parameters: turn this on if you don't plan to change the cable parameters during playtime to improve performance (The cable will mantain its starting parameters and any subsequent change will be ignored).
    • Enable Animation in Editor: turn this on if you want to preview the animation inside the editor Scene View.

How to Pull

This is the procedure to achieve realistic pull effects in your game (eg. inside a Coroutine):

  1. Turn Hold on
  2. Increase Pull to the desired value
  3. Turn Hold off

NOTE: turning Hold on when the Elastic string is not still or Pull is not zero will make it jump to its pulled state immediately.
You can use the ElasticStringRender.IsMoving property to check if the string is still moving.