# Character Controller Collision problem

**URL:** https://discussions.unity.com/t/character-controller-collision-problem/440935
**Category:** Physics
**Tags:** Scripting
**Created:** [March 30, 2011, 3:50pm UTC](https://discussions.unity.com/t/character-controller-collision-problem/440935 "2011-03-30T15:50:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iossif](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/iossif/32/505719_2.png) [@iossif](https://discussions.unity.com/u/iossif)
#### Post date: [March 30, 2011, 3:50pm UTC](https://discussions.unity.com/t/character-controller-collision-problem/440935/1 "2011-03-30T15:50:32Z")

</div>

hello!

i added a character controller to my player because physics did not work. when i drop the player into the world he collides with the bottom (a cube) and stands on it. then i move the player with

```auto
Vector3 oldPosition = transform.position;
			oldPosition.x = oldPosition.x + 1.0f;
			transform.position = oldPosition;

```

the player moves around on the floor as he should. then there comes a wall that is an exact copy of the bottom and it stands in the players way. he just moves through.

can anyone tell me why? it makes no sense to me that the bottom reacts correctly but the wall does not. i expected the player to stop at the wall the same way as he does on the bottom.

thanks in advance for your help!

---

<div class="post-metadata">

### Author: ![Farfarer](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/farfarer/32/378541_2.png) [@Farfarer](https://discussions.unity.com/u/Farfarer)
#### Post date: [March 30, 2011, 3:57pm UTC](https://discussions.unity.com/t/character-controller-collision-problem/440935/2 "2011-03-30T15:57:30Z")

</div>

Using transform.position essentially teleports an object - it doesn’t take collision into account.

The Character Controller has it’s own movement function which will handle collision.

See the reference manual for CharacterController.Move;

> **[Unity - Scripting API: CharacterController.Move](https://docs.unity3d.com/ScriptReference/CharacterController.Move.html)**

---

<div class="post-metadata">

### Author: ![iossif](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/iossif/32/505719_2.png) [@iossif](https://discussions.unity.com/u/iossif)
#### Post date: [March 30, 2011, 10:03pm UTC](https://discussions.unity.com/t/character-controller-collision-problem/440935/3 "2011-03-30T22:03:56Z")

</div>

makes perfect sense 🙂

thanks alot!
