Reputation: 8312
I am experimenting with ARKit and SceneKit and have been able to place boxes or custom shapes using UIBezierPath. What I’d like to do next is draw text and place images on the surface of these shapes. I’ve tried adding an image to the material property but this just fills the shape with an image. I’d like to have control over the size and position of the image / text relative to the shape. Is this possible?
Upvotes: 2
Views: 568
Reputation: 15410
You can do so by creating a new node for your text or image, and add it as a child node of your existing SCNNode (addChildNode
). You can then position it as needed relative to your parent node, much as you have already done with your SCNNode.
For text you can make your SCNNode from an SCNText
, or render the text into a bitmap and use it as a texture material of an SCNPlane
.
Upvotes: 4