Collision problem

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);
		}
	}

Okay frist off, RigidBody is not a tag, its a component. Making your tag "rigidbody’ would do absolutely nothing. All moving objects that you wish to collide with other objects need a RigidBody component.

Second, all objects that are party to a collision need to have a Collider component as well, moving or not.

Third, make sure your colliders are NOT set to isTrigger and that your RigidBody components are not set to “isKinematic”.

Hello GhostDre,

When you move a GameObject using transform.Translate() Unity does not apply physics to it, so it won’t collide with anything.

Try using a Rigidbody or a CharacterController and you should be ok