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 /
This question was closed Oct 06, 2014 at 01:07 AM by robertbu for the following reason:

Design/discussion question

avatar image
0
Question by andrewdbanks · Oct 06, 2014 at 01:07 AM · animationcolliderscharacters

What are best practices for getting your character to not fall through the floor?

I've done all of the tutorials on the main Unity site, including the stealth tutorial. Incidentally, the first game I want to make with Unity is also a stealth game, so I'll have a lot that I should be able to borrow from that tutorial. I made my own custom placeholder character model and imported it, as well as the mocap animations from the asset store. When I ran the animation, my character would just fall right through the plane that I created. Okay, fair enough. I didn't give him a collider. I added a capsule collider, just like the stealth tutorial, and now the character wouldn't fall through the plane, but he would roll on the rounded end of the capsule collider until he fell face-forward on the ground in his walk cycle. I double-checked how they handled this in the stealth tutorial, and they just froze the character's Y position. This raised questions for me.

My immediate thought was that this would mean hills would be impossible with this implementation, so I created a second plane that was at an incline to the current one, and just as I thought, the character model ignored the plane and kept walking right through it, even though both objects had colliders. So, my first question is: how do I handle hills this way? It appears that the stealth tutorial just gets the player transform and manually increases the Y position when the player is in the elevator, so this kind of looks like a sneaky shortcut. Is this how it's normally done? Obviously, I could do a full mesh collider for the player model, but as mentioned in the tutorials, that's not very good on performance.

What is the best practice here? Do I freeze the Y position on all of my character models and just manually adjust the height whenever there are stairs or something? Do I make some kind of flat collider at foot height on my character to collide with the scene? Is there something else I haven't thought of?

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

  • Sort: 
avatar image
0

Answer by robertbu · Oct 06, 2014 at 01:07 AM

Discussion/design questions should be asked on Unity Forums. If you post there, you may want to add a link to this questions so anyone who wants to follow or contribute to the discussion can find the thread.

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

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Locomotion System tilting character 1 Answer

How can I change animation with colliders? Using AR and Vuforia. 0 Answers

What is the difference between Animator Controller and Animation component? 1 Answer

Problems with Sliding Door Animation (solved) 1 Answer

How do you animate/transition a jogging character to a stop believably? 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