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

onBeginContact giving null on it's first parameter #1644

Closed
rmxhaha opened this issue Feb 27, 2015 · 1 comment
Closed

onBeginContact giving null on it's first parameter #1644

rmxhaha opened this issue Feb 27, 2015 · 1 comment

Comments

@rmxhaha
Copy link

rmxhaha commented Feb 27, 2015

Though this might not be a bug I want at least documentation if it's not...

When I tried to add collision group to my code, I stumble upon an error which shouldn't be there then I search then I found out that onBeginContact which should give a p2Body on it's first parameter suddenly gives null. If I add

if( arguments[0] == null ) return;

inside onBeginContact then the error disappear but now nothing is colliding with each other.

I've asked this question ( http://www.html5gamedevs.com/topic/12649-phaser-p2js-onbegincontact-gives-null-body/ ) but no one is giving me an answer so I asked again here.

@photonstorm
Copy link
Collaborator

I have improved the documentation for all P2 related signals, including covering this.

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

No branches or pull requests

2 participants