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 jimbobuk · Feb 24, 2010 at 01:13 AM · physicsrigidbodytransformiphone

Strange transform hierarchy problem when adding a rigidbody into the hierarchy

Ok, in trying to improve performance discussed elsewhere i've started changing an existing model hierarchy with some dynamic and static physics meshes, into the same hierarchy but adding a rigidbody to the dynamic part.

To work around asset import problems I am adding a set of sensors into this hierarchy at runtime within start(). These objects are added underneath the dynamic object.

Now performance is improving a lot but i've noticed my game is broken because something strange is now happening with these sensor triggers that are inserted into the hierarchy.

The editor is showing them moving in sync with the rest of the object, but my debug information is showing that the actual colliders themselves are NOT moving. Another object is matching the motion of the dynamic object and yet in the debug info i can see it moving between the sensors when the editor is showing it sat on just the one sensor.

If i remove the rigidbody and go back to just using transform rotation then all works ok.

It's almost as if the transform hierarchy is getting something confused in the physics when creating a hierarchy like this

  • Object
    • Dynamic Parent (rigidbody, mesh collider)
      • sensor array
        • sensor1 (sphere collider trigger)
        • sensor2 (sphere collider trigger)
        • sensor3 (sphere collider trigger)
        • sensor4 (sphere collider trigger)
    • Static objects (mesh collider)

with a rigidbody the sensors look like they're moving properly in the editor, but my debugging shows they're not.

without a rigidbody and just rotating the dynamic parent with its transform and in the editor everything looks the same, but the sensors this time are correctly rotating.

Has anyone got any idea what's going on?

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

2 Replies

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

Answer by Ben B · Nov 17, 2010 at 06:18 PM

It is a bug.

Here's a workaround: Fix for broken collider when parenting to rigidbody

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

Answer by Ben B · Nov 16, 2010 at 01:15 AM

Reproducible.

I couldn't have worded it better myself.

The child SphereColliders appear to move in the editor, but their actual location, as per Debug & TriggerEnter & Exit, is unaffected by the movement of the parent rigidBody.

This appears to be a bug.

Time to discuss workarounds? Appears in Unity3?

http://forum.unity3d.com/threads/25353-MovePosition-in-parent-child-relations-of-rigidbodies

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

No one has followed this question yet.

Related Questions

How to know if rotating ball is rotating towards or away from camera. 0 Answers

Transform.Position vs Rigidbody.Position 1 Answer

Modifying height directly on a Rigidbody Object without gravity 1 Answer

How to properly move a rigidbody/collider? 2 Answers

Disable transform inheritance for rigidbody 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