Reputation: 63
SceneKit custom geometry:
I know multi position(SCNVector
).
how do I create the custom geometry
.
the bottom side position:(0,0,0) (50,0,0) (50,0,-50) (150,0,-50) (150,0,125) (0,0,125) (25,0,75) (25,0,50) (0,0,50)
the top side position:(0,2,0) (50,2,0) (50,2,-50) (150,2,-50) (150,2,125) (0,2,125) (25,2,75) (25,2,50) (0,2,50), y—axis move 2
Upvotes: 1
Views: 633
Reputation: 56625
Given that you have a flat shape with a constant height, it would be easiest to create a 2D UIBezierPath
for that shape and create an extruded SCNShape
with that path where the extrusion depth is the thickness of your geometry.
Upvotes: 1