Parent a pivot to your entity you want the camera to follow.
Position the pivot where you'd like the camera to be when it's resting.
Do all this befoire your main loop starts.
Now, every loop, do the following, immediately after each other.
That should be you sorted. I don't have blitz3d installed, but it should work :o) Whats happening is, the cam_pivot is the point the camera always tries to be. That's why i'm pointing the camera at it and moving it towards it. NOW, i'm using the distance between the CAMERA and the CAM_PIVOT to produce a smooth movement, as the distance between them decrease, the slower the camera will move.
Then, i simply point the camera back at the entity.
This code is heavily based on Rob Farley's smooth cam. Kudo's to him!
Position the pivot where you'd like the camera to be when it's resting.
Do all this befoire your main loop starts.
global entity = >>>>> YOUR ENTITY YOU WANT THE CAMERA TO FOLLOW <<<< global camera = createcamera() ; your actual camera global cam_pivot = createpivot() ; the place you want the camera to be entityparent cam_pivot,entity positionentity cam_pivot,0,10,-20 ; 10 being the height above the entity you want to follow, and -20 being the distance behind it.
Now, every loop, do the following, immediately after each other.
pointentity camera,cam_pivot ; Points camera at the pivot moveentity camera,0,0,entitydistance(cam,cam_pivot)/30 pointentity camera,entity ; point the camera at the entity you want the camera to follow
That should be you sorted. I don't have blitz3d installed, but it should work :o) Whats happening is, the cam_pivot is the point the camera always tries to be. That's why i'm pointing the camera at it and moving it towards it. NOW, i'm using the distance between the CAMERA and the CAM_PIVOT to produce a smooth movement, as the distance between them decrease, the slower the camera will move.
Then, i simply point the camera back at the entity.
This code is heavily based on Rob Farley's smooth cam. Kudo's to him!