A full rotation is divided into 24 segments. This means if you rotate the shaft clockwise halfway, you will have a rotation value of 12 and -12 if you rotate counterclockwise.
What ports can I use it on?
1,2,7,8
Code
var amountOfRotation = Magic.modules.spin.rotation;
using Magic;
public class Demo : MonoBehaviour
{
// create a reference to the module
public Magic.Modules.SpinModule spin;
void Start()
{
}
void Update()
{
// access the property of the module
int amountOfRotation = spin.rotation;
Magic.Modules.SpinModule.SpinDirection direction = spin.direction;
}
}