Raycasts have no thickness. It's a test for collisions on a line from vector A to vector B (from the raycast's origin to the
You haven't shared your code but probably you just need to normalise the
cast_to vectors and then multiply it by a scalar.
Something like this:
cast_to(Vector3(1, 2, 3).normalized() * ray_length) That'll preserve the direction and allow you to control the length.