Repeating a texture over a plane in SceneKit

前端 未结 4 1123
眼角桃花
眼角桃花 2021-02-05 17:05

I have a 32x32 .png image that I want to repeat over a SCNPlane. The code I\'ve got (See below) results in the image being stretched to fit the size of the plane, rather than re

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-05 17:22

    I fixed it. It seems like the image was zoomed in. If I do imageMaterial.diffuse.contentsTransform = SCNMatrix4MakeScale(32, 32, 0), the image repeats.

提交回复
热议问题