Rotate instance toward mouse position

Hey all,

I’m super new to touchdesigner, currently trawling through tutorials and the help files but I can’t seem to find the answer to what I assume is a very simple patch.

I’m trying to build a grid of objects and have each instance rotate to look at the mouse.

Attached is an animation I created in C4D to better visualise what I’m talking about.

I’ve also attached my failed patch…

Big thanks!

Chris
Follow_Mouse.toe (4.76 KB)
Follow Mouse.mp4 (2.63 MB)

Hey y’all.

I’ve managed to get this working through the use of particles and forces. Attached is the toe.

It feels to me like this is a bit messy and not really the best approach to take.

Does anyone have any better suggestions?

Also, I know in vvvv that you can get the mouse’s coordinates for both entire screen and also the viewport window. Is that possible within TD?

Ta,
Chris
Follow_Mouse_01.toe (5.54 KB)

Okay. So it turns out, as far as I can tell, the ‘Look At’ feature is totally broken in 099 build 2017.3580. Man, that confused me for so dang long.

I’ve rebuilt the scene in 088 and it works exactly as I expected. Below is the .toe.

downloading the latest 099 to see if the bug still exists.

Glad that’s figured out!
Look_At_03.2.toe (4.74 KB)

Yup. Works A-okay in the new 099 build.

Hey,

great you got it working. There is a wide range of examples, and some similar to yours, in the Generative Design section here: derivative.ca/wiki088/index. … ive_Design

Regarding the mouse position: you can create windows via the Container COMP. In combination with a Panel CHOP, you can then get the position of your mouse in the window. Your render or any TOP after it (we mostly encourage people to append a null after the last TOP and use that) can be used as the background to the container COMP.

Cheers
Markus

Thanks Markus,

I just discovered the generative page today. Really looking forward to digging through it all.

Big thanks for the window tip. Ace!