Jump to content
Sign in to follow this  
LaserGuidedBunnyRabbit

Camera problems

Recommended Posts

I'm new to cameras, and what I want to do is make it so that a camera gets placed in a spot, then follows a unit. So, I put a black op, named p1, some waypoints for him, and a marker named testcam1, so then I made a script named cam.sqs, put it in the right directory, then put a trigger that calls it up immediately. I know for a fact that it is executing my script, but nothing happens, here is the code:

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

position = "getMarkerPOS testcam1"

_cam camsetpos position

_cam camcommit 0

_cam camsettarget p1

_cam camcommit 0

I also tried _cam camsetpos "getmarkerpos testcam1", which gave me an error.

Share this post


Link to post
Share on other sites

Try this...

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

_cam cameraeffect ["internal","back"]

_cam camsettarget p1

_cam camsetrelpos [4,3,2]

_cam camcommit 0

this should work

oh, and to explain the camsetrelpos a little for you...

the 4 equals left or right, negative number left, positive right

the 3 equals front or behind, negative number rear, positive front

the 2 equals the height, the higher the number, the higher the camera

Hope this gets you started

wink.gif

Share this post


Link to post
Share on other sites

well, then create an object that isnt going to be moving and put the camera on it instead

Share this post


Link to post
Share on other sites

Try this :

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

_cam cameraeffect ["internal","back"]

position = getMarkerPOS "testcam1"

_cam camsetpos position

_cam camcommit 0

_cam camsettarget p1

_cam camcommit 0

Or this : (efect is the same as above)

_cam = "camera" camcreate getMarkerPOS "testcam1"

_cam cameraeffect ["internal","back"]

_cam camsettarget p1

_cam camcommit 0

If p1 is man in some vehicle you must target that vehicle for camera.

Share this post


Link to post
Share on other sites

thx bud, that worked, now, how to I increase the Z axis a little bit? Also, I set a trigger that when someone steps into an area it executes cam2.sqs, but aparently nothing happens.

It looks like this:

_cam cameraeffect ["internal","back"]

_cam camsettarget t1

_cam camcommit 0

Thx in advance

Share this post


Link to post
Share on other sites

Increasing Z value :

Instead of getMarkerPOS "testcam1"

put :

[getMarkerPOS "testcam1" select 0,getMarkerPOS "testcam1" select 1,(getMarkerPOS "testcam1" select 2) + 2]

Changing last number (+2) will change Z value.

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  

×