Camera
Per-player camera control, reached through player.Camera: fly-overs, a flight down to a point, and the normal camera.
Per-player camera control, reached through player.Camera (v0.2). The player's game moves its own camera; the server only says what to do. The world streams in around the camera, so a fly-over also loads the city below it.
void FlyOver(Landscape landscape)#
A slow circle above part of the map, e.g. behind a sign-in panel. It starts from wherever the camera is, so it doesn't jump.
| Landscape | Where |
|---|---|
Landscape.Default | Downtown Los Santos |
Landscape.LasVenturas | The Strip |
Landscape.SanFierro | Downtown San Fierro |
Landscape.Orbit(center, radius, height, secondsPerTurn) | Your own: around center, radius metres out, height metres up |
void FlyTo(Vector3 target, float seconds = 2.5f)#
Flies down in a gentle arc to look at target from a few metres behind and above, e.g. the spawn point after sign-in. The camera stays there until the next command.
void Follow()#
Returns to the normal camera behind the player's character. Call it when they spawn.
string Mode#
What the camera was last told: "follow", "flyover" or "flyto".
1player.Freeze();2player.Camera.FlyOver(Landscape.Default);3// ... after sign-in4player.Camera.FlyTo(savedSpot, 2.5f);5// 2.5 seconds later (count time in OnTick):6player.Spawn(Spawn.At(savedSpot));7player.Camera.Follow();8player.Unfreeze();Positions use the same coordinates as Player.Position: metres, Y up.