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 crimelinegames · May 12, 2017 at 05:28 PM · rigidbodyparticlesystemparentchildren

Parent GameObject dosen't move anymore if the children have a rigidbody

Hello Unity Community ;)

My game looks like this: alt text

There is a Player with an Particle System. (Each Particle is a bullet) The red circle are an enemy. It has a rigidbody and moves in one direction. If a bullet collied with that enemy it will be die.

So that works perfect, but now the problem:

The Enemy get some Child Shield Circles. So the should be move with the Parent but should be die alone if it collides with a Particle. So my idea is that I give each Child a rigidbody with "isKinematic". (Because it needs an rigidbody because only with that it detects the Particles)

But now the Enemy dosnt move anymore. It stand still.

Can someone help me? ;)

BTW: If I make only 1 children (one blue circle) it moves. But with some more it stand still.

unity.jpg (17.8 kB)
Comment
Add comment · Show 5
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 RobAnthem · May 12, 2017 at 05:50 PM 0
Share

is$$anonymous$$inematic means it won't be movable, but can still detect collisions. If your bullets have Rigidbodies then your shields only need colliders.

avatar image crimelinegames RobAnthem · May 12, 2017 at 05:54 PM 0
Share

Ok thanks, i have removed the rigidbodies and added Collider but now the "void OnParticleCollision(GameObject other)" function on the Child Gameobject does nothing if a particle collide with a child :S

The OnCollisionEnter does work. (If the Player collide with an EnemyChild) Its only a problem with the OnParticleCollision.

avatar image NoBrainer-David · May 12, 2017 at 05:57 PM 1
Share

is$$anonymous$$inematic will lead to the physics engine not simulating that object. This means, it will only change its position, when you tell it to via a script.

$$anonymous$$aking is$$anonymous$$inematic false will make the shield objects be simulated independently from your enemy object, leading it to not move with it at all. You can tie their movement together by using a FixedJoint or FixedJoint2D.

avatar image crimelinegames NoBrainer-David · May 13, 2017 at 09:26 AM 0
Share

Thanks that works great ;)

avatar image NoBrainer-David NoBrainer-David · May 13, 2017 at 04:10 PM 0
Share

Okay, I'll post this as the answer so you can give me those sweet, sweet internet points! ;)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by NoBrainer-David · May 13, 2017 at 06:37 PM

isKinematic will lead to the physics engine not simulating that object. This means, it will only change its position, when you tell it to via a script.

Making isKinematic false will make the shield objects be simulated independently from your enemy object, leading it to not move with it at all. You can tie their movement together by using a FixedJoint or FixedJoint2D.

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 ddsinteractive · May 13, 2017 at 06:36 PM

How about using colliders instead of the RigidBody. Does it still fail to move?

Also, what settings have you given the Rigidbodies other than the isKinematic checkbox?

Cheers, Monica

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Send message to other objects in list 0 Answers

Extreme slowdown during move request 1 Answer

Empty Object as Parent without Rigidbody? 0 Answers

Hinge to a child, Parent has rigidbody 1 Answer

Change an object's grandparent 2 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