- Binary alternatives to some commands, taking a camera as the LHS arg:
worldToScreen:
cam worldToScreen posAGL (or posASL, which I prefer)
screenToWorld:
cam screenToWorld uiPos (returns AGL, or better, ASL)
positionCameraToWorld:
cam positionCameraToWorld relPos (returns AGL, or better, ASL)
- A new scripting command: screenToWorldVector, (alt names: posScreenToDirection, screenToDirection).
It's similar to the first step of screenToWorld, i.e. it returns the direction vector that is needed for screenToWorld to do the intersection.
The reason I ask for this command is that screenToWorld tries to perform an intersection, which is both costly, and may return undesired result.
Unary version for the main camera:
posScreenToDirection uiPos
Binary version for any camera:
cam posScreenToDirection uiPos