Mix movement from Physics Rigidbody and Transform Position

My player has complicated transform position movement code, and i need to make him bounce away from walls and graze over them without going through them while he is walking forwards.

if he grazes along a wall, it will keep sending collision information, so i have to switch kinematic on and off and reset velocity to zero, to prevent multiple collisions?

Basically, if you have a rigidbody you should not touch the transform manually.

It mostly boils down to two choices:

  • Character with a rigidbody: Uses physics (so it’s easy to have bouncing behaviors as you said), but it will be hard to have a precise control over its movement. You have to control it through the physics, by adding/deleting forces and such
  • Character with a transform: No physics built-in, but you have total control on the movement by modifying the transform. You can detect collisions (as the standard character controller does), but you have to manually code the collision’s response. So any physics-like behavior you want (like bouncing) will have to be programmed manually to it.