Problem with addforces

Hey guys,

I’m having a SERIOUS problem…

We have made a gravity gun, but instead of pulling objects towards you, it pushes them usign Addforces, the problem is that on my computer (i7, 12gb of ram, gtx260) it’s running extremely smooth, but on my laptop or slow computers the objects that where supposed to be influenced by the pushing only moves slightly, and on my computer they move a whole lot more with a whole lot more power…

Is that a problem with addforces calculating more slowly on a slower computer?

I’m really new to unity so this might be totally wrong and pointless, but here goes.

If your using the ‘function Update’ this only ticks per frame, therefore faster computers will run this function and its scripts faster.

If you use ‘function FixedUpdate’, it will tick at the same speed regardless of the computer fps that your using.

I hope this helpped, although I’d be surprised if it did :stuck_out_tongue:

Multiplying the force added with Time.DeltaTime will make it force per second rather than force per frame.

See: Unity - Scripting API: Time.deltaTime

when working with physics, it’s best to use
Time.deltaTime and not Time.time