Skip to main content
1 of 6

How To Divide A Line In 3D Into Small Portions

I have a voxel game where I want to know which block the players camera is facing. To do this I have a line the distance allowed for the player to interact with the world cast from the center of the camera with its two rotations. How do I divide the line (ROX, ROY, ROZ) to (CPX, CPY, CPZ) by a certain amount of divisions held by a vatiable LineDivisions.