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 Suminell · May 23, 2014 at 10:52 AM · rigidbody2d-physicschild object

2D: Should attaching a child object affect the parent object's mass? Please help.

Hi, I'm in desperate need of some help. I'm putting together a 2d car game and I've set up some AI controlled vehicles which I was happy with. Each Rigidbody 2D was fine - mass, drag etc. and the cars were behaving exactly as I wanted.

Then i decided to attach a child object to the back of vehicle - a jet sprite with an Animator - and that's when thing started to go wrong.

With the child object attached the cars began misbehaving. They failed to rotate properly and became "floaty" as if their mass or gravity had changed. Not a problem, I thought, I'll delete the child object and try again. But even with the object deleted and any script work undone the cars will not revert to their original behaviour. I'm tearing what's left of my hair out here.

Has anyone encountered anything similar and, if so, can you offer some advice?

Thanks,

Suminell.

Comment
Add comment · Show 2
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 Shmulzious · May 23, 2014 at 11:24 AM 0
Share

This answer might be a bit annoying but have you tried restarting Unity or even your machine with the code and components that worked for you? I've experienced weird behavior like this before and after restart it went away.

avatar image Suminell · May 24, 2014 at 10:01 AM 0
Share

Thanks for the reply. Yes, I'd tried that and it wasn't helping. I have, however found what was causing my problem...

Somehow during the process of attaching the child object the parent object's Polygon Collider 2D component had become corrupted - it said it had zero vertices when it should have had 10. I was able to copy component values from a backup object and that resolved my issue and the cars are back working as they were before.

Thanks,

Su$$anonymous$$ell.

0 Replies

· Add your reply
  • Sort: 

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

21 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

Related Questions

Can I arbitrarily move a dynamic Rigidbody 2D? 1 Answer

How do I make a child RigidBody be stuck to a parent RigidBody (Unity2D) 1 Answer

Possible to use child OnCollisionEnter with parent Rigidbody object? 1 Answer

RigidbobyConstraints2D is not working in Unity 5.0.2f1 Personal Edition!! 0 Answers

Is it possible to swap my x Axis and y Axis on a rigidbody2D? 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