First noticed in AGSCamera class, but this seems to be a universal issue in the engine.
Whenever there is a need to find an area the object is located on, engine code simply uses object's XY coordinates. However, if object has parent(s), these could be relative coordinates, not absolute ones.
These places in code may be found by searching for "GetMatchingAreas" method call.
At the moment they include:
AGSCamera.getTargetZoom
AGSModelMatrixComponent.getAreaScaling
AGSSoundEmitter.onRepeatedlyExecute
KeyboardMovement.isWalkable
As far as I could get, current workaround is to apply transformation to the Area to make it match object's coordinates transformation (i.e. - move and/or rotate it accordingly). This ofcourse won't work if you want several objects with different parents (or some having parents and others not) be affected by one area.
NOTE: TBH I do not know if parallax should also be affecting coordinates in the above cases. If yes, then #270 should perhaps be closed as a more narrow case of current issue.
First noticed in AGSCamera class, but this seems to be a universal issue in the engine.
Whenever there is a need to find an area the object is located on, engine code simply uses object's XY coordinates. However, if object has parent(s), these could be relative coordinates, not absolute ones.
These places in code may be found by searching for "GetMatchingAreas" method call. At the moment they include:
As far as I could get, current workaround is to apply transformation to the Area to make it match object's coordinates transformation (i.e. - move and/or rotate it accordingly). This ofcourse won't work if you want several objects with different parents (or some having parents and others not) be affected by one area.
NOTE: TBH I do not know if parallax should also be affecting coordinates in the above cases. If yes, then #270 should perhaps be closed as a more narrow case of current issue.