O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Ray Casting and Filters

Collision detection is a powerful tool to calculate hits and the intersection of two or more objects in a game scene but not sufficient for most cases where we need to predict collision before it actually happens. This chapter will unveil a very powerful concept in game development called ray casting, to cover cases that cannot be handled by collision detection. We will use ray casting to implement another very interesting technique called picking, which is used by CAD software. Picking is useful for many interactive use cases, where we need to map a mouse click by the user (2D screen coordinates) to the local/world space of the objects in the scene.

Framebuffers is another very powerful concept used in game ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required