I’ve encountered a couple of strange things when working with non-uniform scaling of the top parent game object. (The purpose is to retain proper object proportions for all screen formats.)
If I create a “normal” game object, with sprite graphics, like this, everything is fine.
local ship = factory.create("#ship_factory",pos)
msg.post(ship, "set_parent", { parent_id = go.get_id() })
The game object inherits the scale of its parent. But if I create a game object containing a particle effect, that effect does not get properly scaled. It appears to retain its default world scale.
Second, if I want to create a game object with an initial rotation, for example like this,
local ship = factory.create("#ship_factory", pos, vmath.quat_rotation_z(angle))
msg.post(ship, "set_parent", { parent_id = go.get_id() })
and the angle is not zero, this messes up the scaling of the game object. It is as if the rotation is applied in a different coordinate system than that of the parent. But if I instead perform a rotation animation on the game object after it has been created, everything works fine.