Jump to content
Sign in to follow this  
dragonsyr

Camera attach and tracking

Recommended Posts

I need to know if there is a way to attach a camera on a moving vehicle and the camera track another object.

---------- Post added at 14:06 ---------- Previous post was at 13:00 ----------

ok i found it

titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [12505.94,7881.93,100]
_camera cameraeffect ["internal", "back"]

#loop
;comment "15:31:51";
_camera camSetTarget vehicle1;
_camera camSetrelPos [2,-20,2];
_camera camsettarget vehicle2;
_camera camPrepareFOV 0.900;
_camera camCommitPrepared 1

goto "loop"

working...

---------- Post added at 14:29 ---------- Previous post was at 14:06 ----------

how can i set number of loops ? is this possible?

---------- Post added at 16:16 ---------- Previous post was at 14:29 ----------

i need something like this

titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [12505.94,7881.93,100]
_camera cameraeffect ["internal", "back"]

#loop
;comment "15:31:51";
_camera camSetTarget rf1;
_camera camSetrelPos [0,-10,0];
_camera camsettarget rf;
_camera camPrepareFOV 1.000;
_camera camCommitPrepared 1
goto "loop" ;for 60 seconds then goto "scene1"

#scene1

;comment "15:35:26";
_camera camPrepareTarget rf;
_camera camPreparePos [11644.01,10114.49,100];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0
~60
;comment "15:35:26";
_camera camPrepareTarget rf1;
_camera camPreparePos [11644.01,10114.49,100];
_camera camPrepareFOV 0.800;
_camera camCommitPrepared 0
~60
_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;

Share this post


Link to post
Share on other sites

Just use a variable that boosts, and if it exceeds a certain limit then stop looping. Kind of like a for/do loop.

Share this post


Link to post
Share on other sites

how? can you explain?

---------- Post added at 19:52 ---------- Previous post was at 19:45 ----------

i found this

Create a trigger that is set to activation "none" and in the condition box write startcount, set the countdown boxes to 20 secs each and in the on activation box write endplaneview = true. 
{titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [12505.94,7881.93,100]
_camera cameraeffect ["internal", "back"]

startcount=true
#loop
;comment "15:31:51";
_camera camSetTarget rf1;
_camera camSetrelPos [0,-10,0];
_camera camsettarget rf;
_camera camPrepareFOV 1.000;
_camera camCommitPrepared 1
? (endplaneview) : goto "nextstep"
goto "loop"
#nextstep
;comment "18:38:32";
_camera camPrepareTarget [70704.44,82796.21,-34028.41];
_camera camPreparePos [11465.79,9828.33,142.57];
_camera camPrepareFOV 0.800;
_camera camCommitPrepared 10
~20
_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;

this working but i get error '(|#|endplaneview)' Error undefined variable in expression :endplaneview.

why ?

---------- Post added at 20:35 ---------- Previous post was at 19:52 ----------

also i found that if i change the ? line to

? (rf distance object)< 100 : goto "nextstep"

working without errors

but why my first script working and give error?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×