ArcBall

Author: Vlad Chifor

Description
Use this script to rotate an object in an intuitive way. The mouse input is used to compute a rotation axis and an angular velocity. This idea is based on the ArcBall Rotation Control technique presented in the book Graphics Gems IV by Ken Shoemake.

Usage
Attach this script and a sphere collider to the object. Adjust the sphere radius to your needs. Use the speed and damping variables to tweak the rotation speed.