fateriddle Posted October 18, 2018 Share Posted October 18, 2018 new Ray(origin: Vector3, direction: Vector3, length?: number): Ray is how you create a ray. Basically I want to draw a ray from camera to the center point of the screen, and cast that ray to see if it hits any mesh. Origin is the position of the camera, but I've got no idea how to calculate direction, since center of the screen is a (x,y) not a (x,y,z)... Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 18, 2018 Share Posted October 18, 2018 hi i am on it https://www.babylonjs-playground.com/#BVG26D#9 you most read about events here https://doc.babylonjs.com/babylon101/first sorry about ugly coding i just try find a solution i work fix this problem (slowly) GameMonetize, bghgary and DylanD 3 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 18, 2018 Share Posted October 18, 2018 Flagging as solved (perfectly furthermore ;)) Thanks @NasimiAsl NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.