armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.08k stars 319 forks source link

Screen Space Node: add result vector position At #3072

Closed t3du closed 1 week ago

t3du commented 2 weeks ago

Previous version of the node retrieved origin (label as world) and direction and they needed to be combined in order to get the desired coordinated. Which until now I didn't know how to use it to get the right world position. Since ray class has a function name "At" that does that, i think is better to output this result for a simple way of using this node.

I also added basic description which explains vector "At" considers the "Origin" point where the ray is emitted from the camera and uses "Distance at" to multiply its "Direction".

image

Here is a sample of the same cube spawn at different screen positions with different distance at values using the node:

image