I have updated the unity version since 2021.3.15 until 2021.3.42. After that, when I collide with objects that the player had previously calmly knocked down, I get stuck in the colliders.
The physics and RigidBody settings did not change at the same time, tell me what could be the matter?
Sounds like perhaps you misused the physics system? Time to check your work over.
With Physics (or Physics2D), never manipulate the Transform directly. If you manipulate the Transform directly, you are bypassing the physics system and you can reasonably expect glitching and missed collisions and other physics mayhem.
This means you may not change transform.position, transform.rotation, you may not call transform.Translate(), transform.Rotate() or other such methods, and also transform.localScale is off limits. You also cannot set rigidbody.position or rigidbody.rotation directly. These ALL bypass physics.
Always use the .MovePosition() and .MoveRotation() methods on the Rigidbody (or Rigidbody2D) instance in order to move or rotate things. Doing this keeps the physics system informed about what is going on.
Otherwise, perhaps you just have some other bug… and that means… time to start debugging!
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
Remember with Unity the code is only a tiny fraction of the problem space. Everything asset- and scene- wise must also be set up correctly to match the associated code and its assumptions.
This is incorrect. MovePosition and MoveRotation also bypass the rigidbody physics. These tell the rigidbody the position and rotation it must reach, bypassing the calculations made by the physics solver. MovePosition and MoveRotation should be used with kinematic rigidbodies only. Otherwise, weird physics side effects may happen.
The only way to move/rotate a non-kinematic rigidbody while preserving physics consistency is using the AddForce/AddTorque methods and their variants.
Thanks for the advice. But my physics is auto and everything moves through the application of force, so that’s not the point. It seems to me that it’s a matter of collision handling, because the model starts to fall through the textures and hang when the object is under the bottom of the car (collission detection mode - Continuous dynamic)