I currently have this code:
{
public Transform character;
public float attackSpeed;
void Start()
{
character = this.GetComponent<Transform>();
}
void Update()
{
if (Input.GetAxis("Fire1") > 0)
{
character.Rotate(0, 0, 45, Space.Self);
StartCoroutine(Wait());
character.Rotate(0, 0, -45, Space.Self);
StartCoroutine(Wait());
}
}
IEnumerator Wait()
{
yield return new WaitForSeconds(attackSpeed);
}
and can’t seem to find anything wrong but my object won’t rotate
Any ideas? thx in advance