Updated August 01, 2005
HOME PAGE > AUTHORS > PROSPERO > BOD PYTHON SCRIPTING (09)
Tut9. Cutscenes and camera stuff.![]()
In most
of the cutscenes in the main game the camera moves are handled by hard-coded
*.cam files which are created in 3dsmax.
However, it is easy to create them
with Python.
What you need are sets of coords. The "Camera" is an entity
the same as all other objects in the game. The two properties you need
are:
Position (the position of the camera)
TPos (target postion - the
point at which it is 'looking')
You need the De-bug mode enabled in order
to get accurate coords. Start the map and press 'P' to enable the free camera.
You now need to set some key points in the camera travel path.
Move the cam to
the point where you want to start your cutscene. Press 'T' until you get a
readout with the camera position and camera target position. (This screen has
lots of other stuff on it: Player Pos/Angle and current animation,etc). Write
down the cam pos and tpos. Move cam to the next stage in its path, note coords
again and repeat until you reach the point where you want the cutscene to
end.
There is a file Lib/AbreCam.py that handles camera moves nicely. To
use, make a function:
import AbreCam def Cut1(): AbreCam.ResetNode() AbreCam.AddNode((10000, -6000, 80000),(12000,-10000, 67000),0) AbreCam.AddNode((20000, -8000, 70000),(12000,-10000, 67000),7) AbreCam.AddNode((30000, -7000, 86000),(9000,-4000, 56000),8) AbreCam.AddNode((50000, -6000, 98000),(8000,-5000, 40000),4) AbreCam.LastTime=0 AbreCam.AbreCam()