[SOLVED] cc.director.getCollisionManager is not a function?


I am new to this i am trying to enable the physics… on Cocos Creator version is 3.1.2
But getting error…

Any help will be appreciated! :pray:


You can refer to this.

you must import director

@Koei Thanks for reply

I tried this I guess it should draw border surrounding the true sign… But there is no border
Please Correct me if i am wrong…

@perfecto Thanks for reply
I tried using director in import but it still giving me same error…

This needs to switch the 2d physics engine to builtin, the camera visibility needs to be checked DEFAULT.


@Koei Thank a lot you saved my life :grinning:

I referred this for collision detection with another object.

I added another sprite with different group name to test out collision and it worked…

Thank you very much! :pray: