Lumberyard Tutorials by Jonathan Capes

Raycasting to the Cursor

Introduction

Select entities during gameplay with the mouse cursor.

In this tutorial learn how to:

  • Set up a level to use PhysX raycasting.
  • Create a reusable function to Raycast to the mouse cursor.
  • Create a Script Canvas graph using the Raycast function.
  • Filter the raycasts based on PhysX Collision Groups.

Raycasting to the Cursor

Raycasting to the Cursor

Project Requirements

For this tutorial the following Gems and their dependencies must be enabled in your project: Script Canvas PhsX DebugDraw