Hyunsu Posted April 29, 2011 Posted April 29, 2011 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?
diegofkda Posted April 30, 2011 Posted April 30, 2011 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)
Recommended Posts