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 napalm44 · Sep 10, 2013 at 07:38 PM · spritephysics settingscollision event

How to prevent my collider from overlapping/going into another object?

I am trying to prevent this (the wooden platform should is a solid box collider):

![alt text][1] [1]: http://i536.photobucket.com/albums/ff328/reeda1283/ScreenShot2013-09-10at122042PM.png

The player (the screaming guy) has a sphere collider, and the platform (the wooden one) has a VERY tall box collider (to safeguard against passthrus). The player ALSO has continuous collision detection, the DontGoThroughThings.cs script, and is set to Interpolate.

The player is slamming into the ground at very high speeds (that is the only real gameplay), and while with the setup above he never actually goes completely through the ground, he does go into it (as pictured), and its especially noticeable as there is a slowdown affect applied when he gets close to the ground.

I know this is most likely cause because interpolate is updating the player's position before the physics can detect a collision, but without interpolate the player's fast movemements looks extremely jerky and horrible.

So... how can I fix this? I need the sprite to never appear as if it's gone through the ground.

edit I should have mentioned this, but I have also tried messing around with the timestep, and even at 60 + Fixed updates per second the issue occurs. It's almost not even a physics problem, but more of a problem with Interpolation, since at slowed down speeds Update(), which controls position with interpolation on, will run far more often than fixedUpdate allowing the position to be "interpolated" as in the ground before physics kicks in.

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 napalm44 · Sep 13, 2013 at 02:46 AM

Changing Time.fixedDeltaTime

to run at a faster clip will pretty much resolve any issues you experience when time is slowed down. The issue will still occur at fast speeds at a time scale of 1.0, but will be probably be not noticeable as the speeds required will be pretty high.

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

16 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

Related Questions

How to make kinematic platform trigger events 0 Answers

Way to find Default Behavior Mode of Physics through Script 1 Answer

Instantiating Sprites 1 Answer

When I rotate a prefab, only the collider rotates, the mesh is not 0 Answers

What the heck in going on? after 2.36 seconds the code just stops 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