{"name":"camSetTarget","title":"camSetTarget","type":"command","url":"https://community.bistudio.com/wiki/camSetTarget","revid":369114,"updated":"2024-09-03T10:28:47Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set the target object or position where the given camera should point at. Needs the call of camCommit to be conducted. To reset the target use objNull.","syntaxes":[{"syntax":"camera camSetTarget target","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"target","type":"Object","description":"target location","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"target"}},{"syntax":"camera camSetTarget position","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"position","type":"Array","description":"target location - Position","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_camera camSetTarget player;"]},{"code":["_camera camSetTarget [2540,1503,26];"]},{"code":["_cam = \"camera\" camCreate (player modelToWorld [0, 100, 10]);\n_cam camSetTarget player;\n_cam camSetRelPos [0, 0.5, 1.5];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 1;\nplayer setRandomLip true;"]}],"see_also":["camCreate","camTarget"]}