Cloud Stack Ninja

I'm trying to draw 3D paper plane with rounded corner in ARKit, but I can't do that.

I did that with bazier path:

    // create bezeir path
    let path  = UIBezierPath()
   
    // A bezier path
    path.move(to: CGPoint(x: 0, y: 0.025))
    path.addLine(to: CGPoint(x: 0.02, y: -0.005))
    path.addLine(to: CGPoint(x: 0, y: 0))
    path.addLine(to: CGPoint(x: -0.02, y: -0.005))
    path.close()
     
    // create arrow shape
    let arrowShape = SCNShape(path: path, extrusionDepth: 0.001)
    arrowShape.chamferRadius = 50
  
    // create new node
    arrownode = SCNNode(geometry: arrowShape);
       
    // set arrow color
    arrownode!.geometry?.firstMaterial?.diffuse.contents = UIColor.yellow 

The result :

enter image description here

I need like this exactly but with rounded corner.



Read more here: https://stackoverflow.com/questions/64398280/arkit-drawing-3d-paper-plane-with-rounded-corner

Content Attribution

This content was originally published by lady at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: