Detect if Ray passes through object pivot

I want to calculate if a Ray that is launched from the Player head is hitting the Object’s pivot. Now the problem that I have is that the pivot isn’t a surface that can get hit right? Would it be possible to see if maybe a point of the ray matches the object’s pivot?

This is what I have so far:

var actorHead = Vector3 (transform.position.x, 1.6, transform.position.z);

var rayToPivot = (Player_Navigation.selectedObject.position - actorHead);
var hitPivot : RaycastHit;
var seePivot : boolean;
	if (Physics.Raycast (actorHead, rayToPivot, hitPivot)) {
    	Debug.DrawLine (actorHead, hitPivot.point,;
        if (hitPivot.transform.position == actorProperties.currentlySelectedObjProperties.transform.position && hitPivot.distance < 10.0 ) {
            seePivot = true;
		else {
			seePivot = false; 

Thanks for the help!

You could use the line equation to check if a point (pivot) belong to your line. But the pivot is a point, and a point by definition has no dimensions, meaning that it would only return true if the point matches exactly the line. I don’t think that’s the behavior you’re expecting.

I recommend you do add a tiny box or a tiny sphere collider and position it right in the pivot, so you can adjust the collider size to make it harder/easier to hit.