Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Question about camera scripting  (Read 1093 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.