View Full Version : Rotated text on HUD
11-29-2007, 07:18 AM
Did anyone figure out yet how to draw rotated text onto the HUD?
In previous engine generations you could draw text to a ScriptedTexture and somehow put that onto the HUD (TexRotator or some rotated sheet actor in front of the player), but UT3 doesn't seem to have ScriptedTextures anymore.
11-29-2007, 08:03 PM
native final function DrawRotatedTile( Texture2D Tex, rotator Rotation, float XL, float YL, float U, float V,float UL, float VL, optional float AnchorX, optional float AnchorY);
native final function DrawRotatedMaterialTile( MaterialInterface Mat, rotator Rotation, float XL, float YL, optional float U, optional float V, optional float UL, optional float VL, optional float AnchorX, optional float AnchorY);
found those in the canvas class. might be of use to you
11-30-2007, 09:57 AM
That'd mean I'd have to draw each character individually - not exactly what I had in mind.
11-30-2007, 10:13 AM
I bet you can't make a new texture out of a string of text? :P
11-30-2007, 10:45 AM
Nah, those two words only look similar. ;)
11-30-2007, 03:02 PM
Oh god, I just noticed something.
This is how the Flak Cannon ammo counter works:
11-30-2007, 03:07 PM
11-30-2007, 03:08 PM
LOL That's funny
11-30-2007, 03:10 PM
And soon, the casino and brothel mod shalt be made.
11-30-2007, 03:49 PM
rofl... i guess thats one way to do it
11-30-2007, 04:03 PM
Yes, but just how desperate do you need to be to do something like this?
11-30-2007, 06:49 PM
Haha, that's priceless.
Got to give them points for ingenuity there, that's a clever hack :)
EDIT: There does not appear to be a good 'non-hacky' way of drawing rotated text on the HUD; you could put in a request for a future patch to allow you to attach a canvas to a TextureRenderTarget2D, so that you can simulate scripted textures (I'm not sure why you aren't already able to actually).
I'm not sure how difficult that would be to code, but it would be infinitely useful as it could also be used to cache parts of HUD rendering (esp. the radar map, among other things) and thus speed up performance.
11-30-2007, 07:00 PM
That's not a hack, that's the artists insisting that it would be cooler if you could see the numbers animate when you fired. Of course, then they made the firing animation have enough kickback to put the ammo counter offscreen. :P
The Canvas supports a transformation matrix that would let you draw arbitrary rotated stuff, but we only exposed the translation part to script. Oops. I will try to get it added for a patch, but it's highly unlikely it will make the first patch.
11-30-2007, 07:03 PM
Ah, yes that makes sense :) Check my edit above, it would be nice to see a feature like that in a future patch too.
Powered by vBulletin® Version 4.2.0 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.