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...
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.