Hi a am super new to coding I am following Brackey’s tutorial to learn unity and there is error on comming in unity while working with variables. The error is titled this "
Assets\Player_movement.cs(19,24): error CS1503: Argument 1: cannot convert from ‘float’ to ‘UnityEngine.Vector3’"
and this is my code
using UnityEngine;
public class Player_movement : MonoBehaviour
{
public Rigidbody rb;
public float forwardforce = 2000f;
// FixedUpdate is used for unity ONLY!!!
// And just to mess with physics LOL!
void FixedUpdate()
{
// Add a forward force
rb.AddForce(0, 0, forwardforce * Time.deltaTime);
if ( Input.GetKey("d") )
{
rb.AddForce(500 * Time.deltaTime, 0);
}
}
}