Skip to content

P2.World gravity broken after switching states #1292

@englercj

Description

@englercj

After switching states the InversePointProxy for the p2 world physics is broken, this is because the actual array the proxy refers to is no longer used by the p2 world.

On reset the world reruns the ctor which creates a new array for the world gravity. The InversePointProxy in Phaser's P2.World still refers to the old one so you have to access the world gravity manually instead of using the point proxy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions