Skip to content

Scene physics.add.staticBody throws when called with both width and height #6630

@Legend-Master

Description

@Legend-Master

Version

  • Phaser Version: 3.60.0 / 3.61.0-beta.2
  • Operating system: Windows 10
  • Browser: Chrome 117

Description

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'getCenter')

https://github.com/photonstorm/phaser/blob/cbb802bcff470e3dc222986f5b71126d6741307c/src/physics/arcade/StaticBody.js#L612

Example Test Code

new Game({
	physics: {
		default: 'arcade',
	},
	scene: {
		create() {
			this.physics.add.staticBody(0, 0, 10, 10)
		},
	},
})

Additional Information

Probably caused by 6b55ac6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions