#Car Movement
1 messages · Page 1 of 1 (latest)
how can i do that?
debug.log(move)
so this is my code atm ```cs
[RequireComponent(typeof(Rigidbody))]
public class CarMovement : MonoBehaviour
{
[SerializeField]
private Rigidbody rb;
Vector3 move;
public float speed;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void Update()
{
float dx = Input.GetAxis("Horizontal");
float dy = Input.GetAxis("Vertical");
move = new Vector3(dx, 0.0f, dy);
rb.AddForce(move * speed);
}
}``` where abouts should i put the (debug) debug.log(move)
after the addforce
void Update()
{
float dx = Input.GetAxis("Horizontal");
float dy = Input.GetAxis("Vertical");
move = new Vector3(dx, 0.0f, dy);
rb.AddForce(move * speed);
debug.log(move);
}```
it should auto fill
do u have ur ide configuerd
does it auto fill code
i dont think so, i always get this message when i open vscode for unity
use vs instead of vsc
wouldnt i be able to do this in vscode though?
you could but for the future vs is way better
and you wouldnt even have this issue
Debug.log
capital d
now we know part of the issue