How to put text over node in scenekit?

徘徊边缘 提交于 2019-12-05 13:31:36

You'll need to create a texture of the desired font and text, then apply that as a part of the material on the object. Though I've not seen anything like UVW mapping in Scene Kit to let you control the placement. It must be there. If you're only working with SCN geometry you might be OK, because SCNBox at least permits per side specification for material/texture.

You can dynamically create 2D type textures with either UIKit text drawing to a context, or rasterisation of Sprite Kit text with use of textureToNode: https://developer.apple.com/reference/spritekit/skview/1520114-texturefromnode?language=objc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!