Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I view the CurrentCamera in lua 2-3 distance back of the player's?

Asked by 3 years ago
Edited 3 years ago

I am creating a grass generation script that I'm currently trying to optimize for maximum efficiency. I've finally gotten :WorldToViewportPoint working and am looking for a way to slightly edit the players current camera when doing this action.

local _, visible = workspace.CurrentCamera:WorldToViewportPoint(GrassFolder[i].Position)
if (visible) then
-- code
end

How could I go about Making CurrentCamera slightly zoomed back for the function, but not the player's in use camera.

I am trying to make it so grass that isn't located slightly outside of the player's view still runs as it will stop unless the stem is visible. Looks odd to those who pay attention to it.

Answer this question