I have this simple auto acceleration ship movement script for my racing game (it’s in javascript)
var movementSpeed = 80;
var rotationSpeed : float = 100.0;
function Update () {
transform.position += transform.forward * Time.deltaTime * movementSpeed;
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
rotation *= Time.deltaTime;
transform.Rotate (0, rotation, 0);
}
but because of the way it’s set up it’s causing the player’s ship to phase through walls even if I have a collider and rigibody attached to it, how can I fix this?