3D raycasting

Just a quick question, I haven’t messed around with raycasting before, but I’m just wondering if it’s possible to detect a 3D object relitive to the screen. Which I would assume would be through a raycast. Any information about this would help, cheers

3D raycasting would be a nightmare to code (and probably pretty laggy), but it’s definitely possible. But what do you mean by “detect a 3D object relative to the screen?” There might be some alternatives that don’t require raycasting.

Like for example if I could tap on a 3D object to “select” it, or even to see what 3D object is in the middle of my view, I’d guess one way would to compare the camera angle to the atan2’s of the objects in the screen

@Peary @Ignatz found a way to find what object was touched without any math: https://coolcodea.wordpress.com/2013/05/30/70a-touching-an-object-on-a-3d-screen/

Ok, but I actually looked into the comments on a post you did on converting a 3D point to a 2D screen relative point and I think I am going to use that because it’s a fairly straight forward. Thanks for your fast response I see you comment and help loads of people on here and I would just like to say thanks for helping the codea community be what it is today

@Peary - check out the recent posts on the right here. I’ve taken the best ideas off the forum to go both ways between 2D and 3D

https://coolcodea.wordpress.com