This is the code:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public float paddleSpeed = 1F;
public Vector3 playerPos; new Vector3(0,0,0);
void Update ()
{
float yPos = gameObject.transform.position.y + (Input.GetAxis ("Vertical") * paddleSpeed);
playerPos = new Vector3 (-22,Mathf.Clamp(yPos, -11,11),0);
gameObject.transform.position = playerPos;
}
}
But I am getting this error saying:
Assets/Scripts/Paddle.cs(7,47): error CS1519: Unexpected symbol `0’ in class, struct, or interface member declaration
Any help will be appreciated.