using UnityEngine;
using System.Collections;

namespace mgaia.Utils
{
    /// <summary>
    /// Extensões para RigidBody
    /// </summary>
    public static class RigidbodyExtensions
    {
        /// <summary>
        /// Seta as constraints para que o rigidbody opere em modo 2D forçado
        /// </summary>
        /// <owner>Victor</owner>
        public static void Set2DMode(this Rigidbody rigidBody)
        {
            rigidBody.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY;
        }
    }
}