• 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
Question by nockieboy · Jan 21, 2013 at 01:37 PM · rigidbodymeshcollidersmeshcollider

Problem with rigidbody and complex shape / multiple colliders...

Hi everyone,

I've been working on a spaceship for a game for the last couple of months and I've got to the point where I'm working on the physics for the ship.

Basically, it's a spaceship with a 3D interior for the player to walk around and has a cargo hold that contains an exploration vehicle for the player to get into and drive out of the ship onto the surface of whatever planet or asteroid the ship has landed on.

The ship uses mesh colliders for the interior compartments and player-accessible areas. I'm also (currently) using mesh colliders for the hull of the space ship. The exploration vehicle is a separate GameObject within the space ship GO's hierarchy currently. I'll unparent its transform when it leaves the ship and make it a child again when it enters later.

The issue I have is this:

When I add a rigidbody to the space ship to allow the use of physics and the colliders so that it can sit realistically on the test planet surface (a standard terrain), it jerks and slides around in a circle constantly, no matter what values I add to the drag and angular drag boxes for the rigidbody.

I have removed the player controller and exploration vehicle from the space ship model and its hierarchy, thinking their colliders may be causing issues, but exactly the same behaviour is exhibited.

The space ship GO is fairly complex, containing a number of 3D meshes, some animated on a keypress (cargo doors etc), and some with mesh colliders due to allowing the player to walk around inside. I have tried deactivating the hull mesh colliders and replacing them with box colliders in an approximate shape, but then the ship falls through the terrain after catching on a wing before it drops through completely.

The only error messages I am getting are Actor::updateMassFromShapes: Compute mesh inertia tensor.... I've looked up help on these and I'm not using any flat plane rigid bodies. I am, however, attaching a rigidbody to the root space ship GO, but how else can I use a rigidbody with the ship?

Does anyone have any experience of building complex 3D objects like this and applying rigidbodies to them?

Any help would be greatly appreciated. :-)

EDIT:

The ship GO contains a cargo bay floor that descends using animation. That also has a rigidbody attached.

Comment

People who like this

0 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 Augusto Cesar · Jan 21, 2013 at 02:08 PM 0
Share

Not an answer actually, just a test ,try to simplify your collision mesh,or just add a box collider to the ship, to see if it still acts jerky.

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by nockieboy · Jan 21, 2013 at 10:01 PM

Think I've solved the issue... thanks for your reply, Augusto, it set me on the right track. :-)

What I did was deactivate each GO within the spaceship GO one-by-one and tested the scene again until I found which GO's were causing the issue with the ship falling through the ground. I also removed the box colliders approximating the shape of the whole ship as I couldn't replace the mesh colliders which made the internal parts of the ship solid. Instead, I added three box colliders for invisible 'feet' (the ship sits on its hull otherwise) to prevent it resting solely on its mesh colliders, which weren't working with the terrain.

Then I found that two GO's in particular were causing the instability and making the ship fall through the ground. They were collections of lights within the ship which all used a flat plane mesh with a "light" texture on them and a light emitter. As I created the planes as default GO's from Unity, they all had colliders attached. I removed the colliders and now the ship sits pretty on the ground!!

The only issue I have now is those darn annoying "Actor::updateMassFromShapes" errors. I'm assuming these are all to do with the planes, but the only rigidbodies in the ship are the ship itself and the cargo bay floor.

Anyhow, the main issue is sorted so thanks for your steer, Augusto! :-)

Comment

People who like this

0 Show 1 · 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 lgarczyn · Nov 29, 2019 at 07:46 PM 0
Share

Yep, the actor error is due to using colliders on non-closed meshes. Simply delete all mesh colliders except the ship floor. You might want to use a different scene or physics layer for the ship interior, but that's up to you.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

Get the triangles of a convex mesh collider 1 Answer

Rigidbody has a difficult time walking on mesh collider 0 Answers

Rigidbody and convex mesh collider 1 Answer

Weird bounce on collision with perfectly aligned (generated) meshes for fast object 3 Answers

Workaround to Non-Convex mesh colliders with non-Kinematic RigidBodies? 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