Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Structural Integrity C#

Discussion in 'Physics' started by Calum_1015, Mar 1, 2016.

  1. Calum_1015

    Calum_1015

    Joined:
    Jan 31, 2016
    Posts:
    17
    First and foremost, this is a very very broad question! Hence, it is on the forums, and not UA. Second, I have 2+ years of experience with C#, so please correct me if my code is flawed, or just won't work!

    So, structural integrity. How can it be done with PhysX?

    1. I understand I need to calculate center of mass, based on weight (and mass obviously).

    2. My game works with the Unity plugin Cubiquity (https://www.assetstore.unity3d.com/en/#!/content/12689). There are two parts to this voxel engine. Working with cubes, and working with smooth terrain. I am working with cubes. As the engine currently stands, when you destroy the bottom of a building, the top floats. The idea is that I will be able to select all the individual voxels and disconnect them from each other, making them tumble on down to the ground.

    3. As the title suggests, I also want structural integrity in my buildings. IE you destroy 3 corners of a building it should fall towards the corner opposite of the one standing, and it should stay relatively in the same shape (keeping the voxels together), and then (for lack of a better word) destroying the voxels when the building hits the ground.


    This is ALOT to ask for, and I would like to work on this together with the community!
     
    Last edited: Mar 1, 2016
  2. s_guy

    s_guy

    Joined:
    Feb 27, 2013
    Posts:
    102
    People who aren't an expert in Cubiquity will not likely reply. The average Unity dev doesn't know that package, if it has its own structural integrity simulation, or how adaptable it is to a general / self-made solution. So, you should probably post your question in a Cubiquity thread or generalize your question such that Cubiquity is irrelevant.
     
  3. Calum_1015

    Calum_1015

    Joined:
    Jan 31, 2016
    Posts:
    17
    This system is meant to work without Cubiquity, so that you could make a building out of your own meshes, and it would have the same effect as it would within Cubiquity.
     
  4. Calum_1015

    Calum_1015

    Joined:
    Jan 31, 2016
    Posts:
    17
    That is, it would crumple under it's own weight, etc, etc.