Home   Help Search Login Register  

Author Topic: Question about camera scripting  (Read 691 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Question about camera scripting
« on: 11 Dec 2005, 17:40:33 »
I have this line in my cutscene script

Quote
_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?

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Question about camera scripting
« Reply #1 on: 11 Dec 2005, 17:53:42 »
Try:

Code: [Select]
_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)
« Last Edit: 11 Dec 2005, 17:56:42 by THobson »

Serial Killer

  • Guest
Re:Question about camera scripting
« Reply #2 on: 12 Dec 2005, 00:55:17 »
OK, it's working. Thank you very much.