I have been learning ARKit there are two basics to transform a object with respect to its relative position. Want to know when to use transform() method and worldTransform() method , a clear difference with example will be useful.
let transform = result.worldTransform
let isOnPlane = result.anchor is ARPlaneAnchor
object.setTransform(transform, relativeTo: cameraTransform,
smoothMovement: !isOnPlane,
alignment: planeAlignment,
allowAnimation: allowAnimation)