I noticed something a little peculiar about Ray.new() and I was wondering if anyone knew why.
I wanted to create a ray cast from one cube to another cube, so I simply inputted the Origin and Direction like this:
local rayCast = Ray.new(Cube.Position, targetCube.Position)
I thought it would be like a CFrame.new(Position, LookAt) type deal, but I found that the ray cast was firing at an angle instead of directly in the direction of the target.
I checked out the API and found this bit of code and applied it to my own ray cast
local rayCast = Ray.new(Cube.Position, (targetCube.Position - Cube.Position).Unit * 300)
Why does this directly target the cube, as opposed to my first attempt where it shot out at an angle?