Paul.Brodin Posted April 25, 2015 Share Posted April 25, 2015 Is there any way of controlling how small / large a billboard ( or any other object really) grows/shrinks to. Ideally i want a billboard placed in the world that doesnt change size, no matter how far from the object you are. Link to comment
unclebob Posted April 27, 2015 Share Posted April 27, 2015 Hi Paul, It's possible to set billboard width and height by calling ObjectBillboard::setSize (https://developer.unigine.com/en/docs/1.0/scripting/library/objects/class.objectbillboard#setSize_float_float_void). All you need to do is to determine how far this billboard is away from the camera, calculate that distance and use it to compensate perspective projection scale. Link to comment
Paul.Brodin Posted April 27, 2015 Author Share Posted April 27, 2015 Would this need to be in the update loop? i can look at that but it seemed an inefficient way of doing it Link to comment
unclebob Posted April 28, 2015 Share Posted April 28, 2015 Paul, Yes, this needs to be in update loop. Another way is to implement upscale/downscale process in vertex shader but that might be tricky and will force you to have custom material which is probably not what you want. Link to comment
Recommended Posts