Search Unity

Exploder [RELEASED]

Discussion in 'Assets and Asset Store' started by reindeer-games, Jul 12, 2013.

  1. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Thank you for the help. I understand everything except #5 and #6. Since I already had a project open, I am using my own - it has nothing more than a character and a cube. I put a FSM on the cube and followed the above instructions.

    In #5, what is the game object 'Exploder'? I cannot find it.

    Any further help is appreciated.

    [EDIT]

    I got it working! I just made the game object use the owner and when I click on the cube it explodes.

    Now the next step is - how do I define the Timmy character (my main hero) to touch the cube and make it explode?

    Is there a simple 3rd person camera FSM included with Playmaker?

    Mike
     
    Last edited: May 2, 2014
  2. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Great!

    I think you have to create a playmaker trigger (trigger enter?). And when you enter the trigger with your character (touch the cube) it will go to the "Explode" state and make the explosion. But I am really not an expert for Playmaker, I rather do everything in code.

    I really don't know, but I found this: http://hutonggames.com/playmakerforum/index.php?topic=123.0. Hope it helps.
     
  3. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    I have had great success with Playmaker today and have created a pretty good character controller thus far. I am about to place objects and attach the explode playmaker script on them. I have the main character able to kick, so now I just need to set up a trigger and collision detection so when the main character makes contact with an object, it explodes.

    I may ask for a bit of help if needed, but it all seems very clear now.

    Thanks for your help. A++ support like this makes me want to buy ALL of your products.

    Mike
     
  4. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Damn, I just cannot figure this out: "Specify the game object "Exploder" from scene hierarchy to "Explode" state"

    How do I do this?

    [edit] - Say I want to explode the barrel, I dragged the barrel object in the hierarchy to the explode state and THEN it worked.

    Now to trigger it. Got it to work with a key press.

    Mike
     
    Last edited: May 3, 2014
  5. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    I think you already have it, game object "Exploder" is a new game object with ExploderObject component, in the "SceneSimple" scene it is already created, in your scene you have to create it by yourself, but I believe you already have it so you don't have to worry about it now. If you open the "SceneSimple" you can look how the hierarchy is constructed and how the object looks like.

    Yes, you have to use some kind of playmaker trigger, but I am really not a playmaker user, I recommend you to look at playmaker forum/tutorial how to use the triggers.

    Regards,
    RG
     
  6. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Sorry to ask another question, but I am changing formats and using UFPS script and going 1st person. The Playmaker character controller just looked too clunky to be useful.

    UFPS has a Damage global variable that is activated when there is a collision (I believe this is how it works, I could be wrong).

    How would I use Exploder with a simple barrel and make it explode when shot with a gun or, in this case, hit with a melee weapon?

    Thanks.

    Mike
     
    Last edited: May 9, 2014
  7. DMTSource

    DMTSource

    Joined:
    Jul 11, 2013
    Posts:
    36
    Hi. I have always had an issue where larger meshes require a minimum amount of Target Fragments set or the item will not always explode. I read through the thread and am familiar with the issue of running out of assigned fragments before reaching the outside of the sphere, but in this case the single mesh is located at the center of the explosion.

    In my case they are aircraft fuselage models which require something like 60-100 Target Fragments to guarantee a break up. This makes performance really bad sometimes, especially on mobile. I have tried to mess with combination of Frame Budget, Split Mesh Islands, Radius, and the other settings, but it just seems impossible to explode one single large mesh into a reasonable number of pieces. Is there a fix for this?
     
    Last edited: May 10, 2014
  8. cubaschi

    cubaschi

    Joined:
    Oct 23, 2012
    Posts:
    51
    I tried to PM you some weeks ago but didn't get an answer. can you please check your mails? thx!!
     
  9. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello Mike, sorry for late reply.

    To use it with UFPS or other first person shooter controller you can use similar technique as I am using in the Exploder demo:

    1) Create GameObject with Exploder component
    2) Shoot with your gun or melee weapon
    3) Now you need to get the position of the bullet/impact, I am sure you can find it in UFPS docs
    4) Move the Exploder object to the position of the impact (set the Exploder object position to impact position)
    5) Call Explode/Go to Explode state in Playmaker

    This is how I use exploder in the example demo, but I am not using Playmaker or UFPS, but this should be very similar.
     
  10. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, sorry for late reply. It is strange that sometimes the item does not explode. You say the exploder is in the center of the object, is it really a center or a pivot (which is not always in the center). Just to make sure, you can use one of my utility function to locate the center of the model from its render bounds:

    Code (csharp):
    1. ExploderUtils::GetCentroid(GameObject obj)
    About the model, I am guessing that the problem you see is that the explosion is not always nice, fragment pieces are big, especially when the model is long like an airplane. I tried to explode sample model of boeing 747 (around 10k vertices) with 30 target fragments and it is as you say. I wouldn't touch frame budget, it is good to leave it around 15 (or more on PC), split mesh island can help with complicated models but can take more frames and radius is not really necessary to change if there is only one object and singlemesh.

    Is it happening like on this video I made?

    [video=youtube_share;7ud77ufhklQ]http://youtu.be/7ud77ufhklQ

    I think it is happening because the cutting plane is always randomized, there is no clever algorithm how to cut next fragment. I left it randomized because it looks more natural and works great for smaller objects. However not so good for bigger objects (long in one side) like your airplane. I can do some research and optimize the cutting plane orientation and see if it will work better, for now you can always split the mesh manually into several pieces (uniform size) which should help a lot.

    Regards,
    RG
     
  11. DMTSource

    DMTSource

    Joined:
    Jul 11, 2013
    Posts:
    36
    In my case the fuselage is not exploding at all, the explosion in the video would be perfect. The original object is spawned as the only fragment for the explosion. I will email you the models to test it with them. I have two separate models that its occurring on.
     
  12. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Okey, I got it, I will let you know.
     
  13. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Okey, so I tested it and I know where is the problem, it is an Exploder issue with not-closed-mesh models.
    When it cuts the fuse it tries to triangulate the holes but the triangulation fails because it cannot find a contour
    on an opened mesh (mesh with holes - airplane windows, etc...).

    You can try to set triangulateHoles to false on line 1079 (ExploderObject.cs) in method cutter.Cut(...), it will
    work immediately but it will never triangulate anything.

    Anyway I want to fix this a long time, I will make it a high priority, it will triangulate the hole only if there is
    a contour otherwise it will just leave it empty and not fail as it does now.

    I'll keep you informed.
     
  14. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    I sent you PM.
     
  15. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    So it was easier than I expected, locate file MeshCutter.cs and go to line 557, you should see this condition:

    Code (csharp):
    1.  
    2. if (contour.contour.Count == 0 || contour.contour[0].Count < 3)
    3. {
    4.     stopWatch.Stop();
    5.     return stopWatch.ElapsedMilliseconds;
    6. }
    7.  
    comment 2 lines inside the condition and add one line with setting triangulateHoles to false:

    Code (csharp):
    1.  
    2. if (contour.contour.Count == 0 || contour.contour[0].Count < 3)
    3. {
    4. //   stopWatch.Stop();
    5. //   return stopWatch.ElapsedMilliseconds;
    6.      triangulateHoles = false;
    7. }
    8.  
    This should fix your problems, let me know if you have any more problems.

    Regards,
    RG
     
  16. GrumpyOldMan

    GrumpyOldMan

    Joined:
    Sep 29, 2011
    Posts:
    51
    Hi, I picked up Exploder recently and I really like the effect, it makes shooting guys really satisfying!
    But on the other hand, I've been having some issues getting it to work seamlessly.

    I spawn the exploder on the object I want to explode, start playing the death animation, wait half a second, call the explode function on the exploder, wait another half second, then I destroy the exploder.
    Doing this I get uneven results: sometimes the enemy explodes fine, sometimes a solid copy of the enemy pops up (explodes as one solid fragment?), sometimes he doesn't explode at all.
    I've tried making the exploder large enough to encompass the entire enemy, but it still does the one solid fragment thing.

    I've also tried cracking the enemy in advance but I get two errors:
    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ExploderObject.Explode (.OnExplosion callback) (at Assets/Exploder/Exploder/ExploderObject.cs:282)
    3. ExploderObject.Crack (.OnCracked callback) (at Assets/Exploder/Exploder/ExploderObject.cs:340)
    4. ExploderObject.Crack () (at Assets/Exploder/Exploder/ExploderObject.cs:321)
    5. ....
    6.  
    7. MissingMethodException: The best match for method ExplodeCracked has some invalid parameter.
    8. System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParameters) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/MonoType.cs:520)
    9. UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Export/Coroutines.cs:19)
    10. UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
    11. ....
    I looked at the documentation and example, and my best guess is I should be using these two commands:
    Crack(OnCracked)
    ExplodeCracked(OnExplosion)
    but maybe I'm getting something wrong?

    Do you have any idea what might be going on? If it helps I can email a copy of my project.
     
  17. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    thanks for using Exploder!

    To answer your questions:

    1) I believe it can be related to the same bug I found few days ago, please try the code changes as I wrote it
    in the last post (one before your post), it is about changes in the source file MeshCutter.cs. In few days, this will
    be officially on asset store as a part of the new update. It should help.

    2) Crack should work, this crash is because you probably call Crack(...) in Start or Awake before the Exploder is
    initialized. You can fix this by changing
    Code (csharp):
    1. private void Start()
    to
    Code (csharp):
    1. private void Awake()
    in file ExploderObject.cs. (This change will be also a part of the new update)

    And in your project make sure you call Crack(...) in Start(). Exploder must be initialized before you call
    any Explode(...) or Crack(...).

    Regards.
     
  18. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Code (csharp):
    1. To use it with UFPS or other first person shooter controller you can use similar technique as I am using in the Exploder demo:
    2.  
    3. 1) Create GameObject with Exploder component
    4. 2) Shoot with your gun or melee weapon
    5. 3) Now you need to get the position of the bullet/impact, I am sure you can find it in UFPS docs
    6. 4) Move the Exploder object to the position of the impact (set the Exploder object position to impact position)
    7. 5) Call Explode/Go to Explode state in Playmaker
    I have a GameObject called crate box. I shoot it and can make it disappear as described below. I have decided not to use Playmaker for this, but to script it. Yes, I have read the manual and tried to find commands in the scripting reference, but I simply do not know c# and this is all very confusing for me.

    I can not find any mention of how to get the position of the bullet/impact in the UFPS documentation and I am a total noob to Unity. I also have no idea how to move the Exploder object, but I suspect it requires a transform. Can I use Playmaker and UFPS at the same time? I guess I can since I am affecting the exploder objects and not the main player camera.

    I do not mind scripting this if I can get a tiny bit of help on how to start/proceed? I know you did not write UFPS or Playmaker, but I really need to figure this out since it is CRITICAL to the game I am creating.

    I am using UFPS and they have a c# script called vp_damage_handler. In this handler is a place to kill the object (Die). I have successfully used this to hit the object and make it disappear. I want the object to explode, so I tried to copy and paste some existing script at the point where I believe it would work. So far, no luck. In the editor, the crate box GameObject has the vp_damage_handler script (from UFPS) and the exploder_object script (as well as a box collider and rigid body components). The vp_damage_handler script is a large script and I have no idea how it functions, so I am guessing where to place the explode script to call the explode function.

    I started be declaring the following:

    Code (csharp):
    1.     private GameObject[] DestroyableObjects;
    2.     private ExploderObject exploder;
    I tried this in c#, but it's not working (taken from this forum thread). I am having an impossible time explaining to exploder the name of the GameObject. Its name is crate box. I do not know in c# how to define the current object as itself. In other languages I do know, I could do this. I'm also not sure how to transform the position of the crate box with the exploder version. Any suggestions?

    Code (csharp):
    1.     var exploderObject = new GameObject("Exploder");
    2.         exploderObject.transform.position = GameObject("cratebox").transform.position;
    3.         exploder.Explode(OnExplosion);
    4.        
    5.     }
    6.  
    7.     void OnExplosion(float timeMS, ExploderObject.ExplosionState state)
    8.        
    9.     {
    10.        
    11.         if (state == ExploderObject.ExplosionState.ExplosionFinished)
    12.            
    13.         {
    14.            
    15.             Debug.Log("GameObject just exploded!");
    16.            
    17.         }
    18.        
    19.     }
    Simply calling the Exploder.Explode() function does not work either. I also have no idea how to figure out how to transform the exploder object to the crate box I want to destroy. Lastly, I need help with the timer to wait a few frames. I apologize for being such a noobie, but once I know how to do this, i'll be ready to use it for all other objects.

    Thanks for your help.

    Mike
     
    Last edited: May 21, 2014
  19. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    I re-did the code and made it into a function and then called it. If I could just get the commented lines correct I feel it would work.

    In the beginning I have these declared:

    Code (csharp):
    1. public ExploderObject Exploder;
    2. private GameObject[] DestroyableObjects;
    Then I have this code fragment as a function:

    Code (csharp):
    1. void boom()
    2.     {
    3.         // activate exploder               
    4.         ExploderUtils.SetActive(Exploder.gameObject, true);
    5.    
    6.         // move exploder object to the same position
    7.         //Exploder.transform.position = ExploderUtils.GetCentroid(obj);
    8.  
    9.         Exploder.Explode(OnExplosion);
    10.     }
    11.  
    12.     void OnExplosion(float time, ExploderObject.ExplosionState state)
    13.     {
    14.         if (state == ExploderObject.ExplosionState.ExplosionFinished)
    15.         {
    16.             //Utils.Log("Exploded");
    17.         }
    18.     }
    Finally, I call the function:
    Code (csharp):
    1. boom();
    If I uncomment the commented line (transform) in the main boom() function, then I get an error. What do I need to change them to for it to work? I do not know how to set the current GameObject in question as the obj variable.

    I am also not sure if the GameObject (in this case, cratebox) has an exploder object set. Its tag in the editor is set as Exploder and it has the vp_damage_handler and exploder components attached to it in the Unity Editor.

    In any case, the object does not explode. It just disappears, as it should with the vp_damage_handler script that came with UFPS.

    Thank for anyone's help.

    Mike
     
    Last edited: May 21, 2014
  20. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Okay, I figured out the code:

    Code (csharp):
    1. void boom()
    2.     {
    3.         // activate exploder               
    4.         ExploderUtils.SetActive(Exploder.gameObject, true);
    5.    
    6.         // move exploder object to the same position
    7.         Exploder.transform.position = ExploderUtils.GetCentroid(this.gameObject);
    8.  
    9.         Exploder.Explode(OnExplosion);
    10.     }
    11.  
    12.     void OnExplosion(float time, ExploderObject.ExplosionState state)
    13.     {
    14.         if (state == ExploderObject.ExplosionState.ExplosionFinished)
    15.         {
    16.             //Utils.Log("Exploded");
    17.         }
    18.     }
    [edit] Wow. I finally figured it out. It also had to do with forces, fragments and a bunch of other stuff.

    One thing that is happening is that the explosion happens after I strike or shoot the object - and it almost seems like the position is slightly wrong and the exploder object explodes just in front of the GameObject. Is the math wrong or is there something I need to alter?

    Mike
     
    Last edited: May 22, 2014
  21. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    A fantastic little product- worked almost perfectly first time for a test mesh- just one thing- the mesh has two submeshes and one of them appears to disappear - any thoughts?
     
  22. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Thank you for using Exploder,

    there can be a problem with using submeshes. Exploder should cut it however it cuts it as a whole mesh (for performance reasons), the submeshes are ignored, so if there are any multiple materials attached to each submesh, they will be ignored as well. All the fragments will have the same material from zero-index submesh. Is it possible that you have two different materials for each submesh and after explosion you can't see the second mesh because of missing material or is the mesh really missing? (you can pause the game during the explosion and examine one of the fragment)
     
  23. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    They are two different materials. It's actually okay though - it works well enough and consistently enough that you don't really notice. One mesh is the interior of 2d shapes and another is the fringe pixels with transparency for antialiasing. This product is pretty fantastic.

    I do have one other question- in my game, sometimes the rigidbodies deliberately don't have gravity enabled- I tried checking "use parent's physics settings" but the pieces always fall down and have gravity. Is it possible to ensure that the pieces generated share the parent rigidbody's settings like that? (Or is that how it was supposed to work?)

    I'd also like an option where the shards are generated without colliders, or if this is necessary to have collider in order to have a rigidbody, then to have them settable as triggers or something (basically, whatever it is that I need to do to ensure the flying shards have no further physical effects on the remaining objects physics, if that makes sense?)
     
  24. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    the parent physics settings inherits only velocity and mass, not really a gravity, I haven't added every physical property, this can be fixed, I will add it to next update, if you are hurry, you can temporarily inherit more physical properties in class Fragment.cs around line 207.

    The colliders can be disabled, I will make an option for disabling colliders. You can also make a simple fix in file Fragment.cs, add on the last line 315 in function Explode() this: "collider.enabled = false;".

    I will add all of this to next update.

    Regards.
     
  25. juffowup

    juffowup

    Joined:
    May 10, 2014
    Posts:
    7
    I just bought Exploder and I'm running into some trouble. If I add the ExploderObject to a GameObject, I can no longer find that game object by tag name. If I create cube object and give it a tag, I can find it with FindGameObjectWithTag no problem. Add in the ExploderObject and FindGameObjectWithTag returns null. Any idea how to fix that?
     
  26. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello there,

    yes, there is an easy fix for that, in ExploderObject settings enable "Dont use tag". It will ignore all tags on objects, however you will have to add "Explodable" component to each GameObject you want to explode.

    Regards.
     
  27. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello everyone,

    I just submitted a new version of Exploder to Asset Store, it should be public in few working days. Main features:

    1. New Editor UI (not using default unity inspector anymore)
    2. Options for uniform distribution of fragments
      - this will allow you to explode all objects in radius with the same amount of fragments.
    3. Option for disabling fragment colliders
    4. Added UseGravity (also inherits this option from parent)
    5. MaxVelocity
      - this will clamp velocity of fragments, can be useful for various effects or limiting object velocity
    6. Fixed bug with calculating number of fragments around radius (should work much better now).

    $newGUI.jpg

    [video=youtube_share;OJXVcIoGHq4]http://youtu.be/OJXVcIoGHq4
     
  28. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    It's already there :).
     
  29. casperjeff

    casperjeff

    Joined:
    Apr 13, 2013
    Posts:
    333
    good deal - thanks much for this - my hack to try to evenly distribute fragments wasn't holding up real well - anxious to try this!!
     
  30. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    Fantastic! Thanks for being so responsive to my questions!
     
  31. theboosted_1

    theboosted_1

    Joined:
    Aug 21, 2013
    Posts:
    21
    Hello, loving exploder! however i have started using core game kit asset to handle prefab pooling and spawning. my problem is that core game kit gets mad when a prefab is destroyed that was spawned by the system. no matter what settings i choose in the exploder object script, exploder seems to destroy the original object which is cuasing core game kit to stutter with a drop in frame rates. is there any way to change exploder to not destroy the object and instead let me DeSpawn the object in script which would allow the prefab to go back to the pool? or any insight on using exploder with a pooling system?
     
  32. tequibo

    tequibo

    Joined:
    Jun 4, 2013
    Posts:
    19
    I would like to add some components to fragments - namely component to play sound on hitting anything(ground) and maybe particles. What is the best way to go about it?
    Thanks!

    (By the way I use this plugin in my game that was just released on Steam in Early Access ^_^)
     
  33. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello, my apologies the late reply.

    the object does not have to be destroyed, If you set DestroyOriginalObject (DeleteOriginalObject) to false, the object will be only deactivated after explosion.
    deleteOriginals0.png

    As you can see on the screenshot, Delete original object is set to false (unchecked) and it means that the original object will be only deactivated (it will be called SetActiveRecursively(false)).

    I don't know much about core game kit, but I guess it tries to put the object back to the pool on some event. You can use OnExplosion callback for that purpose. It is a callback when the explosion is finished and the original object is deactivated.

    Code (CSharp):
    1.  
    2.  
    3. Exploder.Explode(OnExplosion);
    4. ....
    5.  
    6. void OnExplosion(float time, ExploderObject.ExplosionState state)
    7. {
    8.    if (state == ExploderObject.ExplosionState.ExplosionFinished)
    9.    {
    10.       // now is a good time to notify game core kit to recycle the exploded objects
    11.    }
    12. }
    13.  
    Let me know if you have any more problems.
     
  34. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello,

    fragment sound effects and particles will be part of the next update, please stay tuned, I post the info here when the update is submitted, if you have any suggestions about it, you can post it here. My plan is to make an option for fragments that you can play a sound effect on collider hit or on timeout, the same option will be for particles. Particles will be emitted from each fragment.

    And by the way great work on your game!

    Regards.
     
  35. tequibo

    tequibo

    Joined:
    Jun 4, 2013
    Posts:
    19
    Cool, I was hoping that you plan to add those features! Looking forward to the update!

    Thanks!
     
  36. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    All of a sudden nothing works right. I seemed to have lost all of my projects and after setting up a new scene (importing Exploder and UFPS) when I try to explode objects using UFPS I get the following error:

    Serialization depth limit exceeded at '::vp_State'. There may be an object composition cycle in one or more of your serialized classes.

    I am using the same code that worked before (a page back) and now it does not work at all and I get that error.

    Any help would be appreciated.

    Mike
     
  37. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    On many meshes I use this script on I get this error (despite the read/write setting being ticked in the import settings) - anyone know why??

    The mesh is not readable. Switch on the "Read/Write Enabled" option on the mesh's import settings.
    UnityEngine.Debug:LogError(Object)
    MeshExploder:prepare(Mesh, Boolean) (at Assets/Mesh Explosion/MeshExploder.cs:82)
    MeshExploder:Start() (at Assets/Mesh Explosion/MeshExploder.cs:72)
     
  38. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    also check please if the mesh is not marked as static, the mesh should be readable and not static to work with exploder. From the error you are using a different script? The file MeshExploder.cs is not part of Exploder package.
     
  39. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Reindeer Games - please help me! I cannot get exploder to work at all now. I am not sure what changed.

    Mike
     
  40. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi Mike,

    it's hard to tell what the problem can be. It would be best if you can zip all your project and share it with me (e-mail or dropbox), but use please private message or my email, don't use public post here.
     
  41. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Sorry to be a noob - but do I zip up the entire directory in My Documents (ie. Billys_Room is the project or the clean scene in UFPS)? It is rather large. Or do you need the code?

    Mike
     
  42. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    I think better would be to export a package:

    Unity editor window: Assets -> Export package...

    you can select everything and send me the file.
     
  43. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    The exported package is 1.5gb. It would take ages to upload it.

    Any way to simply help me with the coding (it's in the vp_damage_handler script for UFPS) and the necessary components that are needed to make exploder work?

    Mike
     
  44. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    I see, in that case just export the script assets and send me full error console message in vp_damage_handler.
     
  45. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    OK. How do I PM you here? I cannot find a way to private message you to send the script(s).

    Mike
     
  46. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    You have to access your profile on this forum and start a new private conversation. But you can use my e-mail:
    gamesreindeer@gmail.com.
     
  47. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    This is an error I am getting when running the game:

    NullReferenceException: Object reference not set to an instance of an object
    vp_DamageHandler.boom () (at Assets/UFPS/Base/Scripts/Gameplay/Combat/vp_DamageHandler.cs:139)
    vp_DamageHandler.Die () (at Assets/UFPS/Base/Scripts/Gameplay/Combat/vp_DamageHandler.cs:163)
    UnityEngine.Component:SendMessage(String)
    vp_DamageHandler:<Damage>m__7A() (at Assets/UFPS/Base/Scripts/Gameplay/Combat/vp_DamageHandler.cs:126)
    Event:Execute() (at Assets/UFPS/Base/Scripts/Core/Utility/vp_Timer.cs:509)
    vp_Timer:Update() (at Assets/UFPS/Base/Scripts/Core/Utility/vp_Timer.cs:149)

    boom(); is the function I created to call the exploder script. I wonder what I did wrong this time that I did not do wrong last time without altering one word of the function?

    Mike
     
  48. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    I found the above problem and fixed it - but still no exploding going on. My objects simply disappear.

    Mike
     
  49. karmacomp

    karmacomp

    Joined:
    May 2, 2014
    Posts:
    43
    Anything? I'd love to get this resolved today.

    Mike
     
  50. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello Mike,

    it is really hard to say, what the problem can be, it can be in exploder settings, UFPS settings or in project settings. And since I don't have your project I cannot tell exactly why you see the problem. I can suggest you to follow the Exploder demo settings and use the same approach of exploding objects.

    Now I think I can make a official UFPS patch (demo) to work with exploder as a part of next update, but it will take couple of days.