Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I’m trying to write a script that lets me click anywhere in the viewport and returns the exact 3D coordinates of the point where the click ray intersects with an object’s surface. If no object is under the click, it should fallback to returning the point on the grid.
So far, I’ve tried using pickPoint(), but it only returns points projected on the grid, ignoring objects. I also tried building a ray with mapScreenToWorldRay and using intersectRayScene, but I can’t get it to correctly detect the first surface hit by the click ray.
Any ideas how this can be achieved? Would really appreciate any suggestions...
Solved! Go to Solution.