How to get Physics World in Cocos Creator?

How to get Physics World in Cocos Creator?
0.0 0

#1

I used builtin physics component and don’t know how to get Physics World from the engine in simulator. Could anyone can help?


#2

Try like this

physicsManager = cc.director.getPhysicsManager()
world = physicsManager._world

#3

Thanks. I’ve already tried this but it does not work in simulator/devices.