# MeshBuilder.CreateText

**URL:** <https://forum.babylonjs.com/t/meshbuilder-createtext/40958>\
**Category:** Announcements\
**Created:** [May 18, 2023, 11:54pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958 "2023-05-18T23:54:02Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 18, 2023, 11:54pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/1 "2023-05-18T23:54:02Z")

</div>

Hey team! I’m super glad to share a new feature that was just pushed to NPM and the PG: The MeshBuilder.CreateText function!

[Creating A 3D Text object | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/text)

In a nutshell, it is a simple feature that let you create a regular mesh out of a text and some font definition.

[3D text example | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#6I2RMN#2)

https://playground.babylonjs.com/frame.html#6I2RMN#2

---

<div class="post-metadata">

**Author:** ![DRLeria](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drleria/32/50928_2.png) [@DRLeria](https://forum.babylonjs.com/u/DRLeria)\
**Post date:** [May 19, 2023, 12:13am UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/2 "2023-05-19T00:13:15Z")

</div>

OMG!!!

Thanks a lot!!  
Great contribution needed  
BJS is going up 🚀 🚀 🚀

![ZmBPwn-360](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/0/703b9f48ed871d92a1ef88f62538859b92fb594d.gif)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 19, 2023, 12:23am UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/3 "2023-05-19T00:23:18Z")

</div>

Haha thanks 😃

---

<div class="post-metadata">

**Author:** ![Dad72](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dad72/32/13_2.png) [@Dad72](https://forum.babylonjs.com/u/Dad72)\
**Post date:** [May 19, 2023, 12:26am UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/4 "2023-05-19T00:26:41Z")

</div>

That’s super cool. THANKS

---

<div class="post-metadata">

**Author:** ![lb\_artworks](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lb_artworks/32/29563_2.png) [@lb\_artworks](https://forum.babylonjs.com/u/lb_artworks)\
**Post date:** [May 25, 2023, 4:42pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/5 "2023-05-25T16:42:41Z")

</div>

so much appreciated !!!

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [May 26, 2023, 7:00pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/6 "2023-05-26T19:00:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/2/524c640c1809cc74659227fa538cb098684f1a15.png)  
Looks like some of the special chars need some special love.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 26, 2023, 7:40pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/7 "2023-05-26T19:40:30Z")

</div>

Which font is it?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 26, 2023, 7:41pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/8 "2023-05-26T19:41:29Z")

</div>

Oh wait no, that should have been fixed…I’ll check why it is not

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 26, 2023, 7:45pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/9 "2023-05-26T19:45:10Z")

</div>

[Check why # character is rendered incorrectly with TextBuilder · Issue #13907 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/issues/13907)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 30, 2023, 5:22pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/10 "2023-05-30T17:22:06Z")

</div>

Fixed!

---

<div class="post-metadata">

**Author:** ![hfoucher](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hfoucher/32/35439_2.png) [@hfoucher](https://forum.babylonjs.com/u/hfoucher)\
**Post date:** [October 11, 2023, 11:51am UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/11 "2023-10-11T11:51:55Z")

</div>

Thanks a million for this. You made my day. I have been struggling for a while creating 3D Text for my application. It now works like a charm. Keep up the good work !

Question: could you please confirm that the x,y,z point around which rotation applies is indeed at the center of mass of the 3D Text? Thanks.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [October 12, 2023, 8:32pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/12 "2023-10-12T20:32:27Z")

</div>

It is! I compute the center of the bounding box for that

---

<div class="post-metadata">

**Author:** ![hfoucher](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hfoucher/32/35439_2.png) [@hfoucher](https://forum.babylonjs.com/u/hfoucher)\
**Post date:** [November 3, 2023, 8:53pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/13 "2023-11-03T20:53:45Z")

</div>

Ok. There is something weird from my point of view. When creating the mesh and positioning it at 0,0,0, the center of the bounding box is clearly offset from the origin:

> **[Babylon.js Playground](https://playground.babylonjs.com/#6I2RMN%23147)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 3, 2023, 10:09pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/14 "2023-11-03T22:09:55Z")

</div>

I will let @Deltakosh comment on this one 🙂

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 4, 2023, 12:14am UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/15 "2023-11-04T00:14:32Z")

</div>

PR is here [CreateText does not align text on z by sebavan · Pull Request #14493 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/14493)

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [March 10, 2024, 4:10pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/16 "2024-03-10T16:10:13Z")

</div>

some lower case letters need some special love:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/2/b2241102d0e35d05cbed1ca03ef30d66f673583d.png)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/1/c1640f5e70ca67ad233f760906a58f9f654eb799.png)

and uppercase letters like J and Q, too:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/1/61b57954616aff2fd0bc32fda8fecd283ebd0dce.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [March 11, 2024, 9:42pm UTC](https://forum.babylonjs.com/t/meshbuilder-createtext/40958/17 "2024-03-11T21:42:59Z")

</div>

The full mesh is aligned so it is kind of expected if you generate letter by letter
