Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: rizwanash on October 29, 2019, 05:17:11 PM

Title: Scale Animation on Mouse X Axis
Post by: rizwanash on October 29, 2019, 05:17:11 PM
Hey guys,

I hope you are al fine, I have a question regarding animating Scale. What i am trying to do is i have setup a mouse X and then comparing if its greater then or less then 0.5f (which is the center of the screen when normalize) What i want is scale the cube, when mouse X moves to right cubes scales on Y Axis from 1 to 0.2 and if mouse X goes to left side it animates and goes back to 1 and Vice versa for left. Is there any nice approach for this ? Mouse X from left to right / right to left works perfectly, its just the scale animation i don't get it.

Thank you in advance.
Title: Re: Scale Animation on Mouse X Axis
Post by: jeanfabre on October 30, 2019, 02:53:02 AM
Hi,

 try to work with FloatRemap on the Ecosystem, you can map the relative mouse position ( from 0 to 1), to your scale ( from 1 to 0.2), the action let you define the two ranges, you feed the input ( mouse) and you get the output ( scale)

Bye,

 Jean