Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Cobra on September 23, 2011, 02:52:37 am
-
Obviously I'm FREDing a cutscene here. I'm trying to pull off a kind of 'ship flies over camera and camera turns to track it' effect. However, when the SEXP triggers, the camera tracks it but there's nothing on screen. I don't know if I'm just doing it wrong or if it's actually broken.
$Formula: ( when
( <
( distance
"Alpha 1"
"Waypoint path 3:3"
)
100
)
( set-camera-target "Alpha 1" )
)
+Name: Camera Follows Me
+Repeat Count: 1
+Interval: 1
-
Use every time and set-camra-facing-object
-
set-camera-target doesn't make the camera face the target, it just makes it move the same way the target moves. Most of the time you want to first make it face the target, and then use set-camera-target to make it follow the target.
-
yep, thats what that does. i think you need to be using set-camera-facing-object. now if you wanted to view an object from another object then you would use set-camera-target on the ship you want to observe from and then set-camera-facing-object on the object you want to watch. set-camera-target just puts the camera in an objects frame of reference, anything you do after that is relative tot he target instead of world (at least thats how it works in scripting, but the sexps use the same function calls). should probably move this to an appropriate forum.
-
Thread tl;dr: Make sure you set camera orientation to 0 0 0. :)
-
It's a wacky sexp, it does not what you'd expect.
Try this, before using that sexp, reset the camera, then use set-camera-facing-object, and only then use set-camera-target.