Why is gravity in script not working the same as when it is changed in the inspector?
Have roof on top of a building. Mass set to 1. Get input from keyboard to increase mass on roof so it should eventually collapse. When increasing mass in script I can increase by 100s and it never collapses, but in the editor set the mass to 5 and it collapses. Script looks like below and can see the script increasing he value in the inspector. Is there some type of Fresh or something that needs to be called to recalculate gravity on the object?
Your answer
![](https://koobas.hobune.stream/wayback/20220612071453im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Physics 2D disable collision bouncyness 0 Answers
C# creating an array that holds coordinate points 1 Answer
Adding weight to steam VR Throwable prefab 0 Answers
How to make a player instantly reach to a change in gravity? 2 Answers
After added a rigidbody in a GameObject, it moves on rotation 2 Answers