OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: LurchiDerLurch on 30 Aug 2009, 13:01:55
-
Hello
Yesterday i had an idea how to create some name tags that "seem" to stay 3D over the heads of players. (like in Battlefield 2)
With Mando's Script "Mando Angles by Mandoble" i got the idea to create a name tag (control with name) over the soldier's head and then let in move when player turns.
http://www.ofpec.com/ed_depot/index.php?action=details&id=441&game=ArmA
After hours of trying to get the angle of the camera I found "SPON_viewVector v1.0.0", which was exactly what i needed ^^
http://www.ofpec.com/forum/index.php?topic=31686
So i changed Mandos script so that it uses the Camera Direction and so on here's my result:
Screenshots:
(http://www.abload.de/thumb/arma2009-08-3012-01-20ufj0.jpg) (http://www.abload.de/image.php?img=arma2009-08-3012-01-20ufj0.jpg)
(http://www.abload.de/thumb/arma2009-08-3012-01-25gir1.jpg) (http://www.abload.de/image.php?img=arma2009-08-3012-01-25gir1.jpg)
(http://www.abload.de/thumb/arma2009-08-3012-01-383iqe.jpg) (http://www.abload.de/image.php?img=arma2009-08-3012-01-383iqe.jpg)
Video:
http://www.youtube.com/watch?v=Ho91VHYFgnc
Then i want to ask Mando and Spooner if they agree that i used their scripts? :good:
Heres the script:
http://www.file-upload.net/download-2025938/InGameNameTags_0-2e1.Intro.zip.html
I hope you understood my english :D
LurchiDerLurch
-
At least you can use mine, and I would say Spooner would not be against using his one. Good work there LurchiDerLurch :good:
-
Take a look at the copying from SPON_viewVector v1.0.0 and you'll see that he allows you to modify the code.
-
thanks :)
hm... i tried to get the y-axis to work but this seems to be a problem... :confused:
maybe because the distance between the player and the object becomes important... :scratch:
I'm not sure how to get the player's Y-azimuth...
the one for X looks like this:
_vector = call SPON_viewVector;
// X
// Calculate angle from vector (-180..+180).
_azimuth = (_vector select 0) atan2 (_vector select 1);
// Convert to 0..360 azimuth value.
_degX = ((_azimuth + 360) mod 360);
but for Y it doesnt work and is a bit of 'freaky' :blink:
it's nice without Y, too ^^