Hi guys, I could use some help here. Been trying all kinds of methods to fix this bug but no luck.
I have a game character which consists of 2 parts; a head and a body. I combined them together using a runtime event listener.
It works well but for some reason, once I pause my game and resume, the head starts to ‘detach’ from the body. It’s obvious when the character is flying left or right. As you can see below, the head is slightly to the left instead of being in the center.
Below are the codes I used to create the in-game Pause function
function gamePaused() Runtime:removeEventListener("accelerometer", onTilt) Runtime:removeEventListener("enterFrame", playerMove) Runtime:removeEventListener("touch", touchScreen) Runtime:removeEventListener( "tap", onExclusiveTap ) physics.pause() end
The event listener used to attach both head and body isn’t stopped even when the game is paused. At this point, I have no idea what’s causing this bug.
Any help is very much appreciated. Thanks!