Is unit in view of camera

Started by 321k, June 20, 2021, 06:49:12 AM

Previous topic - Next topic

321k

This is a feature request: I would like to have a command, that returns a bool if a certain Unit is in view of camera angle or not. That would allow to stop units any animation like stuff when nobody looks at it, allow to develop some nicer animated stuff without lagging the game.

Actually I am not sure about the math in this case, I think if I would try it by script, the opcodes I would need to calculate it would eat up the benefit.

321k

PS: By the way, a command which just returns the game speed (1/2/4), a number which the game knows, would help scripts to adjust or disable animations, too. Some animations make no sense in 4times speed, so it wouldsave lag, too.