DarthMike / indielib-crossplatform

IndieLib is a cross-platform Game Graphics engine. Main focus is OpenGL ES 2.0 for mobile iOS operating system, and OpenGL desktop. **NOT SUPPORTED ANYMORE**
zlib License
61 stars 27 forks source link

Mirrored entity in X makes rotation not follow Hotspot #95

Closed DarthMike closed 11 years ago

DarthMike commented 12 years ago

For both DirectX and OpenGL renderers, setting setMirrorX to an entity, and a HotSpot of 0,5 / 0,5, makes that the rotation will not rotate from center of entity.

Rotation should follow hotspot even if mirrored.

The same for collision. It seems that mirror affects the hotspot position.

DarthMike commented 11 years ago

Fixed, also corrected hotspot transform in DirectX and OpenGL. Had to change some coordinates from tutorials/tests, as the hotspot translation was being added to normal x,y translation

DarthMike commented 11 years ago

Fixed 'incorrectly' hotspot transform in DirectX and OpenGL, as I misunderstood API. When changing hotspot to 0,5 , 0,5, it means that all coordinates refer to that point. so calling setPosition(0,0,0) effectively makes the CENTER position to be in this coordinate. I have to fix that regression on tutorials, and also changes mades to tests coordinates for that matter.

DarthMike commented 11 years ago

Fixes the coordinate regression in #89 too.