• 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 Wombat_Revolver · May 04, 2020 at 03:37 PM · rigidbodycolliderterrainplayer movementterrain bug

Player keeps falling halfway through terrain floor

This was not happening for the entirety of my time spent on this project until I added and then removed a failed Player Controller Animation script. My character now fails halfway through the floor so only his head and chest stick out. He still walks around and reacts to the terrain as if he's walking over it but his body is halfway under. I have tried everything that other people have said, from adding colliders and rigidbodies to making sure is Trigger is off as well as removing elements and re-adding them. My character is well above the terrain in the scene window and my player box collider is not intersecting with the terrain at all. Your help and suggestions would be greatly appreciated.

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

3 Replies

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

Answer by javiolvecal · May 04, 2020 at 03:57 PM

Hello! I'm not sure if this will work but you should try to change the Player's y coordinate to a higher value and (if the playes has a rigidbody) change the "Collision detection" to "Continuous". And if it doesn't work, change it to "Continuous Dynamic".

I hope this can helps you :)

Comment
Add comment · Show 10 · 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 Wombat_Revolver · May 04, 2020 at 04:22 PM 0
Share

I tried changing it to both as well as adjusting the y value more but it still drops down halfway below the terrain. Thanks for the suggestion though

avatar image javiolvecal Wombat_Revolver · May 04, 2020 at 05:09 PM 0
Share

If yo can publish an image of the scene view and two images of the Player's inspector and the ground's inspector maybe I can look for another solution :)

avatar image Wombat_Revolver javiolvecal · May 04, 2020 at 10:34 PM 0
Share

Here are the screenshots! Thanks again!

Show more comments
avatar image
0

Answer by costin88boss · May 04, 2020 at 03:53 PM

is the character 2d or 3d? the terrain is made for 3d colliders. you may try using a cube, making it wider and then put a 2d collider instead of a 3d one, or just use sprites.

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 Wombat_Revolver · May 04, 2020 at 04:24 PM 0
Share

The character is 3D, if I try to use the 2D colliders on my character it just gets an error since it's a 3D object. I appreciate the help anyways

avatar image
0

Answer by JonPQ · May 04, 2020 at 06:29 PM

first off make sure that the animation you added is not moving your player's hierarchy down below the floor... simple to check.. Second... when you animate something with Animator... you cannot also change the same thing via code without having problems... the animator will usually overwrite whatever you did with code. e.g. rotations, transform, color etc.... sooo.... if you have control / movement scripts running on the root or some sub object in your charater's hierarchy... open you animator and child animations and inspect them to see what they are animating. I suggest you completely separate whats going on with the parent (scripts, character controller, collider, etc... all on the root, and then below that.. make an animation parent object, with the Animator on it, and below that the character skeleton and animated parts....

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

218 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 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

Colliding with Terrain and Destroying it 1 Answer

Why my player doesn't stop when it collide with the roadblock?,Collision does not work, player won't stop moving when it hit an object with collider. 1 Answer

Trying to use colliders on trees to interact with player 1 Answer

My object falls through terrain. 8 Answers

How to create a ground/terrain/floor that won't respond to gravity or objects falling on it? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges