I have a problem where when my player stands on top of a dynamic rigid body object the player vibrates nauseatingly, making the camera shake. is this a known problem? how do I fix this?
Nope, not a known/usual problem. Any physical object on top of another physical object shouldn’t vibrate, that’s just how you stack stuff. Otherwise mostly everything in any game would vibrate.
Now, if your player is not a dynamic rigidbody, then things can go haywire on a variety of ways depending on how you’re dealing with it.
The player and the object are both dynamic, and the object the player is standing on is on a static collider with no rigid body
So both the player and the object are dynamic, but the object is static? this doesn’t make any sense whatsoever. How can an object be both static and dynamic simultaneously?
If you create a dynamic (aka non-kinematic) rigidbody and place it on top of a static collider in Unity, it won’t shake. It only takes a few seconds for you to test this.
My advice would be to work out differences between your setup and this basic one, and go over them one by one to identify which one is causing the problem.
CharacterController standing on top of a moving object, whether Rigidbody or not, can be pretty bouncy. Some other kinematic controllers share this issue. It’s a pain in the rear. When you detect such a condition (your isGrounded code finds a moving object), you can make the CharacterController a child of the moving object and still move around. Alternatively you can try to keep up with the motion of the moving object and move the CC along with it, but you may find yourself a frame behind especially where the moving body is changing speeds.
And yeah, once you see it in your own code, you WILL see it in otherwise polished games. Even famous AAA games.
Yes, CharacterControllers on top of moving objects can be pretty shaky.
However, OP so far has said that:
and
So no idea if it’s standing on a moving kinematic rigidbody, a static kinematic rigidbody, a dynamic rigidbody, or a simple collider with no rigidbody.
the player is on a dynamic rigid body which is on a static collider. in other words, standing on a box which is resting on a floor