0
\$\begingroup\$

I was coding the wall collision system for my game, and I wanted to do it using intersect boundaries instead of checking every step if they are off the screen. When the player crosses the boundary they get moved back to half of the sprite, but because the intersect boundary uses the collision box, it appears to jitter when you walk into the wall. Is there a way to get the width and height of the collision box so I can move them half of that away from the wall?

\$\endgroup\$
0
\$\begingroup\$

You can get an instance's bounding box edges position by using the read-only bbox_* variables: they are expressed in world coordinates and can be used for your collision resolution purpose.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy