https://github.com/clpsplug/unityeasefunction
Ease functions
https://github.com/clpsplug/unityeasefunction
Last synced: about 1 month ago
JSON representation
Ease functions
- Host: GitHub
- URL: https://github.com/clpsplug/unityeasefunction
- Owner: Clpsplug
- License: mit
- Created: 2017-01-06T07:18:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-09T06:37:20.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T03:31:52.828Z (over 1 year ago)
- Language: C#
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity Ease Function
Ease functions I used for other Unity projects because Unity doesn't seem to have any.
Will be adding more functions.
## Features
* Good for faking physical movement
* Can be used to create counter
* Configurable Monomial Shaping Ease Function
* Overshoot / Undershoot controlling
## Examples
```cs
private int frame;
void Start () {
frame ++;
}
void FixedUpdate () {
// Moves this object in an interesting way!
this.transform.position = new Vector3(EaseFunctions.EaseIn(0, 100, 3, frame, 180, false, false), 0, 0);
// Creates frame counter!
Text textComponent = this.gameObject.GetComponent();
textComponent.text = Math.Floor(EaseFunctions.Linear(0, 1, frame, 1, true, false)).ToString();
}
```
## Functions Currently Available
* Linear
* EaseIn
* EaseOut
* Can set its rate freely
## I think I found a bug
Please create new [issue](https://github.com/Clpsplug/UnityEaseFunction/issues/new), thanks!
## Installation
Just put the `EaseFunctions.cs` into Assets folder and it should work!
# License
MIT License