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

Physics Group with array doesn't add body. #4511

Closed
rgk opened this issue May 6, 2019 · 1 comment
Closed

Physics Group with array doesn't add body. #4511

rgk opened this issue May 6, 2019 · 1 comment

Comments

@rgk
Copy link
Collaborator

rgk commented May 6, 2019

Version

  • Phaser Version: 3.16.2
  • Operating system: Linux

Description

When adding an array of items to a physics group, it does not add the body object etc... but it works when only adding a single config object.

Example Test Code

https://labs.phaser.io/edit.html?src=src/physics/arcade/simple%20group.js <- This example works. If you replace the group variable with:
` var group = this.physics.add.group(
[
{
key: 'block',
frameQuantity: 1,
},
{
key: 'block',
frameQuantity: 1,
},
{
key: 'block',
frameQuantity: 1,
},
{
key: 'block',
frameQuantity: 1,
}
]
);

console.log(group.children.entries);`

As you can see no body.

Additional Information

I might be doing something wrong but shouldn't a physics group always add a physics body?

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants