I don’t know what influenced means. For me, it seems to mean I get event.x and event.y coordinates that do not match what I would expect to be the global x/y coordinates when I set it to true and I get 0 when it is not there.
Maybe the fact that I am using scenes or DisplayGroups is affecting this in some way?
At first glance, it appears you’re not utilizing the proper parameters in the collision listener. Since this is a “local” collision listener (not a Runtime one), the listener supports both “self” and “event”… you’re using just “event”, but that should be the second additional parameter.
Please see the guide on “Local collision listeners” here:
I’m getting 0’s returned also for event.x, event.y, but I note the local object is within larger display groups. I have:
* called “setReportCollisionsInContentCoordinates” after physics start, although from the sample physics tutorial “CollisionDetection” you don’t seem to need it
* have followed the same layout for setting up the local listener
I could not get this to reliably return correct coordinates for event.x and event.y and just ended up using x and y coordinates for one of the objects.
Worked in a basic test for me too. However in my app where I have embedded display objects within groups etc it wasn’t working. I’ve just worked around by using “target” and “other” position info
It was a player object hitting an obstacle object both within a larger level display group. The larger level group gets moved, horizontal scrolling game, but I think in the case I had it wasn’t being moved at the time. Hard to track something like this down when the function seems to work in the most basic scenario.
I just tried the sample that I wrote in nested display groups, and it works the same (correctly). So, I think there must be some other issue here beyond the Corona APIs. Let me know if you figure it out…
I’m getting 0’s returned also for event.x, event.y, but I note the local object is within larger display groups. I have:
* called “setReportCollisionsInContentCoordinates” after physics start, although from the sample physics tutorial “CollisionDetection” you don’t seem to need it
* have followed the same layout for setting up the local listener
I could not get this to reliably return correct coordinates for event.x and event.y and just ended up using x and y coordinates for one of the objects.
Worked in a basic test for me too. However in my app where I have embedded display objects within groups etc it wasn’t working. I’ve just worked around by using “target” and “other” position info