Reputation: 7008
I have a simple SCNShape
that I want to update based on a user pinch.
let path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: 0.4, height: 0.4), cornerRadius: 0.02)
let swatchGeometry = SCNShape(path: path, extrusionDepth: 0.01428)
let swatchNode = SCNNode(geometry: swatchGeometry)
To achieve this, should I do a transformation to the UIBezierPath or is there a property that I can manipulate on the Node or Shape to achieve what I want? I'm only looking to change the width and height of the object.
Upvotes: 0
Views: 170
Reputation: 4485
You have property scale
:
swatchNode.scale = SCNVector3(x: 0.5, y: 0.5, z: 0.5)
Upvotes: 1