Rigidbody - Why does my issue get fixed by doing THIS?
I'm working on a VR project that is near completion so unfortunately I can't provide an example, if an isolated example is needed I'll try to provide one. The issue is that when the player picks up an object and holds it, the object will start moving around a little independent from the hand (like it overcompensates for the velocity of the hand). Anyway, this issue has only recently randomly popped up. At first it wasn't happening in the builds but now it is. Unity randomly and indiscriminantly will choose which objects this happens to in the builds and seems to happen for each and every object in the Editor. At one point I duplicated an object and it happened to one of the duplicates but not the other. So I can 99% guarantee that this isn't an issue of my coding. I've tried all different interpolation and collision detection modes, even if the object is kinematic it can happen (and I ensured that the hand physics object it was attached to and following wasn't doing this).
So I found a fix. I select any variable in the inspector for that item's rigidbody and change it to anything. Fixed. Changing these same variables in code doesn't help. So what could I possibly do at runtime, especially in a build, that could replicate this same solution? What happens when I change one of the values in the inspector that doesn't happen when I change it in code? Is there some kind of "refresh component" function I could use? I'm really stumped here.
Your answer
Follow this Question
Related Questions
Gun RayCast Origin lags with fast moving object. Help? 0 Answers
Rigidbody rotate velocity 0 Answers
C# Trying to make SnowBoarding Like Physics 0 Answers
Restricting Rotation Of an Object in VR 1 Answer
Mass effects terminal velocity 1 Answer