Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi there, I am new to coppercube and I would like to rotate the text in my project. I tried the built in plugins but nothing works, please help me if you guys know how to rotate the Text. |
||||
|
@Orochimaru you can not use system font CopperCube default text on a 2d overlay to be rotated which is unfortunately not supported by now but you can play rotating text animations from pre-rendered dynamic image sequences on CC overlays, planes or billboards or you can also use a simple static image texture of some text -> applied to a plane (png files with trans_alphach material support transparent backgrounds) -> then use built-in rotate behavior to rotate plane with text image texture around user defined axis |
||||
|
wrote or you can also use a simple static image texture of some text -> applied to a plane (png files with trans_alphach material support transparent backgrounds) -> then use built-in rotate behavior to rotate plane with text image texture around user defined axis just like i would do :) |
||||
|
The talk of rotating text got me to thinking... wouldn't it be cool if someone were able to create a Demo (you know, like the C64, Commodore Amiga, and Atari ST had back in the day) with CopperCube? I'd love to see something like that! |
||||
|
Thanks, but I don't want to use image, as my app need the text to be updated or changed. Please I need this feature, how to do that for 2D Text Overlays only.? |
||||
|
Hi Orochimaru, You can render your text to a 3d model and rotate it. The simplest way would be to precreate and generate a plane as it's described here: https://www.ambiera.com/coppercube/doc/cnt_scriptgeometry.html. Your plane should have as many rectangles as there are letters in your text. Add a material containing full font like: https://opengameart.org/sites/default/files/KenPixel.png. Now you set texture coordinate using ccbSetMeshBufferVertexTextureCoord, as it's described in "generate geometry" link provided above in order to set UV coordinates for each rectangle to be the coordinates of required letter. Or better write a function which can update uv coordinates dynamically based on a string input. Or you can just discard rotating text feature, since it most likely doesn't affect your gameplay, and put more work to core-mechanics of your game:) |
||||
|
@Orochimaru, if you're targeting Windows .exe plus if you would use planes as dynamic updating text displays my CopperCube Bitmap Font Toolkit can do what you're asking for: http://CopperCube Bitmap Font To... (Although my resources are currently very limited, I could however provide a detailed guide if you would consider a small donation...) |
|