How Can i get ARPlane Coordinate

Hi. I want to draw line on AR World’s Floor. So first, I use AR raycast and draw the floor. I Check the floor area is fill the Plane’s Mesh. And I make a Cube that touch on plane mesh area. So I think floor’s area is similar real world’s floor. But I can not get the floor’s Coordinate. How can i get the mesh area’s Coordinate?

Here is a Code when i make a cube when touch on mesh area and app’s screenshot.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;

public class FloorEvent : MonoBehaviour
{
public GameObject prefabToPlace;
public ARRaycastManager aRSessionOrigin;
public List<ARRaycastHit> hits;

void Start()
{
hits = new List<ARRaycastHit>();
aRSessionOrigin = GetComponent<ARRaycastManager>();
}

void Update()
{
if (Input.touchCount > 0)
{
for (int i=0; i < Input.touchCount; i++)
{
Touch touch = Input.GetTouch(i);
if (touch.phase == TouchPhase.Began)
{
if (aRSessionOrigin.Raycast(touch.position, hits))
{
Pose hitPose = hits[0].pose;
Instantiate(prefabToPlace, hitPose.position, hitPose.rotation);
Debug.Log("1 : "+hitPose.position);
}
}
}
}

}
}

Hello YSK1015, I am pretty new to ARFoundation myself but I have worked on a similar project before.
If I understand this correctly, you want the prefabToPlace to be on top of the plane created and not intersecting like it shows in the screenshot?

If that is the case, I suggest looking at the origin of the prefabToPlace and ensure that set at the bottom. You can check this by placing it on a plane in the Editor( with transform positions set to (0,0,0)).

Hope that helps!