Hi everyone. I got a simple problem. When my player collides into a wall or a block he goes right through it. He is free moving towards the right at all times. How can I fix this collision effect. And yes I have ridigybody tag along.
sing System.Collections;
public class MovementSpeed : MonoBehaviour {
private Vector3 moveDirection = Vector3.zero;
//private CharacterMotor chMotor;
private Transform tr;
private float dist; // distance to ground
void Start()
{
transform.position = new Vector3(-5,-0.7f,0);
}
void Update()
{
transform.Translate (0.10F, 0, 0 * Time.deltaTime);
}
}