Page 1 of 1

Simple rotate button

Posted: 14 Oct 2016, 16:37
by recordbay
Hi,

I am learning ventuz, and cannot figure out how to accomplish this simple task.

lets say i want to rotate a cube everytime I click on a circle. right now i am using a "touch button" assign to the circle to increment in 30 degrees the angle.(attached image, node on the top to the Main axis)

the problem is that whenever i release the mouse button, the angle goes back to the original amount, and i want to actually add 30 degrees everytime I press click on a object.

thank you!

Re: Simple rotate button

Posted: 17 Oct 2016, 10:08
by lerou
You're using the prssed flag I guess. That will snap back to 0 once you release the mouse. Use the "single tap".

If you want to step 30! at a time, use a counter, bind the forward event to the single tap, put the result through your expression, use a damper to get a nice animation. See vza.

If you want a full 360° (or something similar that ends with the same state that it starts with) use a mover in "one shot" mode. See vza.

Buuut... I wouldn't recommend using "single tap". On tough screens this makes problems whenever the touch is not exact enough. A slight movement of the finger will be considered a swipe, not a single tap. So I usually use the "touch pressed" flag and throw that into an event and use that. See vza ;)

Just have a look at the samples in the vza, they are pretty straight forward.

Cheers,
rou

Re: Simple rotate button

Posted: 20 Oct 2016, 13:37
by recordbay
cool ! thank you!

How can i make the same, but using a 2D layer as the button (so that whenever i animate my camera....the button stays there)? the examples have always large groups of containers...one for PAGES and other for UI. i cannot see trough how they are connected to each other.