Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Flipside on March 20, 2007, 09:27:07 pm
-
Ok, I'm trying this more for experimentation than an actual goal, but I tried setting up a sexp which basically went :-
every-time
true
set-camera-position
getobjectx(Object camera following)
+
getobjecty(Object camera is following)
5
-
getobjectz(Object camera is following)
20
every-time
true
set-camera-facing
Target Object
This should make the camera constantly adopt a position 20 metres behind and 5 metres above the object and look at a seperate object, causing a 'flyby' type effect if you set it up correctly.
I've noticed a couple of problems though. The first is that the camera looks like it's in the wrong spot, but that may be just down to me misreading or misinterpreting co-ords somewhere.
The second is that whatever ship you are following, when it is in view, tends to 'stutter' as it moves.
Has anyone else tried something like this and had any more success? It looks pretty good as it is, if it weren't for that stutter, I've tried moving the camera so that it is quite some distance from the ship, but the debris still stutters around.
I suppose what would be really handy is a 'camera_trail' sexp, which would make the camera be 'pulled' along by the target in a similar manner to nebula trails, so there's a slight delay in reaction time.
I recall Turey asking about this once before, but I'm not sure whether he had any luck getting an answer.
-
Moving cameras aren't really possible at the moment. There is a slight delay between when the camera sexp fires and the camera is actually moved, which leads to the stutter. You can instead put the player ship under AI control, change it into something with zero accel/decel times and have it follow a waypoint at the same speed as the moving ship. It obviously has to be facing the direction it's moving in (somewhere around the back of the ship), but that is currently about the best you can do.
-
Yeah, I had a feeling it was to do with camera update. Ah well, thank for the hint, I'll give that a go :)
-
I recall Turey asking about this once before, but I'm not sure whether he had any luck getting an answer.
Not a satisfactory one. The camera simply doesn't update fast enough for any sort of constant movement.
Now, if it'd update every frame instead of every second... :drevil:
-
such a feuture would allow me to perfect several cutscene missions i have in the works.