Beginner Tutorial Help (SpaceShooter)


Stuck on the coding to create a barrier for my space shooter game. followed the tutorial exactly but up pops the error message: error CS1729: The type UnityEngine.Vector3' does not contain a constructor that takes 4’ arguments.

any help appreciated.

Full code: public class PlayerController : MonoBehaviour
public float speed;
public float xMin, xMax, zMin, zMax;

void FixedUpdate ()
	float moveHortizontal = Input.GetAxis ("Horizontal");
	float moveVertical = Input.GetAxis ("Vertical"); 

	Vector3 movement = new Vector3 (moveHortizontal, 0.0f, moveVertical);

	GetComponent<Rigidbody>().velocity = movement * speed;

	GetComponent<Rigidbody> ().position = new Vector3 
			Mathf.Clamp (GetComponent<Rigidbody> ().position.x, xMin, xMax),
			0, 0f,
			Mathf.Clamp (GetComponent<Rigidbody> ().position.z, zMin, zMax)



0, 0f,

should be: