Magnet Effect Help

Hey guys , i've been trying this myself and i could not succeed. Here is the deal , i want to touch an arrow and move the ball to the right or left but a magnet will keep pulling the ball to the center with a weaker force and i would like to put an effect like some lines that follow the ball but are connected to the magnet, like this

http://imageshack.com/a/img545/987/83s.gif

i know it´s not a complex work but it´s difficult to figure out how to do it, so if anyone can help =)

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you move the ball in that image (gif) and the magnet is below it, it will pull the ball down towards the magnet. Do you mean more like planetary gravity that pulls the ball back to where it starts out in that image, as if the magnet was under the ball?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's a very simple magnetic effect. Click and drag the ball and then release.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you wanted a line to connect the ball to the magnet, you could use @Socks' wobbly line demo to connect them (attached).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • daaddddaaddd Member Posts: 116
    thank you but that was close, i made my point wrong , the ball is always pulled to the center X , the Y is constant
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    thank you but that was close, i made my point wrong , the ball is always pulled to the center X , the Y is constant
    So that's what my demo is... I still don't get what you're trying to do if it's different from that.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.