I have tried to run this code:
using UnityEngine;
public class Cube : MonoBehaviour
{
void Update()
{
if (Input.GetKeyDown (KeyCode.D))
GetComponent():AddTorque(0, 5, 0);
else if (Input.GetKeyDown (KeyCode.I))
GetComponent():AddTorque(0, -5, 0);
}
}
but it won´t work because it has an error:
Assets\Scripts\Cube.cs(9,38): error CS1513: } expected
thanks if someone helps