Jump to content

Player & Camera getScreenPosition missing functions


photo

Recommended Posts

Hello,

The functions Player::getScreenPosition and Camera::getScreenPosition are not implemented in UnigineScript.

Is it an oversight? Or was it omitted for performance reason?

Thank you.

Link to comment

Hi,

Looks like an oversight. The thing is the UnigineScript version of this method was developed earlier than C++.
And you can get it by including the following header:
#include <core/scripts/utils.h>

The method signature is:
int Unigine::getScreenPosition(Vec3 point, int &x, int &y);
The code is the same as the C++ version (but it uses the current player only).
 

Best regards,
Alexander

Link to comment
×
×
  • Create New...