So I don't know if I could ask questions about code, but I am trying to make it so my character could rotate. I tried everything I could think of and still couldn't get it too work. If anyone is reading this, do you know what's wrong?
The Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
private Rigidbody2D rb2D;
private float thrust = 10f;
// Start is called before the first frame update
void Start()
{
transform.position = new Vector3(0f, 0f, 0f);
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("w"))
{
print("Test");
}
if (Input.GetKeyDown("a")){
transform.rotation = Quaternion.Lerp(0f, 0f, transform.rotation * 10);
}
}
}