Jump to content

The function to set viewpoint of player camera attached.


Hyunsu

Recommended Posts

we can set camera's position or lookat.

but we don't set naturally viewpoint of camera that is attached to player.

so i want to add this function.

setCameraViewpoint(float x, float y, float z)

or

setCameraMatrix to change.

do i know wrong information?

Link to comment
we can set camera's position or lookat.

but we don't set naturally viewpoint of camera that is attached to player.

so i want to add this function.

setCameraViewpoint(float x, float y, float z)

or

setCameraMatrix to change.

do i know wrong information?

two ways

  
function timers() 
    setTimer (camera, 50, 0) 
end 
addCommandHandler ("mycam", timers) 
  
function camera() 
      x, y, z = getElementPosition (getLocalPlayer()) 
      setCameraMatrix (x+1, y+1, z, x, y, z, 0, 10) -- camera will follow player with 10 FOV. 
end 

or this

  
function timers() 
        setCameraTarget ( getLocalPlayer() ) 
end 
addCommandHandler ("mycam", timers) 

for change a camera point:

function timers() 
     thecameramatrix = setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
  
function changing(xpar, ypar, zpar) 
     x, y, z = getCameraMatrix ( getLocalPlayer()) 
     setCameraMatrix (x, y, z, tonumber(xpar), tonumber(ypar), tonumber(zpar)) 
end 
addCommandHandler ("setcameramatrix", changing) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...