How to Solve Cocos Creator 3.x 2D Ray Detect Error

According to the document, an error is reported when using 2D radiographic testing.

Official document


At least one object in the scene must have both RigidBody and Colliders.


Add RigidBodyand Colliders to the object to be detected at the same time

Read More: