First person raycast

i was unable to implement a ray cast in first person how would i do so? PlayCanvas | HTML5 Game Engine


You need to two things:

  1. Add some code in your raycast.js script (all methods are empty now!).
  2. Attach it on an entity so it takes part in your scene.

Here is a good starting point, the Raycast tutorials and example projects:

1 Like