- Home /
Problem was not physics related, but an error in code on my end.
Physics rigidbody.addforce
I've got an object that I'm trying to accelerate along a horizontal plane. Adding mass to the object doesn't seem to have any effect on its acceleration. Is there a way to add force so that mass is automatically taken into account, or do I have to do the calculations regarding mass manually before hand?
Have you tried to change the force mode when calling AddForce
(2nd argument)
https://answers.unity.com/questions/696068/difference-between-forcemodeforceaccelerationimpul.html
https://answers.unity.com/questions/789917/difference-and-uses-of-rigidbody-force-modes.html
But I believe the default mode is the one you are looking for. $$anonymous$$aybe you apply too much force, or the object is not heavy enough?
Thanks for the response @Hellium. I hadn't tried using the different force modes but I gave it a shot after reading your suggestion.
After a bit more testing it turns out the problem wasn't physics related, it was an issue on my end. I had adjusted the mass variable I was using but never assigned it back to the rigidbody. Blah :(