Hello William,
MTE versions up to and including 0.958 were designed to freeze offscreen physics objects because when tiles move offscreen they’re culled to maintain high performance. A character standing on a platform would suddenly fall through the world as it disappears under him. Similarly, in a dungeon or maze-like map, the enemies would suddenly begin walking through offscreen walls because there aren’t any offscreen walls. Freezing the sprites when they move offscreen prevents this. These versions of MTE also contain a bug which causes the engine to ignore the cullingMargin in this situation.
If the above problems don’t apply to you, you can modify the engine file to keep the sprites from freezing. The check for offscreen sprites takes place on lines 12799 and 12800:
local screenPosX = ((screenPosX - (display.viewableContentWidth / 2)) / masterGroup.xScale) + (display.viewableContentWidth / 2) local screenPosY = ((screenPosY - (display.viewableContentHeight / 2)) / masterGroup.yScale) + (display.viewableContentHeight / 2) if not object.isMoving and (screenPosX - (object.width / 2) \> screen.right or screenPosX + (object.width / 2) \< screen.left or screenPosY - (object.height / 2) \> screen.bottom or screenPosY + (object.height / 2) \< screen.top) then object.isAwake = false --MTE control local tempPosX = object.levelPosX local tempPosY = object.levelPosY ...
If you change this check to something else which is always false, all the sprites will behave is if they’re onscreen all the time:
local screenPosX = ((screenPosX - (display.viewableContentWidth / 2)) / masterGroup.xScale) + (display.viewableContentWidth / 2) local screenPosY = ((screenPosY - (display.viewableContentHeight / 2)) / masterGroup.yScale) + (display.viewableContentHeight / 2) local test = false if test then object.isAwake = false --MTE control local tempPosX = object.levelPosX local tempPosY = object.levelPosY ...
MTE 0.980 is coming out in a few days. Aside from fixing the cullingMargin bug, the new engine rewrite can be configured so that offscreen physics objects remain active. As they move they spawn a tiny area of the map around themselves so that they can collide with it just as they would if they were onscreen.