:WorldToScreenPoint() Why this Can see behind walls?

this can see the parts behind the walls, how can I solve this problem?

1 Like

What you can do is just raycast from the camera to the world point.

but i have to do it 905 times and repeat hundreds of times xd (pls don’t ask why) does this freezes game?

Yes. This freezes the game. What you are asking for takes a modern raycasting GPU. The :WorldToScreenPoint() method performs a simple mathematical transformation on a point.

What are you trying to do?

1 Like

That’s if Roblox even uses the GPU for ray casting which I see as unlikely.

Hmm, maybe we can find a better solution. For example, using rotated region3 to detect obstructions. So it’s important to say what you want to do.

1 Like

You could pass the part information to a server with any GPU and run a standard rasterizer on it. DirectX3D, OpenGL, Volkan.

Why do you need this to run on 900 parts? What are you trying to do? There are likely better options.