playMaker

Author Topic: Scale Animation on Mouse X Axis  (Read 1017 times)

rizwanash

  • Junior Playmaker
  • **
  • Posts: 61
Scale Animation on Mouse X Axis
« 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Scale Animation on Mouse X Axis
« Reply #1 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