zumzum
zumzum

Reputation: 20148

How to map CALayer texture to cube so text in layer show up correctly?

I am adding a CALayer to a SCNBox geometry contents... It works and I see this:

enter image description here

I want to be able to see the text on the box correctly. I understand that the texture is now applied to the geometry etc...

How can make it so the text I write in the CALayer shows up horizontally around the box...?

Upvotes: 1

Views: 412

Answers (1)

mnuages
mnuages

Reputation: 13462

the default UVs (or texture coordinates) of an SCNBox are such that the same content is displayed on each side. You will have to rebuild a geometry with new texture coordinates so that the pattern does not repeat. You can start from scratch, or build an SCNBox and retrieve its geometrySources.

Upvotes: 1

Related Questions