Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 MCcomando · Jul 15, 2016 at 07:57 PM · c#rigidbodycollider

collider not collidinng with bottom of object

I am making a third person shooter, currently i have a simple player model with a rigid body and collider attached and when i run into the bottom of a wall (the wall is hovering at aprox 0.8 of the height of the model) it does not collide with it it rather goes through it (I am using rb.MovePosition() ), but if its a little lower it collides (the wall has only a box collider)

collider:

alt text

result:

alt text

as you can see the player collider does not collide with the floating cube, but if i lowered it by just a little it would have collided (cant upload more than 2 images).

P.S excuse me for any errors I have brought upon the.

screenshot-2016-07-15-212649.png (361.5 kB)
screenshot-2016-07-15-212710.png (315.2 kB)
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
1

Answer by TobiasAndrion · Jul 16, 2016 at 06:53 AM

I read the page on rigidbody.moveposition. It says that if your object has isKinematic set to false, the function works like transform.position = newposition. That is probably the source of your problem, as your player has isKinematic set to false in your screen shot. My guess is because it is basically teleporting your rigidbody forward a little bit every frame, it is somehow ignoring the minor collision of the surface grazing your head. api page on rigidbody.moveposition()

Have you tried simply turning kinematic on and seeing if everything still works as intended? I'm not sure if that would simply introduce more problems but it is a place to start.

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 TobiasAndrion · Jul 16, 2016 at 12:18 AM 0
Share

Also, what if you added a small extra collider above the main one that only interacted with environment and not any of the damaging elements of the game? It might be able to convince unity that you are in fact ram$$anonymous$$g into a wall and stop you all the same. That particular solution seems janky, but might be a good enough fix for your purposes. Or another-nother solution may be to use a box collider ins$$anonymous$$d of a capsule?

avatar image MCcomando · Jul 16, 2016 at 11:41 AM 0
Share

Thank you for the help, I'll try and fix it this way.

avatar image MCcomando · Jul 16, 2016 at 11:48 AM 0
Share

Well....lets say...it didn't work even the slightest, but i think I'm going to try using physics forces ins$$anonymous$$d of $$anonymous$$ovePosition, AddForce with velocity change might work

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

Multiple Cars not working 1 Answer

How do I disable all rigidbodies and colliders in a scene in unity? 2 Answers

My Objects are falling through the floor.. 0 Answers

Objects with colliders going through walls and each other. 3 Answers

Getting a sword in place while attacking an enemy 3 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