Is unit in view of camera

321k · 84

321k

  • Jr. Member
  • **
    • Posts: 20
on: June 20, 2021, 06:49:12 am
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

  • Jr. Member
  • **
    • Posts: 20
Reply #1 on: June 20, 2021, 06:52:44 am
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.



Karsten75

  • Hero Member
  • *****
    • Posts: 7115
Reply #2 on: June 20, 2021, 09:55:32 am

'If you want to live a happy life, tie it to a goal, not to people or things.'

Albert Einstein
(1879-1955)