TGC Codebase Backup



Bullet Time by Tomu

27th Jan 2004 8:43
Summary

Here is a simple bullet time function using the set camera fov function and the set camera to follow function.



Description

the parameters needed are camno,fx,fy,fz,fa,fd,fh,s

fx = X position camera rotates about.
fy = Y position camera rotates about.
fz = Z position camera rotates about.
fa = Number of degrees which the camera rotates.
fd = The distance away from the centre.
fh = The height above/below the centre.
s = The speed at which the camera travels.

Enjoy...



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    function BulletTime(CamNo,fx#,fy#,fz#,fa#,fd#,fh#,s)
   set camera fov 140
   for ang# = camera angle y(CamNo) to camera angle y(CamNo)+ fa# step s
      set camera to follow CamNo,fx#,fy#,fz#,ang#,fd#,fh#,5,0
      sync
   next ang#
   set camera fov 90
endfunction