cocos-docs icon indicating copy to clipboard operation
cocos-docs copied to clipboard

No description of the "mask" parameter of the "raycast" method

Open mrtzd opened this issue 3 years ago • 2 comments
trafficstars

There is no explanation for what the 'mask' parameter (for the 'raycast' method for 2D physics) does in the docs. I want to use this parameter but I don't know how.

Here's the link to the API doc: https://docs.cocos.com/creator/api/en/class/PhysicsSystem2D?id=raycast

mrtzd avatar Jun 03 '22 09:06 mrtzd

The mask of the ray-cast is related to the physics grouping, and this part is the same inside the 2D and 3D physics, which can be found in the following document:

https://docs.cocos.com/creator/manual/zh/physics/physics-group-mask.html

Thanks for the link. I was not aware of this page since I only looked at the Physics 2D section. I think it would be very helpful if you could add links to these pages inside the 2D section so people can find them easier.

mrtzd avatar Jul 11 '22 10:07 mrtzd

Thanks for the feedback, we have added the relevant links in v3.6