hwd123 Posted April 4, 2018 Share Posted April 4, 2018 Hi all, When I put a textBlock on a rectangular plane, the text is squished - it only works correctly when the plane is a square. Is there any way to correct for this? Code below, although I'm not sure it is needed for such a simple question. Many thanks in advance to anyone that can help this.plane = BABYLON.MeshBuilder.CreatePlane("testPlane", {width: 2, height: 1}, props.scene); this.plane.parent = parentMesh; const advancedTexture = BABYLONGUI.AdvancedDynamicTexture.CreateForMesh(this.plane, 256, 256); const textBlock = new BABYLONGUI.TextBlock(); textBlock.text = "hello"; textBlock.textVerticalAlignment = 0; textBlock.color = "black"; textBlock.fontSize = 40; textBlock.textWrapping = true; advancedTexture.addControl(textBlock); Quote Link to comment Share on other sites More sharing options...
JohnK Posted April 4, 2018 Share Posted April 4, 2018 @hwd123 welcome to the forum. Am only on mobile so just a quick glance and suggest you try setting size parameters for advanced texture to be in same ratio as plane ie 512 and 256 trevordev, hwd123 and GameMonetize 3 Quote Link to comment Share on other sites More sharing options...
hwd123 Posted April 5, 2018 Author Share Posted April 5, 2018 Great! Works perfectly. Thanks very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.