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 mmangual_83 · Jun 02, 2014 at 08:46 PM · c#rigidbodyoncollision

Physics not working properly

I have a scene with a table and a playing block set on top of it.

alt text

I have to manipulate the block using the six degrees of freedom. The manipulation works fine but my issue is that when I rotate the block around any axis it goes through the table.

alt text

Here is how I have the block set up:

Block: - Rigid Body: i have the collision mode set to continuos dynamic - Box collider - Six degrees of freedom script (allows me to pick up the cube and manipulate it)

Table: - Rigid body: I have the collision mode set to continuous

Do I have to do something else in order to get my block object from going through the table whenever I rotate it?

table_2.png (22.0 kB)
table_1.png (19.8 kB)
Comment
Add comment · Show 4
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 ♦ · Jun 02, 2014 at 08:53 PM 0
Share

Perhaps you have the scaling too small. This means that the thickness of the table will be dangerously close to the Skin depth or allowed penetration of the Colliders.

If table is static, try a mesh collider marked as static on it.

avatar image mmangual_83 · Jun 02, 2014 at 09:13 PM 0
Share

@meat5000 thank you for your prompt reply. I tried it but it didn't work. And yes, the table is set to static, then I removed the box collider component and went ahead and replaced it with a mesh collider.

avatar image ozone · Jun 03, 2014 at 01:50 AM 0
Share

What function does your six degrees of freedom script use for rotations? It may just be rotating the block without taking collisions into account at all. You might want to try using rigidbody.AddTorque() to make sure physical interactions proceed normally.

avatar image Andres-Fernandez · Jun 03, 2014 at 07:05 AM 0
Share

Also remember to not mark the colliders as trigger.

1 Reply

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

Answer by Xtro · Jun 04, 2014 at 08:18 PM

Are you rotating the object by applying torque via physics engine or are you rotating it via its translate.rotation ?

You should add torque to make physics engine to work correctly.

FYI, "Static" checkbox of the object(at the top of the inspector) has nothing to do with physics engine. It's only used for navigation baking, lightmap baking and similar stuff.

A collider is static when it doesn't have a rigidbody. If a collider has rigidbody, it's dynamic.

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

25 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Parenting Preventing Player Rotation 0 Answers

C# Need Help converting from Rigidbody to Character Controller 0 Answers

Why does IsSleeping() keep returning false? (Billiard Logic) 0 Answers

Unexpected "Jumping" Behavior 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