Home   Help Search Login Register  

Author Topic: Small cam related question.  (Read 859 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Small cam related question.
« on: 12 Dec 2002, 08:31:16 »
I'm making a cutscene where the camera slowly pans up looking over a city. However I have a problem. Thus far my only experience with camera commands of that sort are things like "camSetTarget". Now that works fine for tracking entities. What is the command to set a camera to look in a particular direction? Anyone?

Offline KTottE

  • Former Staff
  • ****
Re:Small cam related question.
« Reply #1 on: 12 Dec 2002, 09:42:06 »
All bow down to the mighty camera.sqs!

I suggest you take a gander at Messiah's camera.sqs tutorial and use that to your advantage.

As far as I know, camSetDir doesn't work, and so camera.sqs is the only means we have of setting a direction for the cam without using a unit/object as a target. (You specify coordinates which the camera targets instead.)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Small cam related question.
« Reply #2 on: 12 Dec 2002, 23:03:15 »
If you're using Resistance you can simply get the camera to target an object in the general direction. Get the object's ID then use a line like this:

cam camsettarget (object 3258)

Failing that, you could put down a gamelogic unit and get the camera to target that... ;)

Offline KTottE

  • Former Staff
  • ****
Re:Small cam related question.
« Reply #3 on: 12 Dec 2002, 23:05:50 »
But Sui, you're missing an imporant point.
If he targets an object, the camera will be looking downwards to it. Assuming that it's up in the air. That might not be what he wants, in which case he has to use the camera.sqs (which is easy as pie to use anyway).

So there, and the Swedish Chef is always right :P
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Small cam related question.
« Reply #4 on: 12 Dec 2002, 23:10:13 »
Just note I said "in the general direction". By that I meant target an object far enough away as to get the correct attitude you want in your camera ;)

There is no distance limitation on targetting an object... ie. if the object is 2km away, the camera will have a very shallow attitude... It's all about thinking outside the box :)

Baphomet

  • Guest
Re:Small cam related question.
« Reply #5 on: 13 Dec 2002, 08:50:07 »
Thanks you two. I'll try both of them. I think I've seen that camera.sqs thing. I think I tried to use that before it seemed a bit dodgy to me. Then again teaching a chimpanzee to script cutscenes might think it was kinda dodgy too... so, bleh.


Anyway. I'll look into it.  :P

Cheers.
« Last Edit: 13 Dec 2002, 08:51:59 by Baphomet »

Offline KTottE

  • Former Staff
  • ****
Re:Small cam related question.
« Reply #6 on: 13 Dec 2002, 09:29:12 »
You know what you can do with your box Sui?
Let it get run over by my camera.sqs ;)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Baphomet

  • Guest
Re:Small cam related question.
« Reply #7 on: 13 Dec 2002, 09:31:41 »
Wow. What a great tool that Camera.sqs script is. I wish I had figured that out sooner. It's better than placing markers down and getting their x,y coords thats for sure. However now I have one more question. It has something to do with camera speed. I want the camera to start looking just above ground level and slowly pan upward over the city. However... Here's the part that's got me stumped.

How do I change the camera's pan speed?  Here's what I'm doing:



_camera = "camera" camcreate [7106.15,9461.01,7.48]

 

_camera cameraeffect ["internal", "back"]


_camera camSetTarget [6629.54,9467.00,0.00]
Here the camera is situated looking from one end of the town across to the other. The altitude is a bit above ground level.

_camera camSetPos [7106.15,9461.01,7.48]


_camera camSetFOV 0.700


_camera camCommit 0

~7
_camera camSetTarget [6629.54,9467.00,0.00]
Here the camera is in pretty much the same place except now it's higher above looking out across the town.
_camera camSetPos [7106.15,9461.01,46.90]
_camera camCommit 1 pan camera instead of simply re positioning instantly.
~1

_camera cameraeffect ["terminate", "back"]
exit


Now I was under the impression that the small duration in time marked with '~' would in effect control how fast the camera would pan from one position to another (instead of time waited between an instantaneous repositioning. The time would then instead be used to determine how quickly the transition is between camera angles). However I have found no matter to what values I change. The pan speed seems to remain constant.

Is there a way to change this? There must be. I just can't seem to figure it out.

Offline KTottE

  • Former Staff
  • ****
Re:Small cam related question.
« Reply #8 on: 13 Dec 2002, 09:40:03 »
Hmm, camCommit regulates the duration of the transition.

camCommit 0 = 0 second transition

camCommit 10 = 10 second transition

camCommit 50 = 50 second transition

the higher the number is after camCommit, the longer the zoom/pan/move will take.

~##  = when the next transition begins, i.e the duration between two camera transition.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Baphomet

  • Guest
Re:Small cam related question.
« Reply #9 on: 13 Dec 2002, 10:07:24 »
Ack! Ok. No wonder that wasn't working the way I wanted it to. Thanks for the help.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Small cam related question.
« Reply #10 on: 13 Dec 2002, 10:16:23 »
You know what you can do with your box Sui?
Let it get run over by my camera.sqs ;)

That's ok... I'll be outside of it ;D ;D

Baphomet

  • Guest
Re:Small cam related question.
« Reply #11 on: 14 Dec 2002, 07:55:31 »
For some reason I was under the impression that camcommit was controlled by a bool which determined whether or not the camera would be panned, period. Anyhow. Thanks to both you guys. As usual the E.C forums prove to be quite useful.
« Last Edit: 14 Dec 2002, 07:57:28 by Baphomet »