Hi! I’m not sure if the tittle explains the problem wich I’m stuck, but I’ll try to explain a bit further.
In this project I want to have a hand-made listener (checking the conditions every enterFrame) so that I get when an object gets out of a moving street.
The street consists of several parts in a continually moving loop. Due to the high number of worlds, I would discard, if possible, the use of physics, as I’d have to create manually and not accurate the shape of each body (every part of the street).
The first solution I thought about is creating masks of each street part, and “shaping” the object with 5 strategical points relative to the object. In each frame I’d fake a touch event that should be triggered in the isHitTestMasked object listener wich would stop further events of the background. In case the background listener gets triggered there’s a part of the object out of the street.
Although all listeners, masks and points are already working I have no clue how to fake that event not calling to the listener by myself. Edit: (dispatchEvent triggers the listener even if the ev.x and ev.y are out of the Masked area)
The other option that comes to my mind by now is getting the information of the pixel of each point of the object using a bitmap of the street mask, even though I haven’t found too reliable information about bitmasking in Corona and I’m afraid there’s no way to use this feature.
I’m sorry for a question so especifical as this one, but I think it resumes some other problems I had before and I’m sure it would be really helpfull for other developers with similar issues.
Thanks in advantage!