Maybe bug in Playground example with PhysicsHelper

I wanted to use PhysicsHelper in my code, so I searched for a playground example first and it is here:

But after several clicks on buttons, the whole page crashed with “Aw Snap!” message (in Chrome).

Can the example be optimized, so I won’t be afraid of page crash?

Thanks,
M.

CC @Cedric , but I can say that it works correctly on my device. Not sure how many buttons need to be pressed, but I pressed them all several times :slight_smile:

Maybe a memory issue?

Yes, it should be a memory issue of the browser. And it may depend on computer’ ram and other opened tabs memory used, etc.
But still it is dangerous for me to use when I see such problems on my machine and I’m looking for something more optimized.

I don’t have all of the information to answer your question.
I don’t know what system you are running, the state of your OS, I don’t know how well this scene is optimized for performance, I don’t know what buttons you pressed, and whether or not this fits an in-game use case.

I get what you are saying, but maybe you should test your actual use-case and see if it happens then?

I better didn’t use the PhysicsHelper but I did what I needed to do with physicsImpostor.applyImpulse()

I’ll be glad to take a closer look if you have a repro.
PhysicsImpostor is Physics V1, Did you try it with Physics V2 ?

2 Likes