Jump to content
Sign in to follow this  
Litos

Following aircraft with the camera

Recommended Posts

Hey, I want to make a film about airplanes, but I'm not sure how I'd be able to get good shots of it because you can't follow them. You can use F, but that's only going to keep the camera looking at their direction, and you are able to move in closer, but is it possible to fix the camera at some point so that it follows the plane by looking AND going after it?

And also is it possible to do or script advanced camera movements such as rolling?

Share this post


Link to post
Share on other sites

There's at least 2 ways you can do this:

1. The traditional way is to have a looping script that continually updates the camera position relative to the object

while {true} do {
_cam camsettarget _vcl;
_cam cameraeffect ["internal", "back"];
_cam camsetrelpos [0, -5, 2];
_cam camcommit 0.01;
sleep 0.01;
};

or

2. Use the attachTo command to fix the position of the camera relative to the object

_cam CamSetTarget _vcl;
_cam CameraEffect ["INTERNAL","Back"];
_cam CamCommit 0.01;
_cam attachTo [_vcl, [0,-5,2]];

(no looping script required).

Each method has its pros and cons so its really up to you to decide which one you choose.

A pannable camera script is more complicated and I could possibly send you something that will allow you to do that if its wanted

Edited by norrin

Share this post


Link to post
Share on other sites

Thanks, but I'm a bit noob at this, where exactly do I put those codes, and how do I use them further in game (activate them, or drop out, or w/e), and how do I set it at a specific angle, can I still move the camera when using it (for example if I want to rotate around the plane) etc...

Share this post


Link to post
Share on other sites

Mate when I get home tonight I'll send you a script that will allow you to do this. You'll be able to view the units from different perspectives eg. 1st and 3rd person, top down and there will also be a free camera mode that can be scrolled around and zoomed in and out of an object. Then all you'll need is Fraps to capture your footage.

Share this post


Link to post
Share on other sites

Thanks man, thanks a lot, can't wait.

Do you know anything about stuff like camera rolling for example? Man I wish you could do the kind of stuff with the camera here like in trackmania. Their camera is more complex, and you have to tell it where to go which makes it hard to smoothen it, but if you do, it is so top notch.

Share this post


Link to post
Share on other sites

JULY 2009 - norrin

With thanks to OFPEC (http://www.ofpec.com/index.php) for providing me with the code for the free camera.

Description

A simple full screen camera script that provides a range of camera modes and allows switching to any unit on the map that maybe useful for the budding film or machinima maker.

Download

http://norrin.org/downloads/ArmA2/spectate/NORRN_cam_02.utes.rar

Movie

Implementation

1. Copy NORRN_cam into your mission directory

2. Copy the description.ext into your mission directory or modify your existing

description.ext by adding the following code:

#include "NORRN_cam\NORRN_cam_dialog.hpp"

3. Add the init.sqf or modify your existing init.sqf by adding the following code:

[]execVM "NORRN_cam\start_cam.sqf";

4. When the mission starts your unit should get an action to start the camera

How the camera works

W/S keys - toggle between different camera modes

* 3rd person

* Top down - use mouse scroll wheel to increase/decrease distance away from the camera

* Front side

* 1st person

* Free cam - right click to the left or right of the target to rotate the camera, note the near the target you are on the screen the slower it will rotate. Mouse wheel increases decreases distance away from camera

* Static cam that follows target - for this cam set your view in the free cam then when you swap to this cam it will remain stationary while following the target - can be used for flybys etc.

A/D keys switch between targets

N key toggles night vision mode for Top down, front side, Free and static cameras

H - key swicthes off the camera and allows you to regain control of your unit.

You can then restart the camera using the action.

And remember once you've got your camera angle set just move your mouse cursor off the screen when you start recording with FRAPS.

Edited by norrin

Share this post


Link to post
Share on other sites

Thank you very much! I'm going to test it out later today.

I only got one question. Is it possible to align the mouse wheels controls to something else, or to a joystick? Because using the mouse wheel will not create a smooth camera closing in effect, it'll stumble across each time that I turn the mouse wheel.

Also, are the zoom in/zoom out options still present?

Thanks!

Share this post


Link to post
Share on other sites

Never tried to to attach a key handler to a peripheral device so I'm not sure how I'd go about that. Maybe you can link the throttle control on your joystick to the scroll wheel in the game settings? If not let me know and I'll try and attach the zoom in and out function to a key press which may work better with a joystick. That being said it will be a few weeks before I get a chance to look at this again - sorry.

Share this post


Link to post
Share on other sites

Ok, thanks. I'll try something.

edit: Ok well thanks a lot, it worked for my friend so I'm sure it'll work for me whenever I test it.

Edited by Litos

Share this post


Link to post
Share on other sites
JULY 2009 - norrin

With thanks to OFPEC (http://www.ofpec.com/index.php) for providing me with the code for the free camera.

Description

A simple full screen camera script that provides a range of camera modes and allows switching to any unit on the map that maybe useful for the budding film or machinima maker.

Download

http://norrin.org/downloads/ArmA2/spectate/NORRN_cam_02.utes.rar

Movie

Implementation

1. Copy NORRN_cam into your mission directory

2. Copy the description.ext into your mission directory or modify your existing

description.ext by adding the following code:

#include "NORRN_cam\NORRN_cam_dialog.hpp"

3. Add the init.sqf or modify your existing init.sqf by adding the following code:

[]execVM "NORRN_cam\start_cam.sqf";

4. When the mission starts your unit should get an action to start the camera

How the camera works

W/S keys - toggle between different camera modes

* 3rd person

* Top down - use mouse scroll wheel to increase/decrease distance away from the camera

* Front side

* 1st person

* Free cam - right click to the left or right of the target to rotate the camera, note the near the target you are on the screen the slower it will rotate. Mouse wheel increases decreases distance away from camera

* Static cam that follows target - for this cam set your view in the free cam then when you swap to this cam it will remain stationary while following the target - can be used for flybys etc.

A/D keys switch between targets

N key toggles night vision mode for Top down, front side, Free and static cameras

H - key swicthes off the camera and allows you to regain control of your unit.

You can then restart the camera using the action.

And remember once you've got your camera angle set just move your mouse cursor off the screen when you start recording with FRAPS.

that's a little complicated. I just want to get key functions so I can close a camera when I action into it. I would also like to use the mouse to tilt and pan and zoom and stuff. This is what I have right now for my C130's nose cam so far.

showCinemaBorder false;
_cam = "camera" camcreate (position _vehicle);
_cam CameraEffect ["EXTERNAL","FRONT"];
_cam CamCommit 1;
_cam camSetFov 1;
cameraEffectEnableHUD true;
_cam attachTo [_vehicle, [0,18,-8]];

Right now it's just a straight forward view from the nose of the plane. My goal is to drop it a bit, and add a 180 degree pan and 90 degree dive. The problem I am having is that the camera hijacks my controls, and I don't know how to bring back my menus and stuff. I also am unsure how to enable these camera tilts via mouse without some serious study. Any tips would be great, thanks.

Share this post


Link to post
Share on other sites

The following camera is the result of activating an action while the player is in the _vehicle variable:

disableSerialization;
_vehicle = _this select 0;
_cam = "camera" camcreate (position _vehicle);
_cam CameraEffect ["EXTERNAL","FRONT"];
_cam attachTo [_vehicle, [0,18,-8]];
showCinemaBorder false;
cameraEffectEnableHUD true;
_cam CamCommit 1;
_cam camSetFov 1;

edit*

I got the camera working on the C130 now. Nose cam with flir script allows me (from co-pilot seat) to enter a nose cam with the flir script and then return to the co-pilot seat by pressing the Y key. All I need now is camera panning and I am set.

Edited by stuguy

Share this post


Link to post
Share on other sites

Wow that sounds really cool. Keep posting up here if you figure out the panning. Sounds interesting, maybe I could use it in a movie.

Share this post


Link to post
Share on other sites
Thanks, but I'm a bit noob at this, where exactly do I put those codes, and how do I use them further in game (activate them, or drop out, or w/e), and how do I set it at a specific angle, can I still move the camera when using it (for example if I want to rotate around the plane) etc...

Hi, I had this favorited a while back, I was wondering THIS exact question, is it possible to get this posted plz

Share this post


Link to post
Share on other sites

The placement of these codes can be done in the init field of a unit or object in the mission editor, or in text files named anything.sqf, saved into the mission directory on your computer where the mission.sqm is located (documents\arma2\missions\etc. I like using Arma Edit for my text editor when writing these codes. Or you can use notepad. If you want to hammer out or copy paste scripts into the mission editor's unit's init fields, be my guest, but that gets messy, and difficult to troubleshoot where you went wrong with commands.

Share this post


Link to post
Share on other sites

yea but how do you attach the camera to a vechile?? thats really my only big confusion here

Share this post


Link to post
Share on other sites

So pretty big noob here, does anyone feel like helping me out ALOT? Alls i need to know is how to edit the norrcam mission in the editor...Thanks!

Edited by Purplehasiso

Share this post


Link to post
Share on other sites

Very helpful!

I have been looking to try and script cameras for a movie I am making. Very hard to get solid help on how to script them, but this is all good stuff. Ta.

Share this post


Link to post
Share on other sites

Can you please refresh that download link?

---------- Post added at 20:38 ---------- Previous post was at 20:23 ----------

Very soon please!

Share this post


Link to post
Share on other sites
Can you please refresh that download link?

---------- Post added at 20:38 ---------- Previous post was at 20:23 ----------

Very soon please!

Do you realize the last post is more than two years old ?

Share this post


Link to post
Share on other sites
Can you please refresh that download link?

---------- Post added at 20:38 ---------- Previous post was at 20:23 ----------

Very soon please!

I think this is it: http://www.norrin.org/norrin/ArmA2/scripts/Camera/Spectate_02.utes.rar

There's a file called readMe in the archive that describes how to use it.

I'm sorry about the missing links to some of my stuff but someone hacked my repository a while ago and my provider would only allow me to regain access if they were allowed to wipe all my content. As I've kept no record of what I've posted and where a lot of stuff no longer exists online but its all backed up at home so if you have a request I can usually find it and repost.

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  

×