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

Split a large ball to two small balls

Discussion in 'Scripting' started by rfashwal, Nov 3, 2014.

  1. rfashwal

    rfashwal

    Joined:
    Mar 4, 2014
    Posts:
    1
    I need to know if it is possible to split a large ball into two equal smaller balls and how.
    Thank you
     
  2. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    We talking wood, metal, plastic... What kind of ball is this?
     
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    This is a technical question, not a game design question.
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    The Mesh API documentation has an example that animates vertex positions:

    http://docs.unity3d.com/ScriptReference/Mesh.html

    Animate your sphere into a dumbbell, and then into two spheres. Once the single sphere has split into two spheres, you'll still have one Mesh, so possibly hide that Mesh, and replace it with two new sphere objects. Read up on mitosis if you need inspiration.
     
    Elliot123, rfashwal and hippocoder like this.