using UnityEngine;
using System.Collections;

public class SpinControl : MonoBehaviour {

    public float Speed;
    public Vector2 CenterOfMass = Vector2.zero;

    private Rigidbody2D r2;

    void Start()
    {
        r2 = GetComponent<Rigidbody2D>();
        if(CenterOfMass != Vector2.zero)
            r2.centerOfMass = CenterOfMass;
    }

    void FixedUpdate()
    {
        r2.MoveRotation(r2.rotation + Speed);
	}
}
