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

Possible Bug?? #6126

Closed
jcoppage opened this issue May 30, 2022 · 2 comments
Closed

Possible Bug?? #6126

jcoppage opened this issue May 30, 2022 · 2 comments

Comments

@jcoppage
Copy link

jcoppage commented May 30, 2022

The below line of code does NOT produce an error. BUT it causes the physics system to not work properly while the game is running. Collisions between other game objects stop working properly, which have nothing to do with the light object.

this.energyBlastLight = this.scene.lights.addLight(this.x, this.y, 500, 0x037EFC, 5 );
this.scene.physics.world.enable(this.energyBlastLight) // <----- THIS LINE
@samme
Copy link
Contributor

samme commented May 31, 2022

It will spoil the collision tree.

Maybe world.enableBody() should reject objects with body === undefined.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

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

No branches or pull requests

3 participants