|
SpriteInCamera | ||
Flag = SpriteInCamera(SpriteIndex, CameraIndex) | ||
Parameters: SpriteIndex = The Index of the sprite you wish to query CameraIndex = The Index of the camera you wish to check this sprite against |
||
Returns: Flag = The state of this sprite (0= outside of camera, 1 = inside of camera) |
||
The SpriteInCamera functions check if a sprite position is within the viewport of a camera. FACTS: * This compares the world space position of the sprite to the camera. * See CameraBasics, CreateCamera Mini Tutorial: This example is really 4 parts. Part1 creates an image. Part 2 creates some randomly positioned sprites using the previous created image. Part 3 Creates a camera, while Part 4 is the main process loop, which lets the user control the camera, and thus displaying the (SpriteinCamera) status of each sprite.
This example would output.
|
Related Info: | CameraBasics | CreateCamera | RectHitSprite | RectHitSpritePixels | SpriteInRegion | TriangleHitSpritePixels : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |