Raycasting (Sample)

Updated: 01/30/2020

Summary

You can check the ID of the touched area on the game scene during runtime.

What Functions Can Be Checked?

  • You can check the process of collision detection when you touch the model.
    • CubismRaycaster (attached to the model to handle the collision detection)
    • CubismRaycastable (attach to the mesh to give collision detection)

Easy to Use

  • When you run and click on various parts of the character, the number of touched parts and their respective IDs are displayed in the upper right corner of the screen.
    • The ID of the part can be found in RaycastingKoharu -> Drawables in the Hierarchy.

To Use the Created Model in a Sample Scene

Follow this tutorial, and you will be able to create a scene equivalent to this sample scene.

Please note that the linked procedure outputs logs to the Console, not on the game screen.

Please let us know what you think about this article.