![blend4web logo](/static/blend4web/images/header/logo.png?v=715e5ddd26e58d894b26f26d2612d929)
Ray casting is a widely used method in interactive graphics and in game development, for example, for measuring distances, detecting visibility of objects and confirming the outcome of shots fired. This method is based on checking the intersection of an imaginary line with objects.
Practical use of this functionality can be seen in this simple yet funny demo. Please pay attention to traces left by mouse clicks - they are implemented with textured planes aka decals.
You can browse through the code listing by clicking the View Code button. The source files for this example are present in both Community Edition and PRO distributions.
See also: