I’ll have to look into that on my end. MTE turns objects on and off depending on their screen position, so if the object’s onscreen the engine’s turning it back on every time you try to turn it off. I’ll have to figure out some way to differentiate between the player’s input and the engine’s, but it should be doable. I’ll have more information on that as I start to update the relevant section of code.
EDIT:
I’ll be adding an option to completely disable the engine’s automated physics state management so that a physics object will stay on or off as set by the player no matter where it is on the screen. If you don’t want to wait you can go into mte.lua and comment out everything from line 9869 to 9924:
--Handle Offscreen Physics if object.bodyType and masterGroup[i].vars.camera then if object.offscreenPhysics then local tempX, tempY = masterGroup.parent:localToContent(object.contentBounds.xMin, object.contentBounds.yMin) local leftTop = {masterGroup[i]:contentToLocal(tempX, tempY)} tempX, tempY = masterGroup.parent:localToContent(object.contentBounds.xMax, object.contentBounds.yMax) local rightBottom = {masterGroup[i]:contentToLocal(tempX, tempY)} left = math.ceil(leftTop[1] / map.tilewidth) - 1 top = math.ceil(leftTop[2] / map.tileheight) - 1 right = math.ceil(rightBottom[1] / map.tilewidth) + 1 bottom = math.ceil(rightBottom[2] / map.tileheight) + 1 if not object.bounds or (object.bounds[1] ~= left or object.bounds[2] ~= top or object.bounds[3] ~= right or object.bounds[4] ~= bottom) then if object.physicsRegion then for p = 1, #object.physicsRegion, 1 do local lx = object.physicsRegion[p][1] local ly = object.physicsRegion[p][2] if (lx \< masterGroup[i].vars.camera[1] or lx \> masterGroup[i].vars.camera[3]) or (ly \< masterGroup[i].vars.camera[2] or ly \> masterGroup[i].vars.camera[4]) then updateTile2({locX = object.physicsRegion[p][1], locY = object.physicsRegion[p][2], layer = object.physicsRegion[p][3], tile = -1, owner = object }) end end end object.physicsRegion = nil object.physicsRegion = {} for lx = left, right, 1 do for ly = top, bottom, 1 do for j = 1, #map.layers, 1 do if (lx \< masterGroup[j].vars.camera[1] or lx \> masterGroup[j].vars.camera[3]) or (ly \< masterGroup[j].vars.camera[2] or ly \> masterGroup[j].vars.camera[4]) then local owner = updateTile2({locX = lx, locY = ly, layer = j, onlyPhysics = false, owner = object}) if owner then object.physicsRegion[#object.physicsRegion + 1] = {lx, ly, j} end end end end end object.bounds = {left, top, right, bottom} end else local locX = math.ceil(object.x / map.tilewidth) local locY = math.ceil(object.y / map.tilewidth) if (locX \< masterGroup[i].vars.camera[1] - 1 or locX \> masterGroup[i].vars.camera[3] + 1) or (locY \< masterGroup[i].vars.camera[2] - 1 or locY \> masterGroup[i].vars.camera[4] + 1) then object.isBodyActive = false elseif (locX \< masterGroup[i].vars.camera[1] or locX \> masterGroup[i].vars.camera[3]) or (locY \< masterGroup[i].vars.camera[2] or locY \> masterGroup[i].vars.camera[4]) then object.isAwake = false object.isBodyActive = true else object.isAwake = true object.isBodyActive = true end end end