rayCast X-ray and listing objects hit?

Greetings. I’ve hit a small problem where I try to list items from a row (8 items)
using rayCast.

Problem is I’ve been able to only get the name of the first item so I’m pretty sure I’m doing something wrong with x-ray settings.

My rayCast code is:


rayHit = own.rayCast(ray1target, own, 0.0, "", 1, 1, 0)
print(rayHit[0].name, rayHit[1].name)

if I print only “rayHit[0].name” I get the right results of the first hit item, any more than that and it’ll give me:
“AttributeError: ‘mathutils.Vector’ object has no attribute ‘name’”

This method does not return a list of KX_GameObjects. It returns a tuple of various data. Please check the API for details.

I have never used rayCast. But if it is like the ray sensor, it will only hit one object. Even when set to x-ray, the ray sensor only returns one object because it passes through other objects until it hits one with a certain property