|
GetSpriteVertexY | |
Ypos# = GetSpriteVertexY(SpriteIndex, VertexIndex) | |
Parameters: SpriteIndex = The Sprite you wish to query VertexIndex = The vertex you wish to read ranges between (0 and 3) |
|
Returns: Ypos# = The Y position of this vertex |
|
The GetSpriteVertexY function returns the position of a sprite corner vertex. This position is post rotation & scaling. The corner vertex of a sprite are ordered in a clock wise fashion. Vertex zero being the Top-Left, Vertex One is the Top-Right, Vertex three is the bottom/right and Vertex four is the Bottom-Left So if the image isn't rotated, they'd look like this.
FACTS: * GetSpriteVertexY returns the position of the vertex after rotation and scaling have been applied to the sprite. * Also see PositionSprite, ScaleSprite, RotateSprite 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 and draws the bounding egdes via reading the sprites vertex positions.
|
Related Info: | GetSpriteOldX | GetSpriteOldY | GetSpriteOldZ | GetSpriteVertexX | GetSpriteX | GetSpriteY | GetSpriteZ : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |