Map Mouse to Camera View

Hello everybody,

I am trying to drag some Quads around in Renderer with Button 3D. The Problem is, that i don’t know how to map the mouse coordinates to the cameras view frustum, so that I can drag the quads with one mousemovement from one edge of the renderer to the other.

I was playing all day with Transformations, but still got no clue.

mouse_map.v4p (22.1 KB)

Someone can help?



do these demos help?


Hi joreg,

I already had a close look at those examples, but I need to move the Quads in 3D Space. Button 3d helps a lot to get the hit, but once a camera is connected to the Renderer, I don’t know how to get the drag working, since -1 to 1 doesn’t work, when the camera is translated in the z-axis.

To move something in screenspace you can multiply with inverse view rotation, you can check pointeditor 3d there is logic for that

if i get you correct here
mouse_map_1.v4p (23.8 KB)

1 Like

Hey, thank you. That helped a lot! Your contrib is great, btw.

I’m sorry that I have to bring this up again, but I just can’t figure it out. I start getting pretty desperate, so maybe someone has an idea. I made another patch to clarify the problem.

matrix_mapping_problem.v4p (21.2 KB)

When connecting the inverted view rotation I don’t get the desired effect. I tried every transform node that I could find, and tried to combine them, but that’s just guessing, since I don’t understand the mathematics of transformations.



Will check when I can…

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.