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 calbar · Aug 08, 2013 at 02:26 AM · collisionrigidbodyinstantiatespawn

How can I instantiate rigid bodies on top of each other without them exploding away?

I'm trying to quickly spawn a number of rigid bodies from a single point but because they spawn quicker than gravity can pull them away they are spawning on top of each other which is causing them to rocket apart rather than fall in a nice stream.

The presentation is important, so I'm looking for a solution that allows me to keep the spawn rate nice and snappy as it is now.

I feel like ideally, when a rigid body instantiated inside another, it could mark the other rigid body as a "no collide" until they moved outside each other's bounding box, after which they would collide like normal.

Does this functionality already exist and I'm just not savvy to it? Has anyone written something like this on their own? Any suggestions for how to go about it? Any totally different and potentially better solutions?

Thanks!

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 robertbu · Aug 08, 2013 at 02:27 AM 0
Share

Physics.IgnoreCollision()

avatar image calbar · Aug 12, 2013 at 06:25 PM 0
Share

Awesome, thanks robertbu. If I ever do a full-on solution like my ideal scenario above I'm sure that will be invaluable.

2 Replies

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

Answer by Slobdell · Aug 08, 2013 at 03:00 AM

First off the Rigidbodies don't collide it's the colliders that do. You could disable them all together, or set them inactive initially and have them turn on after a certain time or when they reach a certain point or some other trigger. Or What I have done is when instantiating them you could apply a force so that they get pushed out of the way before the next one is instantiated.

Comment
Add comment · 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 calbar · Aug 12, 2013 at 06:28 PM 0
Share

This will probably be the most appropriate combination of solutions. Thanks for your input!

avatar image
0

Answer by BlueFireDev · Aug 08, 2013 at 03:09 AM

Turn gravity off, move to open space in script, and then turn gravity on? That's what I've done.

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

16 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

Related Questions

OnCollisionEnter is slow... 2 Answers

OnCollisionEnter not triggering when two rigidbody collide via Instantiate 1 Answer

Spawning if there is space 1 Answer

OnCollisionEnter not being called, between a Rigidbody and a Box Collider 1 Answer

Checking Collision on instantiated object 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