RealityKit – generateText() method ignores containerFrame's height

Viewed 186

I'm creating a text node containing a very long text like this

let text = MeshResource.generateText("Some very long text",
                      extrusionDepth: 0.0005,
                                font: .systemFont(ofSize: 0.005),
                      containerFrame: CGRect(x: 0.0, 
                                             y: 0.0, 
                                         width: width, 
                                        height: height),
                           alignment: .left,
                       lineBreakMode: .byWordWrapping)

The text wraps as expected, but always overflows the given containerFrame height which also results in a larger text node. Is there anything I can do about this?

0 Answers
Related