Be a Supporter!

Movieclip Moving Away And Elastics?

  • 209 Views
  • 1 Reply
New Topic Respond to this Topic
Fiziks
Fiziks
  • Member since: Nov. 23, 2008
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Movieclip Moving Away And Elastics? 2010-05-06 19:15:03 Reply

I making a menu for a game and so far the effect I have been trying to make has eluded me. What I'm trying to do is make the menu buttons move ever so slightly away from my mouse when it draws near, but stay tethered to a single point so it doesn't keep moving away.

I've tried combining elements of this with all sorts of other things out there, but I can't achieve what I'm trying to get. Could someone show me how to script this or even just point me in the right direction?


[Steam User + CS:S Modder] This. | SLENDERMAN. RUN FOR YOUR FUCKING LIFE.

BBS Signature
GustTheASGuy
GustTheASGuy
  • Member since: Nov. 2, 2005
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Movieclip Moving Away And Elastics? 2010-05-06 23:09:36 Reply

You want two forces acting on the button. One pushing it away from the mouse according to some function, and one pulling it back toward its constraint point.
So, you know, do that in the code.


BBS Signature