There is a
user:ProjectPositionToScreen(vector) function in lua, but using it in lua means that we would need to pass the data into a JSModel whenever we want to update the widget. So every update needs to pass and convert the data from lua to C++ to js over and over again. Having a
Crayta.convertToScreenPosition(obj) function in js would allow passing the data only once for a given set of coordinates.
Another huge benefit of this idea would be, that this functionality would allow using screen widgets as debug tools/visualizers in edit mode since
user:ProjectPositionToScreen(vec) is not available while simulating entities (since there is no user entity that could be referenced).
Would really appreciate this feature a lot.