I have a sphere which can fall onto multiple planes based on a mouse click. i have a Raycast which points down to the plane to see exactly what it is about to hit. how do i ensure that the sphere will always fall to the center of the plane that the sphere detects regardless of where i click on the selected plane?
If the planes you’re using are the Unity primitives, just use the plane position instead of the hit point:
...
var hit: RaycastHit;
if (Physics.Raycast(..., ..., hit)){
targetPoint = hit.transform.position;
...