Hello all,
New to Unity and mostly new to C# with some previous programming experience. I am playing around with Unity and experimenting around with adding my own additional physics. An issue I am running into is I have noticed that OnCollisionStay stops firing after a certain amount of time has passed where they are no longer moving.
I consider my code to be physics-based and I am exchanging information through the two object when they collide and I am using Time.deltaTime to moderate the speed of that data transfer.
The problem is, after the Rigidbody freezes due to not moving, my calculations in OnCollisionStay get corrupted because the value of Time.deltaTime becomes infinity.
So currently it seems there is some kind of loop in the Rigidbody component that looks to see if there is a minimum amount of “force” being applied before automatically falling asleep.
Is there some kind of pseudo force I can apply until I am ready for the object to fall asleep?
Shame the RigidBody code isnt accessible/editable.