Name above the player's head?

Blitz3D Forums/Blitz3D Programming/Name above the player's head?

Guy Fawkes(Posted 2009) [#1]
Does anyone know how to put name above player's head?


Aussie(Posted 2009) [#2]
could you use a sprite with with
positionentity sprite Entityx(entity),entityy(entity)+#,entityz()



Matty(Posted 2009) [#3]
Use the cameraproject command.

Cameraproject mycamera,entityx(myplayershead,true),entityy(myplayershead,true),entityz(myplayershead,true)
if projectedz()>0 then
;in front of camera

text projectedx(),projectedy()-20,"My Characters Name Is abcdefg etc",true,true


endif 


Obviously using the command 'text' while in 3d mode is not the best way of doing it but the basic idea for getting a point above the character's head is there.


BlitzSupport(Posted 2009) [#4]
Try this code, but as Matty suggests, it would be best to replace the Text command with a sprite containing the text, since it will be slow on some graphics cards.


Ross C(Posted 2009) [#5]
This thread was dedicated to that particular subject:

http://www.blitzbasic.com/Community/posts.php?topic=83085


Ginger Tea(Posted 2009) [#6]
This thread was dedicated to that particular subject:

with a nigh on identical title too and only a month ago


grindalf(Posted 2009) [#7]
would it be better to do createimage and then draw the text onto the image when loading the area that way in game you could just use
cameraproject
drawimage projectedx,projectedy
that wouldent be a problem for graphicscards right?
you couls even add the characters hp, mp onto the image aswell


Matty(Posted 2009) [#8]
Use something like nsprite which has its own 2d-in-3d bitmap font system and you've got no problem with this sort of thing.