Home   Help Search Login Register  

Author Topic: moving camera  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

fragsta

  • Guest
moving camera
« on: 26 Aug 2003, 00:36:37 »
how do you make a camera (using scripts) that is in the front of a moving vehicle, eg. a plane?

GrimMonkey

  • Guest
Re:moving camera
« Reply #1 on: 26 Aug 2003, 01:13:09 »
http://www.ofpec.com/editors/browse.php?browsewhat=2&start=25

Look for the 'attaching a camera to a vehicle script'.  :)

fragsta

  • Guest
Re:moving camera
« Reply #2 on: 26 Aug 2003, 22:15:49 »
thanx......y didnt i think of that? oh yeah, im stupid

B-2-0

  • Guest
Re:moving camera
« Reply #3 on: 01 Sep 2003, 16:56:57 »
A'ight Fragsta, here is a vehicle-cam script i use m8 ;)

;--Vehicle-cam----------------------------------------------------------

vehiclecamstop = false
#loop

_cam = "camera" camcreate [0,0,0]

_cam cameraeffect ["internal", "front"]

_cam camsettarget Car

_cam camsetrelpos [1, -6, 1.5]

#commit
_cam camcommit 0


_cam camsettarget Car
_cam camcommit 0

~0.01

? NOT(vehiclecamstop) : goto "loop"  


_cam cameraeffect ["terminate", "back"]
camdestroy _cam
;------------------------------------------------------------------


Just change the 'Car' to the name of the vehicle u want to target and u can change the X, Y, Z co-ordinates to determine where u want the cam to be in relation to the vehicle.

U will need to set a trigger where u want the cam to end with vehiclecamstop = true in the 'on activation' field to return to normal play ;)
« Last Edit: 01 Sep 2003, 17:03:56 by B-2-0 »

fragsta

  • Guest
Re:moving camera
« Reply #4 on: 02 Sep 2003, 12:15:49 »
Doesnt it need a _car = _this select 0 and in the init line put [car] exec vehiclecam.sqs?

max_killer_payne

  • Guest
Re:moving camera
« Reply #5 on: 02 Sep 2003, 18:50:21 »
No, B-2-0s way is fine. I cam up with a similiar idea, which was similiar to B-2-0s way. Basically it went like this:

_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "front"]

#camloop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0
@camcommitted _cam
goto "camloop"


But we never managed to find away of how to end a loop.  :(

fragsta

  • Guest
Re:moving camera
« Reply #6 on: 03 Sep 2003, 18:50:22 »
thanks guys...eventually i will be able to make a GOOD cutscene with all you guys help!