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
0
Question by _eternal · Mar 26, 2015 at 10:34 PM · collisionphysicsphysics2dbounce

Object bounces without colliding

I created a 2D platform with a 0.25 bounce material. One of my character's movements is an air dash, in which he's accelerated in a certain direction at high velocity for a short period of time.

When I air dash into a bouncy surface, I noticed through frame-stepping that my character's collider is not even touching the platform's collider. This is causing the ground detection to fail. Here are three screencaps of the frames where the character should be touching the ground:

http://i.imgur.com/TFPkDvt.png - character is falling

http://i.imgur.com/av1b42G.png - character bounces

http://i.imgur.com/zVDPMOO.png - character is rising again, without touching the platform collider and triggering the ground detection

I understand that hitting a bouncy surface at high velocity will cause a high bounce, but why does that result in the character not making contact with the material?

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

· Add your reply
  • Sort: 
avatar image
0

Answer by lordlycastle · Mar 26, 2015 at 11:01 PM

If the character is too fast then, the Physics engine might not be able to calculate the collision. Set the collision detection to continuous dynamic of the rigid body of the character. Also 0.25 is not that bouncy, the character will only reflect with 25% of the velocity it hit. The reason for not seeing him hit the ground could be because low frame-rate. If you using your own ground detection solution, then it could be issue in your code.

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 _eternal · Mar 28, 2015 at 12:46 AM 0
Share

$$anonymous$$y ground detection code uses OverlapCircle. Is there a better way of doing it? Increasing the radius of the ground detect circle solves this problem, but then the player is detected as being grounded when they're visibly a few pixels above the ground. I assume the same would happen if I used a raycast and increased the range at which grounded is true.

avatar image lordlycastle · Apr 05, 2015 at 07:49 PM 0
Share

@_eternal I have never used OverlapCircle so can’t say if it’s good, but if I was in your situation I would use Raycast. With Raycast you can make it so that there is no visible pixels below the player. Ofc, if you increased the length of the ray it’ll act likewise.

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

21 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

Related Questions

How do I make a collision detector for the parent which effects the children? 1 Answer

how the ball bounces of equal in angles? 1 Answer

Ball bounce angle 1 Answer

Set ContactFilter2d to not use child object's triggers. 2 Answers

Unity Physics Collision Execution Order Error? 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