PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetLargestCutoffDistance

This function is used by ‘PopperCam’ in the default camera scripts to ensure obstructions do not come between the Camera and the Camera|Camera’s subject.

This function will check all BasePart|BaseParts and Terrain in the Workspace with the following exceptions:

  • Any Instance specified in the ignoreList (including its descendants) will be ignored
  • BasePart|BaseParts with BasePart/CanCollide set to false are ignored
  • BasePart|BaseParts with a BasePart/Transparency greater than 0.95 will be ignored
    Water Terrain is ignored

Note, as this function requires an ignoreList to run, you should pass an empty table when none is required.

Parameters

Name Type Default Description

An array of Instance|Instances to ignore. Descendants of these instances will also be ignored.

Returns

Return Type Summary

The distance, in studs, that the Camera needs to be pushed towards its Camera/Focus to ensure there are no obstructions between the Camera/Focus and Camera/CFrame of the Camera