Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Ev3ntHorizon on November 20, 2013, 01:37:44 pm

Title: Cutsecene camera movement
Post by: Ev3ntHorizon on November 20, 2013, 01:37:44 pm
Hi,

My questions is about how to get the camera to zoom in or out, or more specifically to get the effect of the camera rushing away from or to a particular object kinda like in the re imagened Battlestar Galactica series. I think this effect looks cool and adds action to a scene and i would like to re-create that im my cutscenes, but i don't seem to be able achieve this so any help on this would be great!.

Thanks.
Title: Re: Cutsecene camera movement
Post by: Rodo on November 20, 2013, 02:53:03 pm
IIRC you need to make the camera face the target you want to aproach, then change the position of the camera to a closer spot next to the target (aceleration/deceleration effect can be achived with this same sexp).
Title: Re: Cutsecene camera movement
Post by: mjn.mixael on November 20, 2013, 08:40:11 pm
IIRC you need to make the camera face the target you want to aproach, then change the position of the camera to a closer spot next to the target (aceleration/deceleration effect can be achived with this same sexp).


Pretty much yes. I'll add that you can do this all in a single event. SEXPs run from top to bottom (unless you are using a special mod.tbl flag, iirc.) So, create your event something like this.

Code: [Select]
EVENT
 *When
   *Whatever trigger
   *Set-camera-pos
       *X
       *Y
       *Z
   *Set-camera-facing
       *X
       *Y
       *Z
   *Set-camera-pos
       *X
       *Y
       *Z
       *Time it takes to go from first pos to second pos (milliseconds)
       *Time to spend accelerating (milliseconds)
       *Time to spend decelerating (milliseconds)

Additionally, you may want to use set-camera-facing-object for this.
Title: Re: Cutsecene camera movement
Post by: karajorma on November 21, 2013, 03:09:19 am
SEXPs run from top to bottom (unless you are using a special mod.tbl flag, iirc.)

If you use that mod.tbl flag ( $Loop SEXPs Then Arguments:   YES   ) SEXPs still run from top to bottom, what changes is their looping behaviour

When-argument
-do 1
-do 2

by default does (do1, do1, do1.....do2, do2, do2) with the flag it becomes (do1, do2, do1, do2.....)

I suspect you knew that, but for those who didn't it's useful to know. :)
Title: Re: Cutsecene camera movement
Post by: mjn.mixael on November 21, 2013, 08:48:55 am
Oh yeah. I had forgotten the specifics of that.
Title: Re: Cutsecene camera movement
Post by: Ev3ntHorizon on November 25, 2013, 10:42:30 am
Thanks for the replies.... @mjn.mixael that's the effect i wanted, cheers!!