s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News
jams
Workshop
Steam
open_in_newSteam Workshop
Assets
view_in_arModels textureMaterials apparelClothing
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Components
ThumbnailCamera
chevron_left Components
class
ThumbnailCamera

Constructors

functionsThumbnailCamera

Properties

data_objectFieldOfViewdata_objectFitToBoundsdata_objectFocusdata_objectGizmoDistancedata_objectPaddingdata_objectZoom
ThumbnailCamera
Put this in a prefab to frame its thumbnail - it's rendered from this object's position and rotation instead of auto-framing the whole prefab. Point it at what should be in shot, or turn on Sandbox.ThumbnailCamera.FitToBounds to just set the angle and have the prefab fill the frame.
class Sandbox .account_tree extends Component
sealedSandbox.Engine

build Constructors 1

ThumbnailCamera ()

data_object Properties 6

FieldOfView
float
Keep it narrow and pull the camera back - a long lens flattens the perspective and looks more cinematic than a wide one up close.
FitToBounds
bool
Ignore where the camera is placed - keep its angle, but move it so the prefab's models fill the frame. Good for things that should all sit the same in a grid, like weapons.
Focus
Vector2
Slide the framing toward the interesting end when zoomed in, as a fraction of the fitted frame - x toward the right, y up. Measured before any roll on the camera, so a tilted gun slides along its own length.
GizmoDistance
float
How far ahead to draw the framing in the editor - just a guide, it doesn't affect the render.
Padding
float
Space left around the prefab when fitting, as a fraction of its size.
Zoom
float
Push in past the fit - above 1 crops into the prefab, so long things can run off the edge.

Inheritance

Component
ThumbnailCamera
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter