Closed keyten closed 9 years ago
can you explain each function in your example?
Of course.
I mean server api (is it possible?). On the client I can change cvars, but I want to manipulate player's camera from server.
player.camera -- special camera (not attached to player). player.camera.activate -- activates special camera instead of main.
For example:
player1.camera.activate()
function MainLoop()
player1.camera.position = player2.position
player1.camera.angles = player2.angles
end
-- allows player1 to see everything player2 sees (like in spectator).
Or:
AddClientCommand('cameraset', function(ply)
ply.camera.position = ply.position
ply.camera.angles = ply.angles
end)
AddClientCommand('cameraview', function(ply)
ply.camera.activate()
end)
-- and 'cameradeactivate'
-- allows any player to set a camera in any place and watch it.
Can't be done, client decides for itself where to place the camera.
^
:(
For example: