Page MenuHomeFeedback Tracker

[Feature Request] New camera commands
Feedback, NormalPublic

Description

  1. 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)
  1. 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

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 updated the task description. (Show Details)May 16 2024, 6:34 PM
Leopard20 renamed this task from [Feature Request] New camera script commands to [Feature Request] New camera commands.May 16 2024, 6:38 PM
Leopard20 updated the task description. (Show Details)
dedmen added a subscriber: dedmen.EditedJun 4 2024, 10:49 AM

All this can be replaced by getCameraProjMatrix with https://community.bistudio.com/wiki/matrixMultiply
It would be so neat if that were a simple thing to do.
probaly a matrixFromTransform [position, direction] as a helper to get a position matrix.
and matrixInvMultiply?

dedmen changed the task status from New to Feedback.Jun 4 2024, 1:25 PM
dedmen set Ref Ticket to AIII-56430.
SaMatra added a subscriber: SaMatra.Jun 6 2024, 8:09 AM