Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxG.collide with a tilemap doesn't return tiles coordinate #42

Open
moly opened this issue Aug 30, 2012 · 0 comments
Open

FlxG.collide with a tilemap doesn't return tiles coordinate #42

moly opened this issue Aug 30, 2012 · 0 comments
Labels

Comments

@moly
Copy link
Owner

moly commented Aug 30, 2012

The callback assigned to Flxg.collide gives back a FlxOject with coordinates x = 0 and y = 0 all the time

I used the following code:
override public function update():void
{
FlxG.collide(_bullets,collisionMap,bulletMap);
super.update();
}

private function bulletMap(b:FlxObject,cmp:FlxObject):void
{
FlxG.log(String(cmp.x) + "," + String(cmp.y) + "; " + String(b.x) + "," + String(b.y));
}

I get the following output for multiple bullets shot:
51.199999999999704,440; 0,0
410.07500000000067,312; 0,0
461.2250000000009,312; 0,0

Note: the tile resolution used is 8 x 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant