Author Topic: Cutscene camera thingy/discussion  (Read 1806 times)

0 Members and 1 Guest are viewing this topic.

Offline Flipside

  • əp!sd!l£
  • 212
Cutscene camera thingy/discussion
Ok, I'm trying this more for experimentation than an actual goal, but I tried setting up a sexp which basically went :-

Code: [Select]
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.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Cutscene camera thingy/discussion
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.

 

Offline Flipside

  • əp!sd!l£
  • 212
Re: Cutscene camera thingy/discussion
Yeah, I had a feeling it was to do with camera update. Ah well, thank for the hint, I'll give that a go :)

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Cutscene camera thingy/discussion
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:
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline takashi

  • Better than TrashMan
  • 29
Re: Cutscene camera thingy/discussion
such a feuture would allow me to perfect several cutscene missions i have in the works.