Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 MeowgicalLynx · Aug 06, 2019 at 07:39 AM · movementplayer movementmouselookstuckfalling-through-floor

Player keeps falling through the floor and I'm really stuck

Hi,

I'm making a Zombie Runner game and when I put in the Rigidbody FPS Controller, (I renamed it Player) at first it could move slowly, and then I deleted the enemy and then now the player is falling through the floor. The asset which the ground is in is called Prototyping (something like that) and came with the floor so I used it and I'm really puzzled. Could someone help me with this problem?

Thank you,

-Z0311A

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

6 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by mlnczk · Aug 06, 2019 at 09:27 AM

You have to make sure that your ground has collider and has not checked "Is Trigger". Also check if your zombies/player have Rigidbody.

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 MeowgicalLynx · Aug 06, 2019 at 10:47 AM 0
Share

Hi @mInczk, Which component collider? And yes my player's and zombies have Rigidbody.

avatar image mlnczk MeowgicalLynx · Aug 06, 2019 at 11:21 AM 0
Share

If your object has Rigidcollider which means Physics it needs to touch some collider because otherwise gravity will drag it down through the floor. So check if you floor have any collider attached to it. If it has then check if this collider component has "Is Trigger" box checked. It needs to be unchecked to stop your rigidbody from going through it

avatar image J_Ripley · Nov 28, 2021 at 03:26 PM 0
Share

I had the same problem. After reading the comments, even though I placed Mesh Colliders on the roads and buildings, somehow the program did not save it. So highlighting all the objects and then add component Mesh Collider did not work. Went back in and from the Y view on the Gizmo, I selected each one and added the Mesh Collider one at a time until all was done. Now the character is not falling through the road. A little frustrating after fighting it for two days straight.

avatar image
1

Answer by Bilxao · Aug 06, 2019 at 11:46 AM

@Z0311A Add box collider/mesh collider to the platform where your player needs to move. make sure the collider on platform is not checked for "IsTrigger".

Comment
Add comment · Show 1 · 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 MeowgicalLynx · Aug 06, 2019 at 12:08 PM 0
Share

Ok I have added it to the floor, and Is Trigger is not checked.

avatar image
0

Answer by MeowgicalLynx · Aug 06, 2019 at 01:05 PM

But the problem is not fixed; It worked just now, but then when I added my enemy in, (sorry but I did not tell you that maybe the enemy was the problem) the player couldn't move (W, A, S, D) and then when I deleted the enemy, the player fell through the floor and then I tried adding Box Collider instead of Mesh Collider in the floor and it didn't work.

So what I think is that when I added the enemy/zombie Unity got confused with the two Rigidbodies and let the enemy walk around and chase the player as the player falls through the ground and can't move.

I'm not really sure about my speculation but how can I fix this please?

Comment
Add comment · Show 2 · 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 suIly · Aug 06, 2019 at 01:08 PM 0
Share

Can you take a screenshot of the enemy, ground, and player inspector plz?

avatar image MeowgicalLynx suIly · Aug 07, 2019 at 04:26 AM 0
Share

@jacksonacademyashmore here's the screenshots:

Ground: https://i.imgur.com/AoNb$$anonymous$$Q0.png

Player: https://i.imgur.com/nQ$$anonymous$$OxsB.jpg

Enemy: https://i.imgur.com/ZvhGVo8.png

avatar image
0

Answer by Trumped · Aug 07, 2019 at 05:31 AM

@Z0311A make sure you don't have a mesh collider on an object with a rigidbody attached unless the rigidbody is convex this my be what causing your models to fall through the floor.

Comment
Add comment · Show 1 · 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 MeowgicalLynx · Aug 07, 2019 at 05:38 AM 0
Share

@Trumped the enemy has a Nav $$anonymous$$esh Agent, but I removed the $$anonymous$$esh Collider from the floor, so now the player isn't falling (that problem fixed) but the player is moving really slow that you have to get your eyes adjust to it so you can see it's moving.

avatar image
0

Answer by RehanSanish · Nov 28, 2021 at 10:38 PM

@MeowgicalLynx, Is your project 2D? If it is, switch to Rigidbody2D. And if Is Trigger is on, turn it off. I think you have the trigger set to work when an enemy is doing something the script is programmed to. Make sure you did not delete the script. It's okay if you just delete the GameObject where the script is contained. But if you did delete the script entirely, turn of Is Trigger. I hope this works!

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
  • 1
  • 2
  • ›

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

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

Related Questions

Character rotating to previous rotation 1 Answer

How to make an object move to another object's location in a 2d game? 2 Answers

Smooth Mouse Script Problems 0 Answers

Player movement 1 Answer

Rigidbody2D character getting stuck when jumping on platform at climax point 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