|
QuadHitSprite | |
CollisionFlag = QuadHitSprite(X1, Y1, X2, Y2, X3, Y3, X4, Y4, SpriteIndex) | |
Parameters: X1 = X coordinate of Point 1 Y1 = Y coordinate of Point 1 X2 = X coordinate of Point 2 Y2 = Y coordinate of Point 2 X3 = X coordinate of Point 3 Y3 = Y coordinate of Point 3 X4 = X coordinate of Point 4 Y4 = X coordinate of Point 4 SpriteIndex = The sprite you wish to query |
|
Returns: CollisionFlag = The result of the collision query (0= No collision ,1 = Collision) |
|
The QuadHitSprite function returns if a collision occurs between a four sided polygon (quad) and a sprite. When testing the sprite the QuadHitSprite command uses the sprites current collision mode as the hard region of the sprite. FACTS: * QuadHitSprite uses the sprites collision mode as the hard region of the sprite. * Also see SpriteCollisionMode Mini Tutorial: This example creates a random image, creates 10 randomly positioned sprites on the screen using this image. The main loop rotates the sprites while scans them for collisions using QuadHitSprite
|
Related Info: | CircleHitSprite | PointHitSprite | RectHitSprite | SpriteCollisionMode | SpriteHit : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |