Hi,
I'd like to place text above someone's head (entity) in 3D space. Only, the text command is made for 2D coordinates.
How can I do this anyhow?
Secondly, how can I use MouseX() and Mouse(Y) to show a mouse pointer (a sprite in 3D world)? Same issue here: I need to translate it to 3D space somehow.
Thank you very much!
Jeroen
hi, Jeroen
maybe you can pick the solution for your 2nd problem by reading the "2D-to-3D entity positioning (or something)" in the Code Archives (3D Graphics)
for the text-thing you can use "SetBuffer ImageBuffer(img)" to place a text in an image and then use it as a texture; see
http://www.blitzbasic.com/bbs/posts.php?topic=26403 for an example
For 3d text, I highly recommend
Fontext
I replied in the other thread.
This should work (I think). Probably not the fastest method though.
;Create a pivot to go over the character's head.
Pivot=CreatePivot()
EntityParent Pivot,Model
MoveEntity Pivot,0,n,0
;Then use something like this at the end of your main loop.
CameraProject camera,EntityX#(Pivot),EntityY#(Pivot),EntityZ#(Pivot)
RenderWorld()
Text ProjectedX,ProjectedY,"Text here"
Flip
Easier to just make a quad mesh parented to the head, and texture it with a masked texture with the text on the texture.
Actually, I don't think my way is any more difficult. Also, 'proper' text has the advantage of always being sharp, the same size and easy to read. I'd say the best method to use will depend on the situation.