OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Serial Killer on 11 Dec 2005, 17:40:33
-
I have this line in my cutscene script
_camera camSetTarget ldr1
_camera camSetRelPos [-1,1,0]
_camera camSetFOV 0.485
_camera camCommit 0
@camCommitted _camera
It's working fine, but I want that the camera doesn't follow "ldr1". I just want the camera to go near him with SetRelPos command. How do I do this?
-
Try:
_pos = getPos ldr1
_camera camSetTarget ldr1
_camera camSetRelPos [-1,1,0]
_camera camSetTarget _pos
_camera camSetFOV 0.485
_camera camCommit 0
@camCommitted _camera
The reason for setting the target twice is so the camSetRelPos works as you expect (ie on the unit not on a map location)
-
OK, it's working. Thank you very much.