The question is that my player pass through objects even with colliders or character controller. What can i do to prevent this?
Can someone help me on this please
Use forces from rigidbody, since you are directly adjusting the transform in the above code, you bet it will go through anything, direct changes to the transform do not take physics into account.
Please, write your code in a code block, using the “code sample” button in the text editor.
About your problem, the first thing I’d try is replace Update by FixedUpdate, since the bug is about physics.
The second would be lowering the movement speed.
Are you sure you have a collider on both the player and the objects ?