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 Anonanimal · Oct 06, 2013 at 08:49 PM · player movementcharacter controllerslope

Character Controller "walking on air" off cliffs/slopes

I'm using the default character controller without editing much of anything (except the radius/height of the capsule as well as skin thickness). When I walk off anything but the slightest of downward slopes, I can basically "glide" through the air with my running animation playing. If I take off the character controller and just go back to using a normal capsule + rigidbody, this issue doesn't exist.

Any idea what would be causing this?

Thanks.

Edit: I just went and removed the colliders from my sword/shield that my player wields and it seems to have fixed this. Is there any other way to go about this without having to get rid of them?

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
Best Answer

Answer by MarkD · Oct 06, 2013 at 10:10 PM

I suspect that what is happening is indeed caused by the colliders, as you walk of the slope the character controller detects the colliders and walks up there. I had a similar thing and the only answer I have for you is that, as long as it is used as interface or part of the character it is best to not give it a collider. What you could do is let a collider exist outside of the character controller. There is no rule that a collider needs to be center on its object :), so you could just adjust the transform position of that collider to get outside the character controller.

Sorry for the wall of text and I hope I made myself clear enough :)

EDIT: I hope you are getting this edit update.

Hey sorry, it's me again. I was thinking today on your question once more and the solution suddenly hit me.

You have to make your sword and shield a rigidbody, then enable is kinematic. This way they will support all the collision data but will just move trough your character controller.

It will seem as if they don't collide, but they still send collision data wich you can call upon, for example: hitting enemy's and doing damage.

Sorry for the late re-post. But this should fix your problem and still let you use your character controller.

cheers

Comment
Add comment · Show 5 · 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 Anonanimal · Oct 06, 2013 at 10:57 PM 0
Share

You are definitely right about the cause, however I'm not sure that solution works for my needs, unfortunately. $$anonymous$$y running animations (and others) will always cause the sword/shield (and their colliders) to collide with the capsule of the character controller.

Thanks for the input!

avatar image MarkD · Oct 07, 2013 at 07:19 PM 0
Share

Well perhaps you should leave the collider disabled until needed? that way at least your shield can rest safely on your back. It shouldn't be to hard to detect if you are in the running animation, thus disabling the colliders.

avatar image meat5000 ♦ · Oct 07, 2013 at 07:24 PM 0
Share

Click the collider and watch it separate from the model in the scene view. Hilarious. Love that character controller...

avatar image Anonanimal · Oct 07, 2013 at 11:57 PM 0
Share

@$$anonymous$$arkD - That's a good idea, except I wanted to keep the shield "live" even when it's not really in use. I think I'm going to just not use the controller... Too much of a hassle it seems like for pretty basic stuff. Thanks for all the help. I do appreciate it.

avatar image MarkD · Oct 12, 2013 at 06:17 PM 0
Share

The controller can be a very powerfull thing, but indeed for some purposes, especialy with collider interaction from the character itself, it can be a pretty pain in the ass.

Another more anoing option, would be to create a layer and expell that layer from collision with your character controller, You would have to write a script that sees that layer as invisible and won't create collision, there should be some info on it on the unity ref.

I know I used that solution to make certain racyast hit or not hit objects infront and behind eachother. But it is an anoing hassle to setup.

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

17 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

Related Questions

Best practice when creating character / player control scripts? 2 Answers

How do I stop the 3rd person script from jumping up walls 0 Answers

Adding Multiple Slope Limits to the Character Controller 0 Answers

Player not responding to Jump Input 1 Answer

Character falls through upwards slope 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