Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Dubious-Drewski · Jul 23, 2013 at 02:35 AM · physicsrigidbodycharactercontrollerparentattach

Parenting the Character Controller to rigidbody: won't stick

Hello!

I'm trying to make the character controller ride a rigidbody snow sled. Problem is, once I make the rigidbody the parent, the character controller starts sliding around on its own. And once the sled goes over any small bump, the character controller starts levitating upward - still a child of the rigidbody.

How do I parent the character controller to this rigidbody, and COMPLETELY disable all of its own movement?

Comment
Add comment · Show 4
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 Benproductions1 · Jul 23, 2013 at 02:47 AM 0
Share

...
you stop moving the character controller
...

avatar image Dubious-Drewski · Jul 23, 2013 at 02:52 AM 0
Share

Without pressing any keys, the character controller slides off of the sled on its own.

Unless you mean I should just disable the character motor script?

avatar image Benproductions1 · Jul 23, 2013 at 02:54 AM 0
Share

the character motor script still applies gravity sliding, so yea, you can disable it if thats how you are moving it.

avatar image Dubious-Drewski · Jul 23, 2013 at 02:57 AM 0
Share

Yay! Thank you.

 Character$$anonymous$$otor charScript = player.gameObject.GetComponent<Character$$anonymous$$otor>();
 charScript.enabled = false;

That did it.

1 Reply

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

Answer by Benproductions1 · Jul 23, 2013 at 02:58 AM

Hello,

Disable whatever is moving it,
Whether that is the standard asset's CharacterMotor or your own script
it doesn't make a difference :)

Hope that helps,
Benproductions1

Comment
Add comment · Show 6 · 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 Dubious-Drewski · Jul 23, 2013 at 03:06 AM 0
Share

It's weird that you're answering twice.

"Disable whatever is moving it" doesn't really help me, because my problem was that I didn't know what was moving it.

I still don't actually know what was moving the CC, but I now know that disabling the character motor script fixes the problem.

avatar image Benproductions1 · Jul 23, 2013 at 03:58 AM 0
Share

From the question you have not suplied in any way shape or form anything about the rest of your setup.

That is as detailed an answer as is possible from the question.

I have not answered twice. I found your problem and posted it as an answer so that it could be accepted to help anyone else having the same problem.

avatar image Dubious-Drewski · Jul 23, 2013 at 06:57 AM 0
Share

That's alright. Thank you for your help.

avatar image Benproductions1 · Jul 23, 2013 at 08:15 AM 0
Share

if I answered the question though, you should accept my answer :)

avatar image Dubious-Drewski · Jul 23, 2013 at 08:18 AM 0
Share

Well, you didn't suggest to disable the Character $$anonymous$$otor. If you had said that, I would definitely consider your response to be the answer.

Oh well, I'll do it anyway. Anyone reading this will get all the info they need.

Show more comments

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

16 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

Related Questions

Guidelines for using rigidbody, collider, CharacterControllerScript, etc? 3 Answers

Character Controller meets Rigidbody 1 Answer

Unity 4.3 CharacterController collision with physics 2D not working 1 Answer

Attaching Rigidbody breaks gravity 1 Answer

How can I make rigidbodies react cleanly to the character collider? 1 Answer


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