Tiel Posted October 5, 2016 Share Posted October 5, 2016 I'm looking for a way to have a billboard always face the screen, not just the camera position in the world.This is to put a kind of 3D text above certain objects-kinda like waypoints but editable (is there a term for this?). What I have now works well enough, just not supergood with the BBs presenting themselves at an angle to adjust to the camera.I think the only alternative would be to have hidden textctrls on playgui and schedule them to update when a special object is in view, though that seems less than ideal.Greatly appreciate any input here Quote Link to comment Share on other sites More sharing options...
Duion Posted October 6, 2016 Share Posted October 6, 2016 That is what shapenames are for, they are enabled by default for player objects, but they just have regular text, not 3D text. Quote Link to comment Share on other sites More sharing options...
Tiel Posted October 6, 2016 Author Share Posted October 6, 2016 Thanks for your thoughts,I was never able to get shapenameHUD working, it's reluctant to function when set up like soWhat I'm working with is http://imageshack.com/a/img924/6854/I6LWgT.pngI'm not certain it's possible to get similar results with shapeNameHUD - also there's a lot going on in the gamespace and not sure how to make the control discriminate objects. Quote Link to comment Share on other sites More sharing options...
kent Posted October 8, 2016 Share Posted October 8, 2016 I think the ShapeNameHud should basically do what you want. The control already walks the client object list, culls obstructed objects, positions text in relation to the object in 2d gui space, then scales the size and performs a fade-out based on distance.At worst it would take some minor tweaking of the gui's C code to get it the way you want it. For example, the text does not currently rotate to match the object.To get any shapeBase-derived object (pretty much everything with a 3d model) to display a name, the object must be assigned a shapeName using Object.setShapeName("name"). The full template will set the shapeName automatically for players - based on player name sent when connecting to the server (which defaults to "visitor"). It also sets the field for vehicles/turrets - based on a field "nameTag" defined in a vehicle/turret's datablock. At least in the 3.8 template ... I haven't played with the 3.9 one yet.If those routines are bypassed or the name-popup functionality is desired for additional object types, it is necessary to call the setShapeName() function on the objects when they are added in script. Quote Link to comment Share on other sites More sharing options...
Duion Posted October 9, 2016 Share Posted October 9, 2016 I would just go with what is already there and extend it later eventually, if you want to customize everything from the beginning you will just waste time on unimportant visual extra features instead on spending time developing the core game. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.