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

Title: Mando Predicam (ACCEPTED)
Post 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=)
Title: Re: Mando Predicam
Post by: LeeHunt on 24 Oct 2007, 00:50:50
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.
Title: Re: Mando Predicam (ACCEPTED)
Post by: Undeceived on 25 Jan 2008, 18:52:01
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
Title: Re: Mando Predicam (ACCEPTED)
Post by: Mandoble on 25 Jan 2008, 20:29:44
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.
Title: Re: Mando Predicam (ACCEPTED)
Post by: Gnat on 30 Jan 2008, 15:49:48
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
Title: Re: Mando Predicam (ACCEPTED)
Post by: Mandoble on 30 Jan 2008, 16:35:19
Changing the last Sleep 2; by Sleep 5; should be enough for that.
Title: Re: Mando Predicam (ACCEPTED)
Post by: Gnat on 31 Jan 2008, 12:14:03
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:
Title: Re: Mando Predicam (ACCEPTED)
Post by: Mandoble on 31 Jan 2008, 13:00:51
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.
Title: Re: Mando Predicam (ACCEPTED)
Post by: Gnat on 01 Feb 2008, 14:55:42
Hmmm thx but the camera always ends up facing backwards.
I added this to the 1.1 version
Quote
...............
while {mando_predicam} do
{
   _posu = getPos _unit;
   _asl1 = getPosASL _unit select 2;
   _Lxc = getPosASL _unit;
..............

and at the end of that loop
Quote
.............
   if ((_unit != mando_predicamunit) && (mando_predicamLag == 1)) then
   {
   _cam camSetTarget _Lxc;
      _cam camSetPos _posc;
      _cam camCommit (0.01);    
      sleep 7;
   };
Title: Re: Mando Predicam (ACCEPTED)
Post by: Mandoble on 01 Feb 2008, 15:48:07
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  ;)