Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cdrandin · Mar 30, 2014 at 06:24 AM · movementcharactercontrollercharacter.move

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.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cdrandin · Mar 30, 2014 at 07:35 AM 0
Share

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.

avatar image robcbryant · Mar 30, 2014 at 07:45 AM 0
Share

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.

avatar image robcbryant · Mar 30, 2014 at 07:47 AM 0
Share

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?

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges