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 CarltonSmith · Mar 06, 2014 at 08:52 PM · charactercontrollerparent

Character controller moves slow when an object its parented

I have an object (a sphere) that when i hit it, the object "parents" itself to my character controller, in other words it becomes a child of the character controller. The problem i am having is that moving around becomes very difficult when this object is attached. The character controller will sometimes not move forward at all, or move slightly diagonally and very slowly, or move normal in some directions but not others. Once the object is unparented (with a mouse click) all is back to normal.

Now the sphere does have a rigidbody and i have been told to never parent an object to another if both have rigidbodies but as far as i can see the character controller does not have one. Also when the object is being parented i am making it kinematic anyway which i also thought would not cause any problems.

If anyone needs code then i can provide.

Thanks in advance.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Mar 06, 2014 at 10:47 PM

Character controllers work funny when other colliders are childed to them. My longer explanation near the bottom, this person has a weapon child: http://answers.unity3d.com/questions/341530/character-movement-distorted-when-holding-weapon.html

Now, a rigidbody moving with physics loves children. You can combine a few cubes and spheres (as you wrote, only the top object gets the rigid body) and it will gladly act as a single solid object.

Comment
Add comment · Show 3 · 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
avatar image CarltonSmith · Mar 07, 2014 at 02:37 PM 0
Share

This is brilliant thanks. I will start experimenting soon and seeing if i can restore some normal movement. Would you suggest perhaps turning the sphere collider on the child object off when parented (then to pop it back on when it is "released")?

avatar image Owen-Reynolds · Mar 08, 2014 at 04:20 PM 0
Share

The exact hack to make it sort of work depends. Suddenly turning on a collider might have it appear in a wall, which could make it blast away or fall through. It it isn't touching the character capsule, movement will be fine, but I think it will won't count as the player, so could be pushed through a wall anyway. Some people have had luck with Springs. Or switch to physics-based movement (huge pain to switch.) Or always put it on top of the player (so it never causes a problem) ... .

avatar image CarltonSmith · Mar 09, 2014 at 01:22 PM 0
Share

Thank you for the options. I will have a play around with them and see what suits. I will also look into springs as i do not know what they are.

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

21 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 avatar image avatar image

Related Questions

After unchilding a Character controller, it becomes disoriented 0 Answers

Make a simple tree 1 Answer

Making Rigidbodies the parent of character controllers is giving me problems. 1 Answer

Use Parent to fix the rotation of character 1 Answer

Weapon passing through colliders (objects)? 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