Shatter Toolkit

Discussion in 'Assets and Asset Store' started by gustavolsson, Jul 8, 2011.

  1. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    $1.png $3.png

    Shatter Toolkit on the Asset Store
    Website


    So, I'm finally finished with my latest project! Here is the description from the asset store:

    The Shatter Toolkit enables you to easily shatter or split any game object dynamically in real-time, whether you want to smash walls or slice fruits. The toolkit creates the necessary geometry, fills the holes and instantiates the new game objects for you.

    One line of code shatters or splits a game object and no scripting is required if you use the bundled helper-scripts.

    FEATURES
    - Split game objects by specifying an array of planes
    - Shatter game objects by specifying a point
    -- Internally splits the game object in randomly generated planes passing through the point
    - Fills the holes (cut area) of the mesh after a split, if enabled
    - Tweakable uv mapping for the cut area
    -- WorldUvMapper - repeats a texture a number of times per world-unit
    -- TargetUvMapper - maps the cut area to a specific part of the texture
    - Includes an advanced triangulator, useful in many areas of game development

    If you have any questions, please post them here! Thanks!
    Last edited: Jul 16, 2013
  2. gameyeti

    gameyeti

    Member

    Joined:
    Jan 17, 2011
    Messages:
    85
    Slicing things apart is so satisfying. Good job :) I guess I can ask the obligatory mobile question. Have you tested this on Android / iOS and if so, how is performance?
    Last edited: Jul 8, 2011
  3. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks!

    I have tried an old version on my android phone (LG P990) and it worked well. Since then I have optimized it so I hope it will run smoothly on higher-end phones. I'm planning to submit a demo scene as an app to the android market as soon as I've tested it, so developers can try it out on their preferred phones. Hopefully it will work nicely on lower-end phones too, though I suspect they'll be limited to fruit ninja style games.
  4. bigkahuna

    bigkahuna

    Member

    Joined:
    Apr 30, 2006
    Messages:
    5,420
    Works very nicely. What's the price?
  5. rumblemonkey

    rumblemonkey

    Member

    Joined:
    Mar 25, 2011
    Messages:
    280
    That is beautiful!

    Couple of questions:

    1. Could the results be saved? Level designers for FPS games, for example, could use that feature.

    2. Can the meshes have normalmaps and shadows? Can it go from baked lightmaps to realtime shadows? Basically, what are the limitations in terms of the materials we can deploy and the look we can have?

    3. What is the performance hit, for these objects, before they are affected by the operations? I.E., if I build an office building for a FPS and used it as a feature of the walls, am I going to come to a screeching halt, performance-wise?

    4. How is cleanup of the objects handled? I.E., we've just done a cinematic of a huge building getting slice in half by the Annihilator Ray... the dust has settled, and gameplay has resumed. Now we want all of the resulting rubble to become a single static object, for performance's sake; can that be done? If we're having a shootout in that theoretical office building, how can we gracefully cull the smaller fragments after a few seconds, to recoup performance lost?

    Anyhow, this is one of the best demos I've seen of this thus far, really great work :)
  6. ScienceFiction

    ScienceFiction

    New Member

    Joined:
    May 28, 2008
    Messages:
    392
    Really nice work
  7. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,317
    I am very interested too. Does it work on iOS ?? (is what concerns me most)
    Last edited: Jul 9, 2011
  8. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks everyone!

    150$

    1. When a shatter occurs the pieces are instantiated as new game objects (clones of the original but with new meshes), so you could save those, but I have not tried it. If it is possible to instantiate new game objects while in edit-mode you may be able to call the shatter/split methods from an editor script made especially for artists. If there are requests for this I can look into it.

    2. The toolkit takes cares of vertices, normals, tangents and uvs (the main uv layer) so normal / bump / parallax maps should work nicely. Realtime shadows should work as usual (there is no difference between the pieces and the original game object, except the mesh and the shatter tool itself). Baked lightmaps may be difficult to implement since many of the surfaces on a shattered game object did not exist when the bake took place, so those would be unlit.

    3. UPDATE: I totally misread the question! My answer here covers the new meshes of shattered game objects. See the post further down below for a correct answer.

    The toolit generates new geometry, so the vertex/triangle count will increase when shattering an object, how much totally depends on the original mesh and where it was shattered. There is however no "wasted" or duplicate vertices or triangles, it is as optimized as it can be in a real-time scenario (it does not try to simplify the geometry, which would be too performance heavy).

    4. All ShatterTool instances (the script used to shatter/split objects) have a Generation property which defaults to 1. When a game object is shattered all the pieces will receive a Generation value of the original +1. So the first time an object shatters it's pieces will have a Generation value of 2. This enables you to for example write a script that examines the ShatterTool.Generation property and say if it is above 3, you could destroy the game object after a couple of seconds.

    Check out the Readme for more information on how it works internally :)

    Thanks for the comments and questions!
    Last edited: Jul 13, 2011
  9. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    I do not have the Unity iOS license so I can't try it out just yet. I'll begin testing the toolkit on android devices next week.
  10. I am da bawss

    I am da bawss

    Member

    Joined:
    Jun 2, 2011
    Messages:
    2,317
    I am also interested this in comparison to Piecemaker.
  11. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    I have not tried Piecemaker but my understanding is that it is designed to pre-compute the destruction and replace game objects during gameplay. Piecemaker seems to make it easy to customize the destruction beforehand, but seems to lack the benefit of shattering objects dynamically, exactly where they were hit by another object during gameplay for example.

    The Shatter Toolkit is designed to do one thing fast, splitting meshes, and by splitting meshes multiple times in real-time during gameplay it simulates the shattering. It is not possible to customize the shattering (other than choosing the number of times to split an object) like in Piecemaker without writing scripts, but the game objects will shatter dynamically, where they were hit during gameplay.
    Last edited: Jul 10, 2011
  12. Josh_Amsterdam

    Josh_Amsterdam

    New Member

    Joined:
    Feb 22, 2011
    Messages:
    68
    I haven't bought this package, because I currently can't afford it, but this looks amazing, you're going to make a lot of money of this. ;)

    If I understand everything correctly it should be extremely easy to make this work in the editor. Which is actually a good idea for, for instance, Iphone games.
  13. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks! :)

    Yeah, I will look into creating a helper script for in-editor use.
  14. mikevanman

    mikevanman

    New Member

    Joined:
    Sep 30, 2009
    Messages:
    108
    Does the system work ok with two object (or more) that are intersecting each other (imagine a set up upright post going into the floors of a building)

    this looks mint (but its not cheap (I'm a poor student) so I want to make sure it will do what I want before buying it

    I could send you the FBX file if you want. I want to create a demolition ball (or ball you can throw) to demolish the building.
  15. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    It will work as long as the geometry is closed, that is, every edge belongs to exactly two triangles. (If you want to fill the cut area, which is usually the case with solid meshes; otherwise there is no requirement on the mesh)

    It sounds like you want to keep the upright post and the floors of the building in the same mesh and game object, and it should work, but I would recommend having separate game objects. This will let you shatter/split different parts of the building separately (the post could shatter while the floor stays intact) and you will be able to have different settings and uv mappers for the different parts of the building.

    If you use rigidbodies and colliders the physics engine will push the objects apart but you could easily solve this by marking the post and floor as kinematic by default. Then, when shattering or splitting the post for example, you could make it non-kinematic. (Toggle the "Pre Split msg" checkbox on the ShatterTool to make it send a message before a split occurs, see the Readme for more information)

    Thanks for the interest :)
    Last edited: Jul 13, 2011
  16. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    I totally misread this question the first time around :) Here is the correct answer:

    There is no performance hit at all. A game object's ShatterTool instance only processes the mesh when a scene is first loaded and then does nothing until the game object is shattered/split.
  17. Marrrk

    Marrrk

    New Member

    Joined:
    Mar 21, 2011
    Messages:
    1,032
    Looks very nice.

    Out of personal interest, how did you solve the mesh collisions?
  18. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks! Piecemaker looks nice too, seems like we are approaching the problem in different ways :)

    I guess that you are talking about the fact that non-convex mesh colliders pass through each other? Here is my take on it:

    It is possible to attach any collider to the original game object, and because it is cloned, all pieces will have the same type of collider. When using box or sphere colliders the pieces tend to intersect each other too much when shattered and launch each other far away though, so I recommend using convex mesh colliders for dynamic rigidbodies. When using convex mesh colliders the vertex count needs to be kept down but most objects stay below the limit or can easily be broken down into several game objects. What I think a lot of people forget is that there is a reason for the limit, any developer with performance in mind should not want to exceed it.

    Using convex mesh colliders is in my opinion the best solution because they're faster and easier to handle than non-convex mesh colliders, there is a reason most physics engines work exclusively with convex hulls. Non-convex mesh colliders shouldn't really be used at all, except for large static meshes.

    That's my opinion at least :)
  19. Marrrk

    Marrrk

    New Member

    Joined:
    Mar 21, 2011
    Messages:
    1,032
    Yeah, I create a convex collision mesh for my fractured parts, but its not very speedy, but thats maybe because I work very often with Highpoly objects (highpoly in the sense of the unity sphere which is very detailed).

    Sorry for distrupting your thread, but it is a highly interesting topic to talk about.
  20. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    No problem :) interesting topic indeed, might be worth it's own thread..
  21. minevr

    minevr

    New Member

    Joined:
    Mar 4, 2008
    Messages:
    1,009
    Wow~~~cool...

    support animate?
  22. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks :)

    No, the shatter toolkit does not support rigged characters. It may be possible, but I made a decision early on to not support them.
  23. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    So, I just submitted the free demo app to the android market:

    https://market.android.com/details?id=com.GustavOlsson.STDemo

    I've added a "ShatterScheduler" helper-script that may be used to make sure that there is a certain number of "cooldown" frames between each shatter/split, for performance reasons. You don't have to use it but there is no negative impact on the visuals when using it. (The webplayer is now updated and uses a cooldown value of 5)

    I'm planning to submit the new scripts as an update to the package in the next couple of days.

    The only thing to keep in mind when setting up scenes for mobile devices is that they can't, for obvious reasons, handle as complex/many meshes. I replaced the vases from the webplayer demo and lowered some settings for better performance, other than that, there is no difference between the android and the webplayer demo.
  24. Loud

    Loud

    New Member

    Joined:
    Jun 5, 2009
    Messages:
    88
    Great work so far! I'm really enjoying how simple and efficient the toolkit is. Voronoi fracturing would be very helpful for what I'm doing. Are there any plans for this?
  25. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks!

    I have no plans to implement voronoi fracturing at the moment, I decided to focus on splitting game objects only to keep the toolkit simple and clearly defined. I'm curious on why you need it though? :) To pre-fracture game objects?
  26. pixelsteam

    pixelsteam

    Member

    Joined:
    May 1, 2009
    Messages:
    670
    Great tool. I sure look forward to a special price drop;)
    I have been having lots of fun playing with piecemaker too. Blowed up Real good! http://pixelbuz.com/waterland.html
  27. Loud

    Loud

    New Member

    Joined:
    Jun 5, 2009
    Messages:
    88
    Voronoi would be better for what I'm doing as I'm breaking an object on impact and it looks better when it breaks into chunks rather than shards. The current method for generating planes has each plane travelling through the point of impact which works well for bullets, but it doesn't look as good when hit by a larger object.

    I've used some Voronoi methods for creating chunks by hand in 3ds Max and it looks great. Now I'm trying to get it to work with shatter toolkit. If I could it would be perfect.
  28. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    When reading about it, it seems to be difficult to implement true voronoi fracturing in real-time. I have no experience with the technique though.

    The shatter toolkit always cuts the whole game object so it won't be possible to do true voronoi fracturing, but it is possible to achieve a more chunk-like effect by using the ShatterTool.Split(Plane[] planes) method with custom cut planes. You could try setting up the planes in a cube like structure and then rotating their normals using a random factor to achieve a more natural look. By taking the point of collision into account when creating the planes, it would be possible to create chunks that looked different depending on where the game object collided too.
  29. Loud

    Loud

    New Member

    Joined:
    Jun 5, 2009
    Messages:
    88
    Good to know. I wasn't sure if using planes would work either. It appears that a slice plane in 3ds Max will handle the intersections differently. I was thinking about doing something like you described so I may have to go ahead with that approach. Thanks.
  30. chaneya

    chaneya

    Member

    Joined:
    Jan 12, 2010
    Messages:
    103
    I have a question about the actual memory/file size of the project itself. Given that there is a 20 meg limit for mobile games (if you want users to be able to download over 3G/4G you must be under 20 megs.), I am considering adding this to my project but final build size is a huge issue.

    I noticed the Asset Store project was 6 megs and your Android Demo was over 5 megs. But the Asset store version appears to have several textures including several for a skybox, a .PSD and a .png.

    If you stripped out everything but just the core code and functionality what is the file size of Shatter Toolkit and do you know how much space it would consume/add to an existing Unity project?

    Thanks
    Allan
  31. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    The "Core" folder contains all the functionality of the toolkit, everything else is just documentation/examples. The size of the Core folder is about 150kb and the ShatterTool monobehaviour script (the main tool) does not precompute anything and thus does not store any significant amount of data in the unity Scene files.

    My intention was that when someone had learned how to use the toolkit (having looked at the example scenes etc), they would only need to import the Core folder into their projects.

    Thanks for the interest!
  32. markofjohnson

    markofjohnson

    Member

    Joined:
    Oct 12, 2010
    Messages:
    67
    Hi Gustav, this looks great. How easy is it to make more dramatic shatters than you show in the webplayer demo? I'm thinking more like shatters that are created by having a bomb inside something so pieces go flying far? Or dropping a vase onto concrete from a great height?

    Thanks
    Mark.
  33. wightwhale

    wightwhale

    Member

    Joined:
    Jul 28, 2011
    Messages:
    181
    I have tested and run shatter toolkit on IPad 1st gen. The shattering preforms very well.

    I have also added some code for anyone who is interested in not making every split-able object a mesh collider. My solution is to attach colliders (Non Mesh) as children of the game object you want to split. I also attach a mesh collider to the main object but I don't make it active. Upon collision I enable the mesh collider and set it to convex, I also destroy any non mesh colliders currently on the object.

    Adding the following code to ShatterTool.cs in the CreateNewGameObjects function will do the trick.

    Code (csharp):
    1.  
    2.  
    3.             MeshCollider newMeshCollider = newGameObject.GetComponent<MeshCollider> ();
    4.             if (newMeshCollider != null)
    5.             {
    6.                 newMeshCollider.convex = true;
    7.                 newMeshCollider.enabled = true;
    8.             }
    9.            
    10.             BoxCollider[] boxColToDestroy = newGameObject.GetComponentsInChildren<BoxCollider> ();
    11.             foreach (BoxCollider c in boxColToDestroy)
    12.             {
    13.                 Destroy (c);
    14.             }
    15.             SphereCollider[] sphereColToDestroy = newGameObject.GetComponentsInChildren<SphereCollider> ();
    16.             foreach (SphereCollider c in sphereColToDestroy)
    17.             {
    18.                 Destroy (c);
    19.             }
    20.             CapsuleCollider[] capsuleColToDestroy = newGameObject.GetComponentsInChildren<CapsuleCollider> ();
    21.             foreach (CapsuleCollider c in capsuleColToDestroy)
    22.             {
    23.                 Destroy (c);
    24.             }
    25.  
    I have done this because I have many boxes which are calculated much faster with the physics using box colliders up until the moment of impact. This is also useful on objects which I have multiple colliders, in my case a bowling pin, which is made up of 4 different colliders.
  34. koyima

    koyima

    Member

    Joined:
    Mar 19, 2009
    Messages:
    1,548
    Nice stuff.
  35. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks for the feedback wightwhale, it's great to hear that the toolkit works well on the iPad!

    It is actually possible to use non-mesh colliders and/or custom code without changing the ShatterTool.cs file: just put your logic code in a custom script that implements the PreSplit() and/or PostSplit() methods, attach it to the original game object and toggle the corresponding checkboxes on the Shatter Tool component.

    There is no built-in "explosion effect", but you can easily apply an explosion force to all new pieces by attaching a custom script (that implements the PostSplit() method) to the original game object. It's up to the user to decide what to do with the newly created game objects :)

    Thanks!
  36. megmaltese

    megmaltese

    Member

    Joined:
    Mar 19, 2009
    Messages:
    1,897
    I read this in the website:

    Is there a performance hit when using the shatter toolkit with game objects, when they're not being shattered/split?

    No, there is no performance hit at all. A game object's ShatterTool instance only processes the mesh when a scene is first loaded and then does nothing until the game object is shattered/split.




    I cannot understand: how can you know where the object will be hit and will have to break at map loading time?



    Also, another question: I wonder how do you create real time colliders, they are convex meshes, right?
    Last edited: Nov 13, 2011
  37. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    At map loading time the mesh is only pre-processed (converted to a format better suited for the task), no split calculations are done until the object is actually shattered and the split location is known.

    It is possible to use any collider with the system, any collider attached to the original game object will be carried over to the pieces. You may want to create a script that shrinks the colliders of the pieces though, if you're using inaccurate shapes like box colliders; In order to avoid an explosion-like effect when all pieces box colliders intersect right after a split has occured.

    Thanks for the interest!
  38. Pulov

    Pulov

    Member

    Joined:
    Feb 20, 2010
    Messages:
    495
    Just tested the android demo... men its addictive. Would love to see a facade being destroied like those demo walls. So, the objects get destroyed entirely or a region can be defined arround the hit point. If not, thi could be a hot feature. Also noticed that the walls break some times as if they where glass pieces, to control this, would be good to be able to define a maxmun edge size and a relation betwen smallest and largest edge so that the splited debris fit the object type they com from.
  39. ina

    ina

    Member

    Joined:
    Nov 15, 2010
    Messages:
    329
    Is it possible to save the geometry from the resulting mesh?
  40. ina

    ina

    Member

    Joined:
    Nov 15, 2010
    Messages:
    329
    Can you explain more about how the triangulator works, or point to documentation? Thanks!
  41. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Yeah, would be really cool! The objects are cut in multiple split-planes to achieve the shatter effect. Manually dividing a large object into smaller chunks which then are shattered individually will look more realistic and less "glass-like". It is also possible to cut the objects in custom planes using the Split()-method.

    Yes, the resulting mesh can be accessed from the MeshFilter.sharedMesh property.

    It is a robust 2d triangulator that can handle multiple (recursive) holes and uses my custom algorithm based on the ear-clipping method. It actually turned out to be the most advanced bit of code in the package. You can use it by calling the static Fill()-method that takes vertices and edges as parameters and returns the new edges and triangles for you. I plan to write a blog-post on how it was designed some time in the future..
  42. janpec

    janpec

    Member

    Joined:
    Jul 16, 2010
    Messages:
    3,177
    This is exactly what i was looking for, destruction of walls for siedge ability. It seem to work perfectly good and it doesnt seem to run slow.
    One question do fractured parts get assigned new colliders on them?
  43. hjupter

    hjupter

    Member

    Joined:
    Dec 23, 2011
    Messages:
    492
    Does this works on flash?
  44. wightwhale

    wightwhale

    Member

    Joined:
    Jul 28, 2011
    Messages:
    181
    Hey Gustav,
    I was wondering if there's a way to center the pivot point of an object which was split? I'm currently having some trouble with the pivot point not being centered on the newly split object giving some odd physics behaviors in the objects which are split. This problem shows up in your uvMapping example but isn't easy to see unless you pause and examine the pivot of a smaller object. I would really like to fix this issue as it looks strange in my game.
    Thanks,
    WightWhale
  45. badawe

    badawe

    New Member

    Joined:
    Jan 17, 2011
    Messages:
    277
    Hello there! This is a nice plugin!
    I've been looking for something like that a long time!

    Here is some questions:

    1 - This will work with Planes?
    2 - We are planning using this with some 2D Plugin, like ex2D this can be done?


    If the answer fot this questions is ok, I'm buying right now!
  46. badawe

    badawe

    New Member

    Joined:
    Jan 17, 2011
    Messages:
    277
    @gustavolsson

    Where are you!? =D
  47. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Hehe, I'm still here, but I have some problems with the forum notification system it seems :) I thought it would tell me if any of my subscribed threads got updated, but it didn't apparently.

    The new pieces will be clones of the original game object, so all components will be carried over and updated (MeshCollider for example) to fit the new mesh. If you want the pieces to have mesh colliders, just attach a mesh collider to the original game object :)

    Not yet. I get the "Failed to convert type" exception like a few others seem to get. Hopefully it should be fixed in a future, more stable unity flash release. If not, I'll have to look into it and change the code to not use what's causing the flash compiler to quit (there seems to be quite a few cases where it can't convert C# properly).

    Yes, the pivot will be where the original pivot was (which is important for a couple of other things) but the unity physics handles it nicely since it has it's own internal center of mass. To get the "true geometrical center"/pivot of a game object you can either use rigidbody.centerOfMass (make it kinematic if you want to simulate it yourself) or use the less accurate renderer.bounds.center property.

    I've been thinking of adding a method to the ShatterTool that would return the accurate geometric center so one could remove the rigidbody component if it isn't needed. I'll add this to my list of "features to look into for future updates" :)

    Here is my email answer if others are interested:

    Yes, it works on planes (if you refer to meshes that do not have any volume), just uncheck the "Fill cut" property of the shatter tool.

    I have not tried it with any of the 2d solutions available on the asset store, but as long as the 2d system doesn't change the unity3d game object management and a game object has a renderer with a mesh, it should work.


    Thanks for the interest everyone and sorry for the late replies!
    Last edited: Feb 27, 2012
  48. SixDS

    SixDS

    New Member

    Joined:
    Mar 25, 2012
    Messages:
    1
    The Shatter Toolkit is fantastic. It fits nicely into my prototype.

    I'm having an issue with joints that I don't know if you are aware of: When shattering an object which is the target for a joint, the original object gets destroyed but the reference is not updated in the object that has the joint component. This leaves the joint pointing to a missing GameObject (and potentially floating in thin air).

    Let me explain this with an example to make it clearer:
    GameObject one, say, "head", has a FixedJoint component. Within this component, the "Connected Body" variable points to GameObject two, let's call it "body". When you shatter "body", this GameObject is destroyed and new objects are created based on it. Now, "head" still has a FixedJoint pointed to a missing "body" GameObject.

    I've somehow got around this issue in a dirty and easy way by breaking the joint via script using the pre split message, but this is still far from optimal. The real fix would be finding which of the new pieces holds the anchor point for the joint and assigning this piece as the new connected body.

    Continuing with the example above, if we suppose the "body" get's broken into 3 pieces, the piece in contact with "head" would become the new connected body for the FixedJoint of "head".

    Do you plan to fix this?

    UPDATE: Forgot to mention that the converse event also causes undesired behaviour: When shattering an object with a Joint component, all shards inherit the Joint. Each joint of the original object should be inherited only by one of the shards.
    Last edited: Mar 25, 2012
  49. meth0s_

    meth0s_

    New Member

    Joined:
    Dec 11, 2011
    Messages:
    60
    the name of this toolkit cracks me up always a good laugh but you have done well
  50. gustavolsson

    gustavolsson

    Member

    Joined:
    Jan 14, 2011
    Messages:
    233
    Thanks :)

    The toolkit won't try to fix the relationships between game objects that are connected via joints or parent-child structures, mainly because not all games will want to handle the situation in the same way. The best way to solve your problem is, like you tried, to tell the toolkit what to do in the Pre/Post split method callbacks. It might be a good idea to have this functionality in the bundled scripts though so I've added it to my to-do lists for future updates.

    Haha, thanks :)