Even though i know you went for option1 but I thought i’d go ahead and try to do option 3 anyways while we wait for…world models (honestly just for my self enjoyment) or if someone wanted to know if it “could be done”. The way i choose to it was essentially the exact same thing i said above, Convert to world coordinates and then utilize @IdiomicLanguage’s Module to “raycast” in the direction in relation to the viewing frustum. It works pretty well and i believe i did all the math correctly (yay!..hopefully), However i think it could be optimized especially, well specifically, my wedge support function and possibly my ScreenToWorld Conversion function. The only true limitation with this is that if you don’t have a part that is something like a Sphere or Wedge or a normal part, i.e something that isnt easy to dynamically calculate it’s Support your going to have to add it in manually by providing it’s vertices (which isn’t too hard mind you, but it is a downside).
(Result:, sorry for bad quality, oh and btw the rotate model thing is from this post: How to make camera rotate around model in ViewPort Frame while mantaining set distance and angles - #8 by EgoMoose )
Also the reset button is just to reset the colors…
For anyone wondering I’ve tried this in a while loop and a renderstepped and it seems to run at a stable 60-59fps for me.
finally just in case anyone wants the place file:
ViewportFrameRayCasting.rbxl (38.7 KB)