GameMaker getting stuck in the walls while rotating (Ellipse collision)

fireday2

Member
good day everyone!
QIP Shot - Screen 013.png
what we have:
1) sprite has size 115-115
the center is 57-57 (first pixel has 0-0, last 114-114)
2) Collision mask have `Ellipse (slow)` (in our case it's circle)
and boarding by 20 pixels from center (we get 37-77)
QIP Shot - Screen 014.png
3) movement system use separating move for x and y (by using twice time `instance_place`)

All work great - we can move even when we will meet wall in one direction

But if we start to rotate ... Then troubles come
we start to stuck in walls (but not always, look at gif and try project)
but why? we have precise center and collision ellipse's center in same point!
i have only one idea - gms2 don't calculate `Ellipse (slow)` by math but pixel collisions. Is that it?
how to solve issue ?

GIF (showing the issue):
Project (special for test, there are only necessary): https://yadi.sk/d/A9ncJRmNwQgEPQ
 

FrostyCat

Redemption Seeker
I would just use another variable to control the rotation and draw that with draw_sprite_ext(). That way the mask can't rotate into a wall because it isn't actually rotating at all, only the presentation to the player is rotating.
 
Top