unity ray from mouse position

PHOTO EMBED

Sat Feb 05 2022 14:14:01 GMT+0000 (Coordinated Universal Time)

Saved by @AnotherFrog #csharp

RaycastHit hit;
Ray ray = camera.ScreenPointToRay(Input.mousePosition);

if (Physics.Raycast(ray, out hit)) {
  Transform objectHit = hit.transform;

  // Do something with the object that was hit by the raycast.
}
content_copyCOPY

https://www.google.com/search?q