Fix DrawBillboardPro to allow source of negative size (#3197)
This commit is contained in:
parent
32b54be5cb
commit
7aae86fb6e
|
|
@ -3492,7 +3492,7 @@ void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector
|
|||
void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint)
|
||||
{
|
||||
// NOTE: Billboard size will maintain source rectangle aspect ratio, size will represent billboard width
|
||||
Vector2 sizeRatio = { size.x*(float)source.width/source.height, size.y };
|
||||
Vector2 sizeRatio = { fabsf(size.x*(float)source.width/source.height), fabsf(size.y) };
|
||||
|
||||
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user