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
1
Question by MSW-Games · Dec 17, 2012 at 10:56 PM · collisioncollidercharactercharacter controller

My Character Controller is falling through... everything...

Simply put, every time I apply a Character controller to an object, it falls through the floor. I'm working on some scripts right now and I'm using basic primitives (spheres and cubes) as the characters in the game. Every time I apply the controller to the character, he falls through any object I put below him.

In previous versions of unity, this wasn't a problem. But now when the Rigid Body and Controller are in place there seems to be no collision. The objects that make up the floor are set as collider, trigger is not checked.

If I also apply a collider (cube or sphere) to the character, it sits fine on the floor, but then the controller can't seem to recognize commands or states (i.e. grounded).

Any help would be fantastic!

Edit: It may also be important to note that the character controller reacts the same way with or without any scripting on.

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

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by ZenithCode · Dec 17, 2012 at 11:09 PM

Add a rigidbody on the floor plane as well and character will not fall through.

Comment
Add comment · Show 4 · 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 MSW-Games · Dec 17, 2012 at 11:14 PM 0
Share

This did not work.

avatar image ZenithCode · Dec 17, 2012 at 11:25 PM 0
Share

Do you have a collider on the plane? If yes, try replacing the plane with a stretched cube and repeat the above.

avatar image MSW-Games · Dec 17, 2012 at 11:28 PM 0
Share

The current floor is a stretched cube. I have also tried it with a terrain and a plane. All of which had colliders.

avatar image 1337GameDev · Jan 04, 2013 at 03:33 PM 0
Share

$$anonymous$$ove the character controller's object higher above the ground object. sometimes it takes a second for unity to realize collisions at start of game (due to object initialization) and therefore having a character controller too close to the ground can cause it to fall and not register the collider on the ground. make it about 4 or 5 units above the ground (4 or 5 above the character controller not touching the ground). Tis should work. I had a similar problem and this seemed to solve it. An ordering of scripts or such in the execution order pane might solve this but I am unsure.

avatar image
0

Answer by blumenkohlfrau · May 09, 2013 at 07:44 PM

Make sure that in the field under your terrain collider where it asks for "terrain data" that you have selected your terrain (when you click on the little circle, the box will pop up and you can choose your terrain; it defaults as "New Terrain")alt text


terrain_collider.jpeg (10.3 kB)
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
avatar image
0

Answer by EmJay · May 09, 2013 at 11:20 PM

In Unity 3.0 you can't use character controller and rigidbody with a single gameObject. You need to write your own gravity scripts in order to simulate gravity's effect. And don't use transform.Translate since it skips all collider checks.

You move objects with rigidbody by addForce() function and objects with character controller you move with SimpleMove() or Move(). These translate functions do have collider checks when you use them.

Also remember to check if all the objects have colliders.

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

Answer by MagyarPeter · Jan 10, 2021 at 08:14 PM

Same here. Everything worked, until I imported the NewInputSystem's mobile tutorial assets. Now, mí character faling throught everything, even if I just put the character controller at an unused Gameobject.

The character is far above the ground, the ground has collider, the physic layers are fine, it's not a trigger, It's worked a minute ago.

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

14 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

Related Questions

Determinism of collision judgment of Character Controller 0 Answers

Simple AI and Animation 2 Answers

Colliders not working with Character VS House 0 Answers

Is there a way to create an overlap custom-shape? 0 Answers

early collision above character controller 2 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