I’m just starting out with all of this & this is a super basic question, but I haven’t been able to find a solution that works anywhere.
I have a 2d sprite which moves around using the in-built physics system & I need it to face the direction it’s moving, but I need it to rotate around slowly not just turn instantly.
Here’s the script as it stands in case that helps:
public float movespeed;
private Rigidbody2D rb2d;
void Start()
{
rb2d = GetComponent<Rigidbody2D>();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector2 movement = new Vector2(moveHorizontal, moveVertical);
rb2d.AddForce(movement * movespeed);
}
Thanks in advance for the help