My Player goes through the colliders even I used Rigidbody.MovePosition , Please help me !!

Here is the script, I dont know why it goes through the obstacles. when I reduce the moving speed of player it actually works, but then player is too slow, I think player’s capsule collider is big enough to collide,

public class Controller : MonoBehaviour {

public float moveSpeed = 10f; //moving speed
public float FacingSpeed = 20f; //player roation speed

Rigidbody rigidbodyThis;
public Transform lookingPoint;

public Camera cam; //get the relative direction to the camera

private float horizontal;
private float vertical;

void Start () {
	rigidbodyThis = GetComponent<Rigidbody> ();
}

void FixedUpdate() {
	
	MovePlayer(); //move the player
	
	//look towards mouse position
	Vector3 relativePos = lookingPoint.position - rigidbodyThis.position;
	Quaternion lookdirection = Quaternion.LookRotation(relativePos);
	Quaternion lookdirection_y = Quaternion.Euler(rigidbodyThis.rotation.eulerAngles.x, lookdirection.eulerAngles.y, rigidbodyThis.rotation.eulerAngles.z);
	rigidbodyThis.rotation = Quaternion.Lerp(rigidbodyThis.rotation, lookdirection_y, FacingSpeed * Time.fixedDeltaTime);
	
}

void MovePlayer()
{
	horizontal = Input.GetAxis("Horizontal");
	vertical = Input.GetAxis("Vertical");
	
	Vector3 forword = cam.transform.forward;
	Vector3 right = cam.transform.right;

	forword.y = 0f;
	right.y = 0f;
	
	forword.Normalize();
	right.Normalize();
	
	Vector3 TargetPoint = (right * horizontal + forword * vertical) * moveSpeed;
	rigidbodyThis.MovePosition (rigidbodyThis.position + TargetPoint * Time.fixedDeltaTime);
}

}

Your controller is going through walls when it is diagonally going because you are not normalizing the movement vector. Replace these lines:

Vector3 TargetPoint = (right * horizontal + forword * vertical) * moveSpeed;
rigidbodyThis.MovePosition (rigidbodyThis.position + TargetPoint * Time.fixedDeltaTime);

with this:

Vector3 TargetPoint = right * horizontal + forword * vertical;
rigidbodyThis.MovePosition(rigidbodyThis.position + TargetPoint.normalized * Time.fixedDeltaTime * moveSpeed);

Thanks for the reply, I could not reply earlier due to an internal issue or some what problem. but I used your code and then player started move way more slowly, even I increased the speed of player. I dont understand the issue. but I came across another way to solve, I used character controller instead of just using rigidbody. Thank you