Hi guys! Does anyone know how I can raycast from a point on the screen, and detect any collisions with any object on the screen?
u need screenToWorld from your camera :
this.cameraEntity.camera.screenToWorld(screenPosition.x, screenPosition.y, this.cameraEntity.camera.farClip, ray.direction);
where screenPosition is your 2D click on the screen & where Ray.direction is the vector u get as return in your 3D world.
or just look at point&click tutorial.
1 Like
Thanks guys! I have figured this out now! Thanks for all the help
1 Like