# Rotating and moving objects

I’m playing around with vvvv a bit. At the moment I try to create a control to move and rotate objects. For now I use the x- and y-coordinates out of the renderer to do the transforming. If you want you could take a look at the attached patch.

Of course the problem is that the transformation depends on where the mouse cursor is when clicking and dragging.

I need something like the Points2Vektor. Or better, it would be usefull but I don’t know how to save the cursor coordinates on button press and release.

When I press and hold the mouse button, the coordinates of the cursor should be stored (starting coords). But when releasing the button the coords from the endpoint of movement should be stored somewhere, too. Then the distance of movement could be calculated through the Points2Vektor-node.

I hope it’s understandable…
Someone any ideas?

Oh, only to mention it: I want to move the object, not the camera ;)

3D-Steuerung1.v4p (11.0 kB)

did you came across the S+H node? also check TogEdge for checking whether the buton was pressed or released.

to get a list of coordinates check the queue (spreads) node

Yep, make a queue if you want to record some data.

And if you want the movement to look nice, add a filter always does the trick…

3D-SteuerungW.v4p (12.5 kB)

And if you want the movement to look nice, add a filter always does the trick…

IMHO a Damper (Animation) or a Newton (Animation) look a little bit nicer than a Linearfilter.

Thanks for all the help!

Here is what I got so far.
Nothing special, I know, but it was my first step with vvvv.
If somebody has hints what to improve, please let me know ;)

I’m thinking about putting the whole Transform (3D) node together with my little drag node into a module to make sure the transformation works as it should.

EDIT: I renamed the whole thing, it better fits in Transform than to Animation. Best is to download it from my userpage.

you did it another way and called it “drag”,