Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
How to create rotating text ?

Orochimaru
Guest
Quote
2023-12-10 16:52:13

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.


hadoken
Guest
Quote
2023-12-10 19:24:51

@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


o139
Registered User
Quote
2023-12-10 22:53:18

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 :)


luposian
Registered User
Quote
2023-12-11 22:01:01

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!



Orochimaru
Guest
Quote
2023-12-12 02:07:06

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.?


okeoke
Registered User
Quote
2023-12-12 12:42:20

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:)


hadoken
Guest
Quote
2023-12-12 13:39:37

@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...)


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact