For your first question, what do you mean? Are you adding physics to the “child” object and the host object is getting it as well?
objectType.build = function(event) local obj = display.newRect(0, 0, 100, 100) physics.addBody(obj, ...) -- The host object is getting this?!? return obj end
!isData! is a property you can add to objects in Tiled that makes them retain all their properties but not be an actual display object. Culling is not available for !isData! objects, but I’ll likely add it soon. You can’t add isData programmatically, because it has to be attached to an object when the map is created.
Second question: Yup, that’s correct.
Third question: I use objects in Tiled sort of like boundaries for my child/built objects. Culling will activate as soon as the entire host object goes off-screen, so you can make the object bigger to keep it from being destroyed too soon. For example, I use Tiled objects for my moving platforms by making them the entire width or height of the platform’s moving path; then, the platform is deleted after it and its moving path is completely off-screen.
- Caleb