Getting a wheel colliders colision object

Hi there,
This is probably pretty basic but I seem to be having some trouble getting it to work neatly.
I am trying to get the name of the object my wheel collider is touching.

I’ve looked through the help and GetGroundHit seems to be the thing I need but I’m still having trouble.

I thought to print the name you’d put something like this -

print (WheelCollider.GetGroundHit.collider.name)

but it didn’t work, what am I doing wrong here?

Thanks
Pete

GetGroundHit is actually a function, and you need to pass a parameter of type WheelHit:-

var wh: WheelHit;
wheel.GetGroundHit(hit);
print(wh.collider.name);

Hey thanks Andeee!
Sorted!