Skip to content

eriseven/Unity-Touch-Smoothing-One-Euro-Filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityTouchSmoothing

A unity implementation of Exponential Smoothing and the One Euro Filter in CSharp.

How To Use:

  1. Add the script to a Game Object.
  2. Set the public variables.
  3. For Exponential Smoothing, set Alpha to 1 and decrease until jitter is reasonable. Alpha closer to 0 increases lag.
  4. For One Euro Filter, set Jitter Reduction to 1 and Lag Reduction to 0. Increase the values to reduce jitter and lag.
  5. When implementing, call OneEuroFilter and use filteredPosition instead of Input.GetTouch(0).position.

Comments:

I will work on making a struct so that it takes all touches from Input.touches and has filteredPosition for each touch. Any suggestions can be emailed to me at slek120@gmail.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%