小编Ale*_*lex的帖子

使用SCNShape和UIBezierPath绘制弧

我正在尝试SCNShape使用以下代码来绘制一块馅饼:

UIBezierPath *piePiece = [UIBezierPath bezierPath];
[piePiece addArcWithCenter: CGPointZero radius:  0.150 startAngle: 0.0 endAngle: M_PI/6  clockwise: YES];
[piePiece closePath];
SCNShape *pieShape = [SCNShape shapeWithPath: piePiece extrusionDepth: 0];
pieShape.firstMaterial.diffuse.contents = [UIColor blueColor];
pieShape.firstMaterial.doubleSided = YES;
SCNNode *pieNode = [SCNNode nodeWithGeometry: pieShape];
Run Code Online (Sandbox Code Playgroud)

但我得到以下形状:

样本 我看不到弧线。我究竟做错了什么?

谢谢

objective-c ios scenekit

5
推荐指数
1
解决办法
224
查看次数

标签 统计

ios ×1

objective-c ×1

scenekit ×1