Page 1 of 1

TransformGesture with additional Limits

PostPosted: Mon Aug 07, 2017 6:08 am
by tswalk
I like the new Inspector features for TouchScript in 9.0, been working around with it the past week and had a few thoughts. One thing that would be great is to be able to specify limits for certain transform properties such as Scaling, Rotation, and Translate. For range limits, having an optional toggle for easing near limit boundaries could be a nice effect. :)

(e.g.)
Scaling:
- default: infinite
- range: (float,float,float)
-- option: easing (on/off)
--- (on) Power: (float) {would control the p in f(t) = tp}

https://docs.microsoft.com/en-us/dotnet ... mework-4.7
https://docs.microsoft.com/en-us/dotnet ... -functions

I guess there's so many different formulas that could be applied, but I think a simple power ease would be interesting to start.

Perhaps these could be options on the Transformer or better just under Limits for TransformGesture?.. not sure.

Re: TransformGesture with additional Limits

PostPosted: Mon Aug 07, 2017 2:28 pm
by valyard
Need to think about it.
I had a few attempts to do this but I'm not sure if this functionality should be built-in.

Re: TransformGesture with additional Limits

PostPosted: Mon Aug 07, 2017 11:06 pm
by tswalk
I can understand. For now I'm just doing a simple scaling limit in LateUpdate which works fine.

Re: TransformGesture with additional Limits

PostPosted: Tue Aug 29, 2017 2:19 am
by kaltemrix
Could you post a code snippet of your scaling limit? All my attempts have made it super jittery and doesn't work nicely.