Blaawee Posted October 24, 2012 Posted October 24, 2012 -- Value = positionX, positionY, positionZ, lookAtX, lookAtY, lookAtZ local cameraPos = { [ camera [1] ] = ' 1525.5999755859, 2833.5, 36.299999237061, 1524.8000488281, 2833.3999023438 , 35.299999237061 ', [ camera [2] ] = ' 1464.4000244141, 2840.8999023438, 82.400001525879, 1453.5999755859, 2833.6999511719, 74.400001525879 ', [ camera [3] ] = ' 1469.5, 2815.3000488281, 44.799999237061, 1470.0999755859, 2822.8000488281, 44.799999237061 ' --[ camera [4] ] = ' x, y, z, lookAtX, lookAtY, lookAtZ ', } local currentCamera = 0 function setCameraPos() fadeCamera(source, true, 5) setCameraMatrix( source, cameraPos[currentCamera + 1] ) end
Aibo Posted October 24, 2012 Posted October 24, 2012 -- Value = positionX, positionY, positionZ, lookAtX, lookAtY, lookAtZ local cameraPos = { { 1525.5999755859, 2833.5, 36.299999237061, 1524.8000488281, 2833.3999023438 , 35.299999237061 }, { 1464.4000244141, 2840.8999023438, 82.400001525879, 1453.5999755859, 2833.6999511719, 74.400001525879 }, { 1469.5, 2815.3000488281, 44.799999237061, 1470.0999755859, 2822.8000488281, 44.799999237061 }, --{ x, y, z, lookAtX, lookAtY, lookAtZ }, } local currentCamera = 0 function setCameraPos() fadeCamera(source, true, 5) setCameraMatrix( source, unpack(cameraPos[currentCamera + 1]) ) end ?
Blaawee Posted October 24, 2012 Author Posted October 24, 2012 Thx that's work, but it doesn't changed the others camera matrix -- Value = positionX, positionY, positionZ, lookAtX, lookAtY, lookAtZ local cameraPos = { { 1525.5999755859, 2833.5, 36.299999237061, 1524.8000488281, 2833.3999023438 , 35.299999237061 }, { 1464.4000244141, 2840.8999023438, 82.400001525879, 1453.5999755859, 2833.6999511719, 74.400001525879 }, { 1469.5, 2815.3000488281, 44.799999237061, 1470.0999755859, 2822.8000488281, 44.799999237061 }, --{ x, y, z, lookAtX, lookAtY, lookAtZ }, } local currentCamera = 0 function setCameraOnPlayerJoin() fadeCamera(source, true, 5) setCameraMatrix( source, unpack(cameraPos[currentCamera + 1]) ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) function updateCamera() if (currentCamera == 3) then currentCamera = 0 else currentCamera = currentCamera + 1 end end setTimer(updateCamera, 5000, 0)
Aibo Posted October 24, 2012 Posted October 24, 2012 eh. it shouldn't, because camera matrix applied only to the source of onPlayerJoin event. ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now