Rigid Body.MovePosition() not detecting collisions

Hi!

I’m trying to make a character controller for a 3rd person game, it just have to move in all directions and move with the camera rotation.

It’s all working fine but the collisions. I can’t detect collisions and I think the parameters are all correct (even the collision detection is set to continous).

At low speed the collisions work, but it should work at any speed.

Here is the movement code:

void moveCharacter(Vector3 direction)
    {
        // Convert direction into Rigidbody space.
        direction = rb.rotation * direction;
       
        rb.MovePosition(rb.position + direction * speed * Time.fixedDeltaTime);
      
         
    }

and this the FixedUpdate:

 private void FixedUpdate()
    {
xAxis = Input.GetAxis("Horizontal");
        yAxis = Input.GetAxis("Vertical");
  inputsKeys = new Vector3(xAxis, 0, yAxis);
      
        inputNormalized = inputsTeclas.normalized;

        if (Input.GetMouseButton(1))
        {
            Cursor.visible = false;
         
        else
        {
            Cursor.visible = true;
        }

     


        moveCharacter(inputsNormalized);
    }

Thanks for all

Use velocity instead. Moveposition just changed the position, so if you skip over a collider, it doesn’t register it.

I tried but I don’t know how to apply the rotation to the rigidbody

angularVelocity