using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical)
rigidbody.velocity = movement;
}
}
The last line of code rigidbody.velocity = movement; is not recognized by unity. I followed every single step that the tutorial told me to do and I have checked the done examples and my friends have looked it over and so has my teacher. No one understands why it won’t work. I have re-created my Unity space shooter game for the second time. I do not understand what I have done wrong. PLEASE HELP!!!
Here is the tutorial i was following to move my player. I have everything he does except my game won’t run and it does not register my “rigidbody.velocity”…
Space Shooter - Unity - Moving the Player