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 Henry90 · Jan 20, 2015 at 06:07 PM · collisionrigidbodycollider

Weird collision with objects passing through each other

Hello everybody, I am a newbie in this field and for the first time I am experiencing the following kind of problem. I just have a "simple" environment built by myself. Each object of this environment has a mesh collider. My player is a simple capsule for the moment and I make it move using the call rigidbody.MovePosition(). Unfortunately it happens something weird which you can see in the video right below.

https://www.youtube.com/watch?v=Ztk_4xFV7is

So the questions are: 1) how can I solve the fact that my player can pass through objects even if they have a mesh collider? 2) after my player has passed through those objects he keeps moving alone, like pushed by a non-existing "force" or anyway with a linear movement. What is it caused by? Thanks in advance!

Comment
Add comment · Show 1
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 meat5000 ♦ · Jan 25, 2015 at 12:14 PM 0
Share

$$anonymous$$ark non-moving object with mesh colliders as static. Perhaps increase their collision detection mode one notch. Consider using simplified $$anonymous$$eshes for mesh colliders to save processing.

We would probably need to see some code.

I'm not sure that $$anonymous$$ovePosition will actually stop you moving. I believe all it does is check for collision events and generates them through the OnCollision routines.

Don't quote me, I could be wrong.

1 Reply

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

Answer by softrare · Jan 20, 2015 at 06:18 PM

A MeshCollider is quite the processing-heavy component. It is not ideal for the environment you have built. In your environment most objects can just as well (and even better) function with a rectangular collider (which in Unity is a BoxCollider). Also the speed of your character is determining whether the collision is happening. Test it: decrease the moving speed of your character substantially and you will see he is much less likely to go through things.

But if your game-/scene-design can afford it, I definitely recommend to use BoxColliders on all objects and a capsule collider for your character. You will see the difference quite clear.

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 softrare · Jan 24, 2015 at 10:30 AM 0
Share

Did this help you in any way? If so please mark the question as answered or if not, please state what problems you are still having.

avatar image Henry90 · Jan 25, 2015 at 11:09 AM 0
Share

I am still changing all the environment. That's why I didn't mark the question as answered. $$anonymous$$y environment is unfortunately composed by tiny pieces. In order to find out if the problem is really the elevated number of mesh collider, I am first trying to merge many components together and then I'll try to see if the situation gets better with the mesh colliders. Decreasing the speed of the player unfortunately didn't work out. I'll get back to you soon!

avatar image Henry90 · Jan 29, 2015 at 04:56 PM 0
Share

I changed the colliders from mesh collider to box collider and everything works correctly. thanks a lot :)

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Camera Collision Not Working 0 Answers

How to speed up? 3 Answers

Maintain velocity after impact with kinematic rigidbody 1 Answer

Fast object on collider not working 1 Answer

GameObject sometimes collides, but sometimes goes through each other. 0 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