Jump to content
Sign in to follow this  
Rejn

Camera (setting the angle to look down)

Recommended Posts

Hi, Ive got an intro and my camaer moves along a road using xyz coords instead of settarget.

1) Im just wondering how do I alter the camera to look up or down?

I played around with camsetdive and camsetbank but didnt notice any changes...

2)

Also How do I change the direction of the camera over a period of 5 or so seconds.. I can get it to change but it snaps into place making it look a tad unproffessional.. It says you need to use it with camcommit but Im not sure how...

I am using camsetdir -90 etc

Share this post


Link to post
Share on other sites

@1

Use camSetDive within trigger or script

Quote[/b] ]_camera camSetDive -0.1

Positve values for looking up, negative for down.

Biki link

@2

[camera name] CamCommit [time in seconds]

in your script.

example:

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

_cam cameraeffect ["internal", "back"]

_cam camsettarget westsoldier1

_cam camsetrelpos [0,20,5]

_cam camcommit 0

@camcommitted _cam

~5

_cam camsettarget westsoldier2

_cam camsetrelpos [0,-20,5]

_cam camcommit 5

@camcommitted _cam

~2

_cam cameraeffect ["terminate", "back"]

camdestroy _cam

exit

Now what the hell does this do, you ask. Let's break it down, line by line.

_cam = "camera" camcreate [0,0,0] Creates a new camera, at [0,0,0], and calls it "_cam"

_cam cameraeffect ["internal", "back"] Sets the way the pitcure looks

_cam camsettarget westsoldier1 Sets the target for teh camera to focus on

_cam camsetrelpos [0,20,5] Sets the relative position of the camera to 20m in front of the target, and 5m above it.

_cam camcommit 0 Tells the camera it has 0 second to move from [0,0,0] to the westsoldier's position.

@camcommitted _cam Halts the script until the camera is in it's new position

~5 have the script wait five seconds

_cam camsettarget westsoldier2 changes the camera's target to westsoldier2

_cam camsetrelpos [0,-20,5] Sets the relative position of the camera to 20m behind of the target, and 5m above it.

_cam camcommit 5 Tells the camera it has 5 seconds to move from westsoldier1's position to westsoldier2

@camcommitted _cam halsts the script until the camera is in it's new position

~2 wait 2 seconds

_cam cameraeffect ["terminate", "back"] set the camera view back to the player

camdestroy _cam destroys the camera object

exit exits the script.

Example taken from Cinematics tutorial 1 for OFP

For further info, examples, tools search google for OFP camscripting

Share this post


Link to post
Share on other sites

Thanks for the reply however it doesn't help me at this point.

Im quite confident in camera scripting when dealing with a camera target. However Im trying to break free from that and am using xyz co-ords.

I cannot for the life of me get setdive to work...

heres my script:

Quote[/b] ]_cam = "camera" camcreate [13601.9,9032.55,100]

_cam camsetpos [13645.6,9106.82,100]

_cam setdir -150

_cam cameraeffect ["internal", "back"]

_cam camcommit 0

@camcommitted _cam

~0

_cam camsetpos [13645.6,9106.82,10]

_cam camsetdive -0.9

_cam cameraeffect ["internal", "back"]

_cam camcommit 10

@camcommitted _cam

~0

_cam camsetpos [13515.4,8882.09,10]

_cam cameraeffect ["internal", "back"]

_cam camcommit 20

@camcommitted _cam

~0

_cam camsetpos [13475.8,8852.54,10]

_cam setdir -130

_cam cameraeffect ["internal", "back"]

_cam camcommit 10

@camcommitted _cam

~0

_cam camsetpos [13475.8,8852.54,10]

_cam setdir -90

_cam cameraeffect ["internal", "back"]

_cam camcommit 5

@camcommitted _cam

~0

_cam camsetpos [13420.1,8848.8,8]

_cam cameraeffect ["internal", "back"]

_cam camcommit 20

@camcommitted _cam

~10

endcut=true

_cam cameraeffect ["terminate", "back"]

camdestroy _cam

Can someone tell me if im doing something wrong? thanks.

I'd like to know 2 things:

1) albeit having a camcommit time of 20 or less seconds .. setdir forces the camera to turn in given direction immeadiatley. Would like to know how to change that...

2) setdive... how can i get it to work D:

Share this post


Link to post
Share on other sites

bump. I would really love it if someone could tell me the answer to this. I hate using camsettarget but i do need to know if i can alter camera angles etc with camsetpos. thanks

Share this post


Link to post
Share on other sites

Bump can anyone at least tell me how to nullify the camera target? So that I can change the angle via setcamera target but then remove it so the camera is not fixed on that point? Thanks.

Share this post


Link to post
Share on other sites

I cant answer your question directly, but I've just got into camera scripting and I've been using the position points that come as part of the invisible targets objects in the add on 'Map Misc' by Mapfact  (www.mapfact.net) to good effect. These are basically invisible markers that show up in the mission editor but not in the mission map, you can name them, setPos them to any height you want by editing their init fields, and give them some of the same attributes as other objects.

What I do is place them on the map where I think I want the camera(s) to be and then setPos them to the height I want them (http://community.bistudio.com/wiki/setPos), you then end up with camSetPost and camSetTarget lines that look like this:

_cam camSetPos cam1

_cam camSetTarget cam2

where 'cam1' and 'cam2' are the names of the two position points placed via the mission editor. When you run the script, the cameras get spawed at these markers, and the great part is that you can then switch back to the editor, physically move the position points, change the height, re-preview and see how the changes work visually on the cut scene.

If you setPos cam1 in the example above higher than cam2, then you will have a looking down effect which can easily be adjusted, panned, zoomed etc. via scripting - angle too great? No problem, set the height of cam1 closer to that of cam2 and re-preview. Once the cut scene is over you can delete the markers, move them somewhere else, reuse them, or just leave them where they are.

Share this post


Link to post
Share on other sites

hey that sounds like a good idea thanks biggrin_o.gif

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  

×