Name above the player's head?
Blitz3D Forums/Blitz3D Programming/Name above the player's head?
| ||
Does anyone know how to put name above player's head? |
| ||
could you use a sprite with with positionentity sprite Entityx(entity),entityy(entity)+#,entityz() |
| ||
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. |
| ||
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. |
| ||
This thread was dedicated to that particular subject: http://www.blitzbasic.com/Community/posts.php?topic=83085 |
| ||
This thread was dedicated to that particular subject: with a nigh on identical title too and only a month ago |
| ||
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 |
| ||
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. |