Jump to content

[?] Setting the Camera Lookat Position.


Caneman

Recommended Posts

     setCameraMode(source, "fixed") 
    setTimer(setCameraPosition, 1000, 1, source, -1664.0443,-2218.2202,33.5022) 
    setTimer(steCameraLookAt, 1000, 1, source, -1632.0305,-2242.9973,31.4766) 
  

According to the map, The camera is in the correct position, but the screen, the camera is looking towards the coords 0, 0 , 0 if i am not mistaken, and the camera's position is at 0, 0, 0, but according to the radar, it is in the correct position.

has anyone god any fix for this problem?

Link to comment

Try changing it to:

setCameraMode(source, "fixed")

setCameraPosition ( source, -1664.0443,-2218.2202,33.5022 )

setTimer(setCameraLookAt, 1000, 1, source, -1632.0305,-2242.9973,31.4766)

LookAt can't be set in the same frame as the position due to a bug in dp1. Also you had a typo in your code, ste instead of set. If it still doesn't work, add some chatbox output to see if the code even executes.

Link to comment

Here you go

  
function playerJoin () 
    setCameraMode(source, "fixed") 
        setTimer(setCameraPosition, 1000, 1, source, 2495.1257324219, -1686.6124267578, 153.513834953308) 
        setTimer(setCameraLookAt, 1000, 1, source, 1495.1257324219, -186.6124267578, 120.513834953308) 
    fadeCamera(source,true) 
end 
  
addEventHandler("onPlayerJoin", getRootElement(), playerJoin) 
  

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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