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
2
Question by cidmodder · Dec 09, 2010 at 12:03 AM · damagelandscapedestruction

Destructable Scenery

Is it possible to have scenery such as buildings, cars, windows etc. be destructable? For instance if I were to shoot a bazooka at a wall could I just shoot out that chunk of wall and how would i do that?

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
2
Best Answer

Answer by Statement · Dec 09, 2010 at 12:07 AM

A simple way of achieving this is having objects replace themselves with damage models after obtaining damage. That way you create different models for different "rubble" models of the same asset. Simply remove the original part and swap in a "rubble" part instead.

For your bazooka to crack that one piece of the wall requires the wall to be placed segmented.

There also are algorithms to procedurally break objects but those can be hard to get right. I think I saw a demo on a unity project using this but I don't remember which one. Anyhow, I think the best visual appeal for the time spent implementing the feature come from simple damage models. You can create a range of damage models if you want it to be other than just "fixed" and "b0rked". To have some variance you could have "random sets" of different representations of that model, so not every part of the wall would look the same after its blown up.

A simple script could have several children with different models, and show one model at a time depending on the damage level. So you could simply have an array of transforms on which game object you de/activate recursively.

To add special effects, you can use SendMessage when transitioning from one state to another, to call that models "OnExplosion" effect. Then you can separate the actual explosion effect from the rest of the code to have it flexible.

Comment
Add comment · Show 6 · 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 cidmodder · Dec 09, 2010 at 12:19 AM 0
Share

thats what i was thinking. for the most customization though that would take tons of models per building though wouldn't it? and say I want it to be like a car drives through and i want the wall to destroy where the wall was would that require one of these algorithms?

avatar image Statement · Dec 09, 2010 at 12:22 AM 0
Share

Yeah there are many different ways to do it. Basically try to think about how you want it to behave, and then try to think of the EASIEST way to achieve that.

avatar image cidmodder · Dec 09, 2010 at 12:50 AM 0
Share

do you know where i could learn more about these algorithms?

avatar image Statement · Dec 09, 2010 at 01:04 AM 0
Share

I hate to make another clich but... :/ http://www.google.se/search?q=procedural+demolition

avatar image Statement · Dec 09, 2010 at 01:05 AM 0
Share

You can always look at games that already have similar features (such as "Red Faction") and read their blogs et.c. I really hope whoever made that destruction demo for Unity posts here so you get a little more help from them.

Show more comments
avatar image
3

Answer by Kos-Dvornik · Jan 05, 2015 at 05:23 PM

In addition to above try this tutorial: http://kostiantyn-dvornik.blogspot.com/2015/01/unity-anoxemia-destruction-tutorial.html

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

1 Person is following this question.

avatar image

Related Questions

Creating 2d damagable terrain? 0 Answers

How to add terrain destruction 1 Answer

Damage Meter 1 Answer

How to have deformation/denting of 2D objects on impact? 1 Answer

cant seem to get damage on collision to work 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