Detect contact BoxCollider2D without RigidBody at CC3.6?

Hi,
Can anyone show me how to detect contact between BoxCollier2Ds without RigidBody at cc version 3.6? I have tried docs, used RigidBody but i have many objects that cause reducing FPS.

Many thanks,

@Koei Thanks but i have seen this demo post by @zzf_Cocos before, i see all of demo use rigidbody. I need detect without them.


like this?

@Koei idk why in cocos-test-projects

PhysicsSystem2D.instance.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);

can works,I just simply copy but nothing happen, I create node with collider exactly like cocos-test-projects, I try with cc 3.5.1,3.6.0,3.6.2

image


i put 2 nodes has collider together but onBeginContact() doesn’t run


You need to switch physical systems.

2 Likes

@Koei thanks, I think it should be added to docs, I spend hold day for this