I used TCastleCapsuleCollider for the player and TCastleBoxCollider for the ground and buildings.
I also added TCastleRigidBody to all of them.
For the Body, I set Dynamic to False.
For all of them, I set the following values:
When the player collides with a building, they can only move in the opposite direction and cannot move in other directions.
For the player, there is a mechanism to rotate toward the clicked position.
@Hamid , Kagamma meant, that if you have game rules and characters tied to the discrete grid and cannot be placed in linear/non-discrete space (like between tiles), you don’t actually need to use physics to check for collisions. Because you can check if characters “collide” when they step on the occupied tile just by grid/arrays of characters check.
For example, in my 3d game all characters are placed strictly on tiles (logically , by game rules) and all checks are made inside game rules. Only for visual coherence I make them gradually move from tile to tile by simple Lerp/delta approach