In almost all tutorials of ARKit, it seems that we always use ARPlane for floor.
let planeGeometry = SCNPlane(width:CGFloat(planeAnchor.extent.x), height:CGFloat(planeAnchor.extent.z))
let planeNode = SCNNode(geometry:planeGeometry)
planeNode.position = SCNVector3(x:planeAnchor.center.x, y:0, z:planeAnchor.center.y)
planeNode.transform = SCNMatrix4MakeRotation(-Float.pi / 2, 1.0, 0, 0)
What if you wanted an infinity plane (for casting shadows)? I tried SCNFloor and the result is weird - the floor hung in mid air:
let planeGeometry = SCNFloor()
let planeNode = SCNNode(geometry:planeGeometry)
planeNode.position = SCNVector3(planeAnchor.center.x, 0, planeAnchor.center.z)
I have done a Google search and the only result I have come out with is this (which also does not work): https://github.com/arirawr/ARKit-FloorIsLava/blob/master/FloorIsLava/ViewController.swift
Does SCNFloor() works in ARKit? If not, what can I do to create an big plane?