- Home /
Character Controller not moving model at all, but acts like it is?
SO, my hierarchy for my object.
\ Unit (contains capsule collider *trigger* and character controller)
|__\ Model
|__\ geo
|__\ geo
|__\ geo
|__\ geo
|__\ geo
I am using character collider on the root of this object, Unit. My movement is for sure working. It was working before on a simple object like a collider, but when I throw in actual models it doesn't work.
I do some basic movement like
Vector3 movement = _move_direction * speed + new Vector3(0, _vertical_speed, 0);
movement *= Time.deltaTime;
_unit_focus_cc.Move(movement);
_unit_focus_cc is something I am dynamically change to move different objects using one character controller. I have tried this before and it works so this is not my concern.
Using character controller Move method doesn't work, but when I do something like ...
Vector3 pos = _unit_focus_cc.transform.localPosition;
pos += (_unit_focus_cc.transform.forward * 0.5f);
_unit_focus_cc.gameObject.transform.localPosition = pos;
I have two triggers, but remove the capsule collider still doesn't help me move the character and it shouldn't affect it since it is used only for triggers.
Hoping someone can help me understand why my object isn't moving.
O$$anonymous$$, after more test I think it has to do something with the geometry of the model. I select units to move, but it seems I am selecting children of the entire model, but is causing weird behavior.
Hey man-- having a hard time understanding the problem. Can you give more details?
Describe the model beyond the hierarchy--which objects have triggers/colliders? Is this a person like model you are moving? I just need more context.
What do you mean when you say the move() function isn't working? What specifically isn't working? It seems as if the charactercontroller is moving--just not the way you want it to.
I will say that having both a charactercontroller and capsule collider on one object seems redundant and unnecessary. Are you trying to apply physics to the capsule collider and the charactercontroller?
Answer by cdrandin · Mar 30, 2014 at 08:01 AM
Ok, found the problem. The models had colliders for each geometry imported, so that was pretty much it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613141525im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I get my character to move and strafe relative to the way its pointing? 2 Answers
How to avoid speed slowdown in case of controller.Move(); 1 Answer
The controller.move does not work correctly 0 Answers
How can I guarantee a CharacterController never leaves the ground? 2 Answers
FPC Moves itself 0 Answers