I built the breakout game in the Tutorials on this site, but my paddle takes almost a second to respond to player inputs. I’ve bumped the control Gravity and Sensitivity to 100000 each, I’ve made all unnecessary objects inactive, and tried adding impulse to the paddle, but nothing seems to help. Paddle scripting included below. Please help!
using UnityEngine;
using System.Collections;
public class Paddle : MonoBehaviour {
public float paddleSpeed = 1f;
private Vector3 playerPos = new Vector3 (1.34f, -3f, 0);
// Update is called once per frame
void Update () {
float xPos = transform.position.x + (Input.GetAxis ("Horizontal") * paddleSpeed);
playerPos = new Vector3 (Mathf.Clamp (xPos, -7f, 10f), -3f, 0);
transform.position = playerPos;
}
}