reskate.camera takes the game’s camera and shows the view your plugin chooses, follows a session player with Spectate’s camera, and reads the camera as it is now. Every function needs the camera permission; calling one without it raises an error. See permissions.
How the camera is shared
- One plugin holds the camera at a time. The first
lookorsettakes it; another plugin’slook,setorfollowis refused with"<plugin> has the camera"until the holder releases it. - The view you give is held until you give another. To move the camera, call
lookorsetagain, usually every tick. - Spectate takes the camera back while it runs, whether the player started it or a plugin did with
follow. Your plugin still holds the camera meanwhile, but its view is not shown:held()says"Spectate has the camera". When Spectate ends, your view is shown again. release()gives the game its own camera back. When the plugin stops (unloaded, reloaded, or stopped for going over a limit), its camera is released the same way, and a Spectate it started withfollowends.
input.flight and input.capture work only while the plugin’s own view is shown.
reskate.camera.look(position, target, fov)
Shows the view from position towards target, upright (no roll). Use it for a camera that watches something.
vector
required
Where the camera is. Finite, within 100 km.
vector
required
What it looks at. Finite, within 100 km, and not the same point as
position.number
default:"the camera's own"
The vertical field of view: 10 to 150 degrees. 0 or nothing keeps the camera’s own.
boolean
True when the plugin holds the camera with this view.
string
Why not:
"<plugin> has the camera" or "<plugin> is following a player with it".Needs the
camera permission. It has no rate limit: call it every tick.reskate.camera.set(position, forward, up, fov)
Shows the view from position along forward, with up giving the camera’s roll. Use it for a camera that flies, banks or turns over.
vector
required
Where the camera is. Finite, within 100 km.
vector
required
The way it looks. Any length but 0.
vector
required
Which way is up on screen. It need not be at right angles to
forward, but it cannot be along it.number
default:"the camera's own"
The vertical field of view: 10 to 150 degrees. 0 or nothing keeps the camera’s own.
boolean
True when the plugin holds the camera with this view.
string
Why not:
"<plugin> has the camera" or "<plugin> is following a player with it".h the right is vector.create(-math.cos(h), 0, math.sin(h)).
forward of no length, an up along forward, or a field of view out of range raises an error.
Needs the
camera permission. It has no rate limit: call it every tick.reskate.camera.follow(player)
Starts Spectate’s camera on a session player, or stops the Spectate this plugin started. If the plugin held the camera with a view of its own, that view is released first.
string or table
A player’s id (
"7656...") or a player table with an id, such as one from reskate.session.players(). nil or nothing stops following.boolean
True when Spectate was asked to follow the player (or to stop).
string
Why not:
"<plugin> has the camera", "not in a session" or "asked more than 4 times in a second".player that is not an id raises an error.
Needs the
camera permission. Shares the budget of 4 control calls a second with skater.noclip, boost, freeze, ai.spawn, animation.play, board.toss and outfit.set.reskate.camera.release()
Gives the game its own camera back, and stops a Spectate this plugin started. Releasing a camera the plugin does not hold does nothing.
Returns nothing.
Needs the
camera permission. The camera is released when the plugin stops whether or not it calls this.reskate.camera.held()
Whether the plugin’s view (or its Spectate) is the one shown now. After look or set, the view takes a moment to be shown.
boolean
True while the plugin’s view is shown, or while the Spectate it started is running.
string
Why not:
"it does not hold the camera", "waiting for the game's camera", "Spectate has the camera", "Spectate is starting", or the game’s reason it cannot show the view now.Needs the
camera permission.reskate.camera.get()
The camera as it is now: the game’s own, Spectate’s, or a plugin’s view.
table or nil
nil when there is no camera to read.Needs the
camera permission.