transform.localPosition vs rb2d.AddForce
I was wondering what is the best practice for moving a game object. Should you use a vector and add a force to the object, or move the object by changing the transform.localPosition value.
Adding a force does give a nice momentum to object, but that would depend on the game if you want that or not.
Is there any reason I should not move the object with the local position and always use a force?
Answer by HenryStrattonFW · Feb 08, 2017 at 08:46 PM
You should only use forces if you want the movement to be physical, and by that I mean managed by the physics system (eg you add a force, and you're happy for it to continue moving based on the physics settings until it comes to rest).
If you want to move things in very fixed and controlled ways, like for tweening, or for a 2d game that doesn't use gravity or drag or any of that physics stuff, then by all means, simply modify the transform directly.
It all comes down to your use case.
Tyvm for the response. Thats exactly what I was wondering.