Howdy Folks, I've been going through the awesome 3DPlatformTutorial. I got to the point where I'm adding a copper and I'm having a bit of trouble. I've added the Copper and the EnemyDamage and EnemyPolicyGuy scripts to the copper and it works pretty good. I can kill the copper and it falls over and dies, etc. My problem is that the Coppers motions is not so good. If I move the CharacterController really far down such that the Copper is floating 1/3 its height off the 'ground' then it seems to work pretty well. Otherwise the Copper just drags and barely moves. I've added debugging to the EnemyPoliceGuy scrip and the movement seems to be calculated correctly. It appears that CharacterController.SimplMove is detecting some kind of barrier. Anyone else having this issue?
Hey Ptoinson,
I finally figured out the solution to the problem. For whatever reason the stock settings on the character controller for the Copper prefab wouldnt work for me. I removed the controller and installed a new one, then tweaked the settings. What seems to work best is a smaller collider that isnt as tall as copper, but sits nicely from about his knees to neck. This and tweaking the skin width, radius and slop limit not only got me the results I wanted but helped optimize enemy movement for the level.
Wil
Hey having the same issue but mystified...You ever figure it out?
I have the same problem. I got it working in version 2.6.1. But when I imported the assets into version 3.1 it yields the same symptoms. No amount of tweeking of the prefab's settings solves the problem.
The issue is that there is a BoxCollider object on the Coppers helmet (under Copper -> root -> Base -> Waist1 -> Waist2 -> Body -> Torso -> Head -> Helmet) that seems to push the collider attached by the Character Controller into the floor somehow, making it unable to move.
As soon as I removed it, the Copper started moving properly.
I've finished the entire tutorial and have found no mention of it, it seems unneeded.
The reason Wil's answer works is because if you make the collider attached by the Character Controller smaller (around the neck, as he mentions), then the collider parented to the helmet doesn't push it down into the floor.