我一直在学习ARKit,有两个基础知识可以根据对象的相对位置来转换对象。想知道什么时候使用transform()方法和worldTransform()方法,通过示例清楚地区分会很有用。lettransform=result.worldTransformletisOnPlane=result.anchorisARPlaneAnchorobject.setTransform(transform,relativeTo:cameraTransform,smoothMovement:!isOnPlane,alignment:planeAlignment,allowAnimation:allowA
我是ARKit的新手。我想创建一个旋转对象的函数。这是我关于拖动和旋转对象的代码://Rotateobject@objcfuncrotateRecognized(sender:UIPanGestureRecognizer){letsceneView=sender.viewas!ARSCNViewletswipeLocation=sender.location(in:sceneView)lethitTest=sceneView.hitTest(swipeLocation)if!hitTest.isEmpty{sender.minimumNumberOfTouches=2letresult
我正在通过ARKit上的在线教程学习如何将对象放置在平面上。boxNode.position=SCNVector3(hitResult.worldTransform.columns.3.x,hitResult.worldTransform.columns.3.y+Float(boxGeometry.height/2),hitResult.worldTransform.columns.3.z)他使用上面的代码把它放在你点击屏幕的位置这是什么意思:hitResult.worldTransform.columns.3.x为什么是columns.3而不是columns.0?