OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Mandoble on 15 Oct 2007, 23:27:28
-
Well, Hoz insisted into posting this camera follow script.
Smooth camera movement and smooth transitions between units, leave the script running and then change the camera target at will.
Updated to v1.2
Now you can change dinamically the relative tracking position, indicate wether waiting before area preloading is required before switching to a new unit and indicate the number of seconds between tracking end and camera destruction.
Mando Predicam v1.2 (http://www.ofpec.com/ed_depot/index.php?action=details&id=440&page=0&game=&type=&cat=)
-
hi Mandoble, as always you are making good stuff :D
Seems to work fine, my only suggestion is that the demo focus on vehicles like the helicopter and car or truck first. The camera following the infantry is a bit jerkier, though when the camera follows a vehicle it is very smooth. I felt like i was in a traffic helicopter in Los Angeles following OJ Simpson or some other high speed police chase.
This function will obviously be very useful for cutscenes and save designers the headaches involved in following moving objects.
-
Hi Mando!
I didn't get trough it analysing your the predicam script:
Is it possible to set a specific position of the camera for each target that was added in your script?
For example for solider1 -> 20,90,10,100..., for heli1 -> 30,100,13.120... and so on.
Greets!
Undeceived
-
No, but you may modify it slightly to attend also to a global var to set cam relative position or current target or new one.
-
Hi Mandoble,
Behind your lovely Prediccam, I've got a key-press script running that allows target hopping, pan and missile following (getting ready for a Naval Warefare Movie)....
But the problem I'm having is once a tracked missile dies I've found no way of keeping that last view (as the missile died/ship hit) alive for a few more seconds (like about 3-5sec).
Any suggestions of non standard code to keep the view alive a little longer in Predicam?
Cheers,
Gnat
-
Changing the last Sleep 2; by Sleep 5; should be enough for that.
-
Nope, doesnt working, but probably because the missile is deleted once either shot down or impacting a target.
Possible for a camera to keep an existing view AFTER the target is deleted ? :whistle:
-
Yes, that is what might be happening, the missile is deleted in the middle of a loop iteration, the position returned is 0,0,0 (objNull) and the target is also objNull. So the camera might be kept "alive" but over sea and looking at sea.
Predicam updated to v1.2, check first post.
-
Hmmm thx but the camera always ends up facing backwards.
I added this to the 1.1 version
...............
while {mando_predicam} do
{
_posu = getPos _unit;
_asl1 = getPosASL _unit select 2;
_Lxc = getPosASL _unit;
..............
and at the end of that loop
.............
if ((_unit != mando_predicamunit) && (mando_predicamLag == 1)) then
{
_cam camSetTarget _Lxc;
_cam camSetPos _posc;
_cam camCommit (0.01);
sleep 7;
};
-
Well, I've tested 1.2 several times deleting the tracked unit (flying AV8B) and the camera always did end looking forward, but if that _Lxc solves the problem for your case, great ;)