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 BerggreenDK · Oct 02, 2011 at 12:11 AM · physicsrigidbodyexplosionshake

Earth quake with physics?

I have a lot of small Prefabs with Rigidbody attached. They are all in a pile on a ground.

Now, I would like to simulate an earthquake/bump/explosion below them.

Should I attach a physics force of anti gravitation on the ground object below them or do I have to go through every single of the spawned item and put the physics into each prefab?

I hope for the first, but cant figure out how to do that, without having the objects falling through the ground.

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

1 Reply

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

Answer by save · Oct 02, 2011 at 08:14 AM

Depending on how you're able to do the implementation, I'd consider to go Hollywood on the solution - shake the camera and do a series of AddExplosionForce of wide range on all visible rigidbodies.

If the view is set at first person then a series of random values of rotation on X, Y and a slight rotation around Z-axis for the camera will do the trick. Then setting up a series of explosion forces beneath/around your area of rigidbodies together with emitters of smoke, dust and scrap objects will bring a true feeling of chaos.

If you need control over where objects position after the quake then you'd have to animate the event, there's no problem animating them and then attaching rigidbodies after it's done (for instance calling a function for when the object is finished animating to AddComponent(Rigidbody)).

Comment
Add comment · Show 3 · 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 BerggreenDK · Oct 02, 2011 at 06:32 PM 0
Share

aaah, thats the type of program$$anonymous$$g I was hoping for. AddExplosionForce looks like a solution to me, so thanks for the help.

avatar image BerggreenDK · Oct 02, 2011 at 07:08 PM 0
Share

wooohoo! Got it to work. Couldnt figure out why the sample from the documentation didnt work, until I found Force$$anonymous$$ode - muhahahaha!

avatar image save · Oct 02, 2011 at 07:37 PM 0
Share

Awesome! :-)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Move rigid body using explosion force in C# 0 Answers

Shake Effect 0 Answers

Rigidbody.AddExplosionForce() Not Playing Nice With Trigger Colliders 1 Answer

Touch input to move rigidbody using explosion force in C# 0 Answers

AddExplosionForce() does not appear to have any effect 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