I don’t know how 3D objects interact with the 2D raycast. I don’t have much experience in the 3D realm.
I remember a project in the past. When they used the 2D raycast it was selecting all of the object in the same column. I think because in a 2D coordinate system the 3D objects are all basically ln the ground. I could be wrong. Their solution was the 3D raycast.
https://forum.gdevelop.io/t/cast-a-ray-does-not-work-on-ipad/52706
The raycasts are in the same event. So, the 2nd ray cast can’t happen unless the first is true. And bc your number of picked isn’t a sub event of the ray cast. The picked number will always be 1 as long as it triggers that events based on the distance check.
I don’t believe the collision picked will ever change.