Home   Help Search Login Register  

Author Topic: Moving a camera  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

OrangeLeader

  • Guest
Moving a camera
« on: 03 Jul 2004, 02:36:10 »
I have look at the turoial but still cannot get it. I want to be able to move a camera in a certain distance over a certain time. Also I would like to know how to change the direction of the camera and how to get it to bank up.

Rokket

  • Guest
Re:Moving a camera
« Reply #1 on: 03 Jul 2004, 05:24:04 »
The tutorials are the key, they really work.

But some quick info (which will only really make sense if you read the tutorials):

Use the built-in utility "camera.sqs", it gives you a camera view of the OFP world. You can use the cursor keys and Q (up), and Z (down) to move the camera into the position you wnat. The hit "CTL" key (Control) and this copies the info into the clipboard. Open Notepad or similar, CTL + V and paste it in. It shows camera position and the relevant info. To use "camera.sqs" place this in INIT field of any unit (player or not): [CODE]this exec "camera.sqs"[ENDCODE] - obviously not the "[CODE] part, that;'s just to distinguish the code and quaotes. When done, don't forget to remove that, otherwise you'll only ever get the camera.sqs view.

To move camera, you can simply have camera jump to next position, either instantly ("0" in transition time), or put in fractional seconds (.025 for qtr sec, etc. - that causes camera to sweep to next pos.). You can also use Game Logics as markers, or markers from briefing. To follow a vehicle you'll need the vehiclecam script.

Hope this steers you in right direction, but reread tutes.


OrangeLeader

  • Guest
Re:Moving a camera
« Reply #2 on: 03 Jul 2004, 17:58:23 »
The ctl thing will be helpful and I know how to go to different targets. What I was wondering is how to force  a camera to rotate say 50 degrees then move forward 10 meters, and finally bank up 40 degree relative to the ground. I did not see how to do that in a tutorial yet?
« Last Edit: 03 Jul 2004, 18:00:46 by OrangeLeader »

ponq

  • Guest
Re:Moving a camera
« Reply #3 on: 03 Jul 2004, 19:20:16 »
if you can work with camera.sqs, do this:
-get your first shot
-turn 50 degrees and get your 2nd shot

now set: _camera camcommit 2
this will tell ofp to go from the previous camera position to the current one in about 2 seconds. So if the distance between the two positions is small the cam will travel slow, but if it's big the cam will travel fast.

now get your 3rd shot, go 10m straight from your 2nd position.
play with camcommit to find the right time. 3 should be ok.

Now get your last shot. Aim 40 degrees up and grab that position.

done ;)

hope this helps a bit.

OrangeLeader

  • Guest
Re:Moving a camera
« Reply #4 on: 04 Jul 2004, 03:19:24 »
It's working out great. I had not see this in any of the tutorial I looked at. Thanks. One thing though. Aiming the camera is kind of hard sence you can't use the mouse. Is there a way to fix this by changing a setting or something?

Rokket

  • Guest
Re:Moving a camera
« Reply #5 on: 04 Jul 2004, 05:39:25 »
no, you have to use camera.sqs and physically move about. If you hold down SHIFT you can move forward in FAST mode (doesn't affect other moves' speed). Sometimes I just move my "camera soldier" around closer to where I want to be.

If you have the camera move to a game logic marker, then you can adjust the game logic position slightly, which can be faster and easier than re checking cam stuff with camera.sqs. You can use setpos to bring hieight of game logic unit up to man height.

;=== 17:39:40 I name each shot : CU Soldier 1 or Wideshot all, etc
_camera camSetTarget [8759.96,5074.44,-99926.24]
_camera camSetPos [8757.43,3792.92,65.57] Instead of numeric pos, put Game Logic here
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera


ponq

  • Guest
Re:Moving a camera
« Reply #6 on: 05 Jul 2004, 10:27:28 »
aiming isn't hard at all ;)

-you can use the numeric keyboard (right side of the kb) to move the camview, and the normal move keys to move the cam posisiton.

-you can use + to zoom, which makes picking the right aim much easier, and once you have the right spot, use - to zoom out again, it stays centered on your aim.

If you are aiming at a named target (sold, building etc) you can also do:

_camera camSetTarget NameOfTarget