Skip to content

Latest commit

 

History

History
121 lines (107 loc) · 4.16 KB

README.md

File metadata and controls

121 lines (107 loc) · 4.16 KB

Lerp Control For Unity

Logo

Easily lerp your Gameobjects!


Table of Contents
  1. About
  2. Functions
  3. Getting Started
  4. Additional Notes
  5. Example
  6. Contact

About

Made with Unity C# Beginner
Wanting to move your Gameobjects back and forth easily?
This code is here just to do that.

Functions

  • Control the speed and duration of a lerp gameobject.

Getting Started

Visitors

  • Open Unity and add a Cube to the scene.
  • Attach the LerpControl.cs script to the Cube.
  • Specify the Start Position and End Position of your gameobject.
  • Set the speed and duration.
  • Press Play in your editor see the magic of LerpControl.

Additional Notes

  • If the current position is your start position, just check the Get Start Position.
  • Play around with the Speed and Duration in Play mode.
  • Set another cube in the scene to where you want the end position to be, copy the position and paste it in your End Position.

Example

LerpControlSample LerpControlInspector

Quick and easy setup.


Variable Annotation
Get Start Position If enable, the current position of your gameobject will be set to the Start Position.
Repeatable Endless looping of the lerp function.
Copy X Copies the X axis from the Start Position.
Copy Y Copies the X axis from the Start Position.
Copy Z Copies the Z axis from the Start Position.
Start Position Specifies the Start Position in Vector3.
End Position Specifies the End Position in Vector3.
Speed Controls the speed of the lerp.
Duration Controls the duration of the lerp.

Contact

Twitter LinkedIn

(back to top)