Tracking camera location relative to world

Hi,

I’m trying to create a system where an interaction system is only usable if the camera is pointed in a certain place relative to the 3d world (the game cursor is locked to the center by the way so mouse.Target wouldn’t work)

Reference:
https://gyazo.com/132cc0045b5e9caf53bdebf2eff934ed

1 Like

You should consult this article: Camera | Documentation - Roblox Creator Hub

It helps identify whether a Vector3 position in the world space is visible on the screen. Well actually it gives you the 2D position of how the 3D point is being displayed on the screen, but if that value isn’t nil then it being displayed on the screen and hence the player can see it.

Hope this helps,
-Tom :slight_smile:

Basicly i want to detect if the center of the screen is hovering over a certain point when the camera is rotated around

You should use Mouse.Hit to detect what the camera is looking for.

If you’re talking about the actual 3D position of the camera you should Camera.CFrame.

Hope this helps,
-Tom :slight_smile: