﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotateWithForce : MonoBehaviour
{
    public float torque;
    public Rigidbody rb;
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        rb.AddTorque((transform.forward + transform.up) * torque);
    }
}
