I have the following code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tetris : MonoBehaviour
{
void Update()
{
transform.Translate(new Vector3(0, -3 * Time.deltaTime, 0) );
CheckUserInput();
}
void CheckUserInput(){
if (Input.GetKeyDown(KeyCode.Space))
{
transform.Rotate(0, 0, 90);
}
}
How to make the object fall normally every time it is rotated?