Page 1 of 1

Reset single output value at interaction node

Posted: 29 Aug 2012, 15:45
by errox
Hi,

I need to reset a single output value on the touch transformation node.
I am using the Scaling output (limited within 0 to 1) to resize a rectancle.
If a user stops to scale, a script changes size of the rectancle to small or enlarged (2 states).
After that I need to reset just the Scaling Value (or set it).
My workaround to this problem is to wait until the next user reaches the previous
scaling value and not till then pass value through. So the possible pinch gesture is narrowed.
Works good so far..

But I got another case: I need to use the scaling value just to upscale a rectancle.
After the user has stopped scaling the size of the rect it has to resize back to "normal" by script/expr.
There is just one fix state: "normal size/state".
So I need to reset the scaling value at the moment of "normal state"
else if scaling has reached MaxScaling no more upscaling is possible...
(example: "normal state", scaling value=2 (max=2, min=1) Scaling below "normal state/size" is not allowed!)

One possible workaround could be not to use Max/MinScaling and to subtract current ScalingValue from previous backwarded ScalingValue
from "normal state"....But then we could deal with very big floats if no one resets the complete outputs. Not the way to choose.

The available Reset resets all values, but I need to leave X,Y untouched.

Any hints?



Thanks Alex for your fast replies, I will reply to yours' in bug report tonight.

Re: Reset single output value at interaction node

Posted: 30 Aug 2012, 15:06
by errox
A better solution for the first case (2 scale-states) is to use the tick mode on scaling with 2 limited states....
Didn't see that in the first place.


For the second case I haven't found a solution...

Re: Reset single output value at interaction node

Posted: 31 Aug 2012, 12:38
by Oliver
This should make sad panda happy again ;) !

Cheers!

Re: Reset single output value at interaction node

Posted: 31 Aug 2012, 15:52
by errox
Hi Oli,

thanks for your effort!!

I'm sorry to tell you that this won't help me out.
You deactivate the limits while TouchInside, but I always need the limits for translation: Popups are not allowed to leave the visibile view.
Additionally the user should not rotate the popup. While deactivating the limits, it is possible to rotate....

Nevertheless it is a good idea to de-/activate the limits to get a "snap back" to the specific limit value,
but as long as the "limits Active" bool affects all limits it doesn't really make this workaround flexible.

I hope you/anyone will still have a thought about this hereafter...

Greetings
Nico

Re: Reset single output value at interaction node

Posted: 07 Sep 2012, 13:31
by errox
I hope you/anyone will still have a thought about this hereafter...
Doesn't someone has a solution/idea?

Thanks,
Nico

Re: Reset single output value at interaction node

Posted: 10 Sep 2012, 12:58
by Stefan Goerke
hey errox,

hope, i got you right and the example is what you need.

Regards,
Stefan

Re: Reset single output value at interaction node

Posted: 10 Sep 2012, 13:29
by Daniel Willer
You could use Olivers solution and process the limits manual by expression nodes. But in that case the TouchBehavior will get lost.