Skip to content

Manually run the Arcade Physics update! (With Typescript) #5190

@cfortuner

Description

@cfortuner

Hi!

I'm using phaser with ECSY https://github.com/MozillaReality/ecsy/tree/dev/src and I want to be able to control the Arcade Physics update.

I tried using the World.step method, but I realized the body preUpdate logic isn't part of that call.
https://discord.com/channels/244245946873937922/416623653741133837/721162157441548372

Right now I can get around this limitation by doing this:

Scene initialization code

scene.physics.world.pause()

Update code

scene.physics.world.resume()
// @ts-ignore
scene.physics.world.update()
scene.physics.world.pause()

But I would prefer to not have to pause and resume.

Would you be open to making world.update public OR adding a separate public world.manualUpdate(time, delta)?

Thanks!
Colin

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