Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 Staffiend · Jul 30, 2015 at 09:18 AM · physics2dplatformercollision2d

2D platformer landing problem?

Hi there! I'm having a problem with landing in a 2d platformer I'm working on.

The problem is sometimes when the player lands on the ground after falling or jumping they will slightly clip into the ground and then bounce back up. It is very quick, only a few frames, but it is very jarring because the camera is following the player so it jitters really quick when the player clips into the ground and bounces back up.

I have tried to search for a solution to the problem but haven't found one. Somewhere it said that it was a problem with the physics implementation in unity and there is no way to fix it outside of changing the physics update timestep but that comes with a significant performance cost. I find this hard to believe.

I know there has to be a way to solve this problem because I know people have made platformers in unity before without this issue.

Does anyone have any suggestions on how to have an object land on the ground without clipping into it? Please help me. It will be greatly appreciated.

Comment
Add comment · Show 3
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 OrbitGames · Jul 30, 2015 at 09:29 AM 1
Share

have you tried setting the collision detection on the rigidbody2D to continuous?

avatar image Adalino · Jul 30, 2015 at 09:34 AM 0
Share

You could use a smoother camera that is not shakeing so much. Or maybe uf u are using mesh colliders use box collider. box colliders are a bit quicker

avatar image Staffiend · Jul 31, 2015 at 10:43 PM 0
Share

@OrbitGames: Yea I have tried setting the collision detection to continuous but the problem persists.

@Adalino: The camera is smooth. It only shakes at one moment because it is following the player as the player clips into the ground and bounces back out

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by PAHeartBeat · Jul 30, 2015 at 11:28 AM

Hi,

I also faced same issue when I am workin 2.5D plarformer game. we are using 3d mesh to create ground and some time gounds mesh collider will skip collision check so its goes little in and then bounce back as you face.

please check your collider once, if you are using mesh collidr or 2D polygon Collider, replace with Box collider. you can also face that issue if your character is came down very fast. if your character come down very fast after jump you need to adjust (value should be differ as per spped, very fequant calculation will effect your actual FPS) fixed time in time manager. Physic calculation done evry fixed time frame not on actual time frame.

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 Staffiend · Jul 31, 2015 at 10:45 PM 0
Share

The game I'm working on is strictly 2D, not 2.5D. I'm not using any mesh or polygon colliders. I'm using a circle collider on the feet in order to easily go up slopes but I suppose I could try a box collider to see if it solves the problem.

avatar image PAHeartBeat · Aug 01, 2015 at 04:24 AM 0
Share

circle collider for the character is perfect cos may be your platform has slop / curves, so circle collider is better option for character so it would smoothly moves on curves, up/down slop.

As you siad your game is pure 2D. so you need to check once fixedDeltaTime in Edit=>Project Settings=>Time $$anonymous$$anager.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Tilemap Collider/Composite Collider leaving gaps 2 Answers

Help with Collision2D.relativeVelocity? 1 Answer

After Collision Matrix change in runtime, effects not immediatly visible 1 Answer

OnTriggerEnter2D working, OnColliderEnter2D not working 1 Answer

Ignore collision before instantiating 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