Problem with a collisions

I am trying to make a game similar to some sanctuaries the legend of zelda breath of the wild and I have a problem that when rotating the platform the ball crosses the platform.

My idea of game:

Minute: 2:58

My problem:

The platform must be a kinematic rigidbody, and you must move/rotate it by calling Rigidbody.MovePosition and/or Rigidbody.MoveRotation from FixedUpdate. The ball must be a non-kinematic rigidbody.

Ok thanks I’ll try this

I tried to do it with the rigidbody and the same thing happens to me

My code:

float rotX = Input.GetAxis (“Mouse X”) * rotacion * Mathf.Deg2Rad;
float rotY = Input.GetAxis (“Mouse Y”) * rotacion * Mathf.Deg2Rad;

//transform.RotateAround (Vector3.up, -rotX);
//transform.RotateAround (Vector3.right, -rotY);
rb.rotation = Quaternion.Euler(rb.rotation.eulerAngles + new Vector3(0f, rotacion*(-rotX), 0f));
rb.rotation = Quaternion.Euler(rb.rotation.eulerAngles + new Vector3(rotacion*(-rotY), 0f, 0f));

I’ve tried to do with that but I can not think of how to do it