# The magnet behavior is confusing me - adding energy to objects?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
• I can't quite figure out how the magnet object works.

I'm trying to create an app where an object pushed with the proper amount of force will orbit another object at the center of the screen (such is the ultimate goal). So for my experimentation and learning phase I've put a magnet object in the middle of the frame, extending to the frame edges. Then I've got a ball, simply placed with 'Physics - Static' motion near the edge of the screen, velocity 0. When I click run, as expected, the ball falls towards the center of magnetic force, through the middle and out the other side, decelerating as it goes. This is what I expect.

What I don't understand is that with each fall the ball _gains_ speed over the previous 'fall', until its acceleration overcomes the force of the magnet, and it floats off the frame.

Shouldn't this be neutral? Or is there something I might be missing?

• This confuses me, too, can anyone help?

• Maybe post up a little example MFA and people can play around and see if there is a bug.
Then put it up in the bug tracker for a more indepth look by the programmers.

The active object literally gains more and more speed and eventually leaves the magnet area, which is against the laws of physics and ultimately makes the magnet object almost useless.

• Ya that is kinda weird.

Can you put up a report in the bug tracker (Link way up at top of forum)
That will get it on the list to be looked at.

• Any artificial physics uses iterative calculations - work out force at this time interval, acceleration, velocity, increment position, work out force at next time interval, etc.

However - when very close to a magnet (or single-point force) the force and therefore acceleration can be huge. Say you're an inch away from the magnet accelerating towards it. Obviously in real life, moments later, you'd be an inch away on the other side and thus accelerated in the other direction by an equal amount resulting in overall equilibrium. However if we calculate this on a computer, by our next time interval we could be a mile away because the force is so strong at this point. As a result the object doesn't get an equal and opposite acceleration, and yes, gains energy. That at least is my best guess for what's happening here.

Solution would be to either set up the orbit so the object never gets too close, or work out the forces artificially using vectors and distance and put a cap on the maximum force (which you can do if you control the equation). I do this, and my objects aren't flying out into infinity.

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!