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 Astro-King · May 20, 2015 at 06:25 AM · collidergravitydetectionconvexconcave

Need Concave Collider to React with Gravity

I started developing a Lunar Lander game with an earlier version of Unity (4.6, I believe), but had to switch computers for development recently. However, upon installing the most recent version of Unity and recoding the physics for the player to work properly, I was confronted with a problem.

You see, some of the levels in my game have the asteroids/obstacles falling, with the player having to survive to win. When testing, however, I was confronted with a rather unfortunate truth: the player's ship would now phase completely through the asteroids with gravity enabled, which would no longer be detected by anything (Previously, they had simply passed through the terrain but reacted to my convex objects).

Unity informed me that it removed support for Non-convex MeshColliders interacting with Non-kinematic rigidbodies, so I attempted to fix this problem. However, I soon found that:

  • Gravity could not be enabled with kinematic objects (Which was necessary for the levels)

  • I could not change the asteroids to be convex, as they had more than the maximum amount of vertices (Sculpted in Blender)

  • The asteroids wouldn't react with any of my objects, convex or not (The player's ship and everything besides the terrain is convex)

  • I couldn't find a suitable solution on the internet

I would really rather avoid having to downgrade to a lower version of Unity to finish this game, as I feel that I'll need to get used to these new systems eventually. However, I'm completely lost as to what to do in order to get these levels working again, unless I need to code my own physics.

Any help would be greatly appreciated. Thanks in advance!

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
Best Answer

Answer by screenname_taken · May 20, 2015 at 07:37 AM

You could open up the asteroid mesh and make a new, highly simplified mesh that you'd use as a convex collider in Unity. Or, you could add multiple capsule collides on the main asteroid object that has the rigidbody component.

Comment
Add comment · Show 5 · 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 Cherno · May 20, 2015 at 08:14 AM 0
Share

I would agree on this^ If the shape of the asteroid is really concave, then you can just create seperate convex meshes that fit together so they act aas a concave one as a whole. There is nothing keeping you from attaching multiple colliders to an object :)

avatar image hu90 · May 20, 2015 at 09:34 AM 0
Share

I could not change the asteroids to be convex, as they had more than the maximum amount of vertices (Sculpted in Blender)

This tells me the asteroid mesh collider is probably WAY more complex than necessary. I'd recommend simplifying it in any case.

avatar image Cherno · May 20, 2015 at 10:19 AM 0
Share

Indeed... A collision mesh with over ~65k vertices, for one asteroid? Jeez.

avatar image Astro-King · May 23, 2015 at 02:31 AM 0
Share

I should've mentioned that it would be preferable to still have the asteroids fall through the terrain. Some levels were designed to allow them to pass through it, and I haven't been able to limit their collisions in that way so far.

Is such a thing possible in Unity 5, or would it simply be easier for me to move back a version until the game's complete?

avatar image Cherno · May 23, 2015 at 08:43 AM 0
Share

You could always change the asteroid's layer to one that still collides with the player ship but not with the planet.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

2D Polygon Convex Decomposition Code 1 Answer

Unity Collison Problem 1 Answer

Vehicle either falls apart or falls through ground. 2 Answers

Is there ANY possible way to use a mesh collider(without convex) with a rigidbody? 1 Answer

Unexpected behavior between parent/child rigidbodies 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