CameraZoom3D camera,zoomfactor#

Parameters

camera - handle of the camera to zoom
zoomfactor# - How far zoom in

Description

This command is used to update both the camera and the sprite pivot simultaneously.
You need to call this command to ensure the sprites are displayed correctly when zooming the camera.
You can only use values of 1 or greater with this command.

The main camera is either one you create yourself or the one created by using SpriteGraphics3D
If you use the SpriteGraphics3D command then the camera is called 'spritecamera'

If you have your own camera setup then use CreateSpritePivot() and attach it to this camera:

mycam=CreateCamera()
piv=CreateSpritePivot(mycam) ; <-attach the sprite pivot to mycam
...
CameraZoom mycam,1.5

See Also: SpriteGraphics3D CreateSpritePivot()

Example

Include "Sprite Control.bb"

SpriteGraphics3D 640,480

mysprite=LoadImage3D("myimage.bmp")
DrawImage3D mysprite,200,180

CameraZoom3D spritecamera,1.5

RenderWorld
Flip
WaitKey
End


Index