armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.05k stars 317 forks source link

Screen to world space node produces incorrect output. #1626

Closed QuartzKnight closed 3 years ago

QuartzKnight commented 4 years ago

Thank you for contributing to Armory!

The Screen to world space node produces an incorrect output.

Place a camera looking straight down at (0,0,10) Create a nodetree with a mouse coords node and feed the coords output into the input of a Screen to world space node, probe the output of both nodes and assign the nodetree to an active trait. Run and check the output of the screen to world space node for different mouse positions, the values are much higher than the camera plane's width and height.

I expected the X value of the output to range from 0 to the with of the camera plane, and for Y from 0 to it's height.

Blender:2.81 Armory:2019.10.0 OS:Windows 7 64 bit

ScreenToWorldTest.zip

shedatc commented 4 years ago

Is it somewhat related to the solution proposed here on the forum: Compute world coordinates from mouse coordinates?

knowledgenude commented 3 years ago

Link to https://github.com/armory3d/armory/issues/1866