Text with 3D Camera.. is it even possible?

Hello fellow game makers. I’m trying to achieve this kind of effect in Phaser 3

So something like a field of floating textfields with perspective, that moves like a starfield and reacts to the mouse movement… (with panning horizontaly and verticaly while texts in the back moves slower then the one in the front)

I am looking at a camera 3D plugin that should be able to do what I need… basicaly this example :
Phaser - Examples - but with objects moving on Z axis (not camera) and starting from alpha 0 and becoming fully opaque as coming closer…

However; I haven’t seen any example (or even in the source code) with the Text instead of Sprites…

I think it should be possible as this is mentioned here :

You can actually use any Game Object you like, including Text, as long as it can be positioned and scaled.

Anybody knows how?

As far as I’m aware Phaser 3 does have a Sprite3D object but it works like a billboard sprite, so always faces the camera direct on.

There is a three.js integration, but that might be overkill for what you need.

I’d be tempted to roll my own for something like this. Track each word in 3D space and update the alpha, rotation, depth and vertices to give the illusion of 3D.

Updating the vertices will probably be the only fiddly bit. Here’s how you can access them
http://labs.phaser.io/edit.html?src=src/game%20objects\mesh\basic%20quad.js

1 Like

Thanks fzz…

I too think I will have to end up with my own implementation, it would be just so much easier if Phaser supported Text as 3D object natively, and moreover why is Text mentioned in conjuction with 3D Camera here in the devlog then : https://phaser.io/phaser3/devlog/98 ?

Maybe it was planned , but they decided to pull it later on… dunno.

as for your example with vertices, I don’t think I’ll need to update those in my case…