DaveGreen-Games / ShapeEngine

My custom made engine based on the great Raylib Framework. Main focus is being performant and only using draw functions instead of textures.
MIT License
336 stars 12 forks source link

Rect Rotate functions pivot parameter does not work correctly #30

Closed SoloByte closed 5 months ago

SoloByte commented 5 months ago

The Vector2 pivot parameter works differently then the commonly used alignement property.

In Shape Engine a pivot is an absolute point in space, an alignement is a relative point based on the shape.

Solution

The rotate functions in the rect should have an alignement property like most other functions and then should calculate the pivot internally.