Search Unity

PuppetMaster - Advanced Character Physics Tool [RELEASED]

Discussion in 'Assets and Asset Store' started by Partel-Lang, Oct 1, 2015.

  1. ColtonK_VitruviusVR

    ColtonK_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    140
    Exactly what I was looking for, thanks for the help!
     
  2. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    You can use this:
    Code (CSharp):
    1. private static MuscleProps GetProps(BehaviourPuppet puppet, int muscleIndex)
    2.         {
    3.             foreach (MusclePropsGroup g in puppet.groupOverrides)
    4.             {
    5.                 foreach (Muscle.Group group in g.groups)
    6.                 {
    7.                     if (group == puppet.puppetMaster.muscles[muscleIndex].props.group) return g.props;
    8.                 }
    9.             }
    10.             return puppet.defaults;
    11.         }
    ...then read GetProps(puppet, muscleIndex).collisionResistance. If that's what you meant.

    Best,
    Pärtel
     
  3. sdh_unity

    sdh_unity

    Joined:
    Nov 12, 2018
    Posts:
    5
    What would the best way to have the whole puppet body be attracted to another object?

    My attract function (on the attractor class) looks something like this:

    Code (CSharp):
    1.     public void Attract(Rigidbody body) {
    2.         Vector3 gravityUp = (body.position - transform.position).normalized;
    3.         Vector3 localUp = body.transform.up;
    4.         body.AddForce(gravityUp * gravity);
    5.         body.rotation = Quaternion.FromToRotation(localUp,gravityUp) * body.rotation;
    6.     }
    7.  
    Then I'm trying to have the puppet (This is on a script on the puppet Root component, where my animator etc. is) be attracted by the attractor like this:
    Code (CSharp):
    1.  
    2.     void Update () {
    3.         attractor.attract(puppetRigidBody);
    4.     }
    But it doesnt seem to do anything. I'm sure I'm missing something here, but how would you approach having say, a 'dead' puppet get attracted to an attractor?

    (I have finalIK too, not sure if that would be the way to solve this?)
     
    Last edited: Dec 9, 2018
  4. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    12

    Yes, it works. Thank you! But is it good for performance? I have 10 about unmapped puppets on scene and MuscleCollisionBroadcaster.OnCollisionStay() have realy big CG Alloc. Is 2018.3 be better?
     
    Flurgle likes this.
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    In order to have AddFoce have any effect, your puppet needs to be unpinned. If using BehaviourPuppet, call behaviourPuppet.SetState(BehaviourPuppet.State.Unpinned) to make it fall, if not just set puppetMaster.pinWeight to 0.
    Then if you meant by attracting something like star wars telekinesis, then the easiest would be to attach a Joint of some kind between the body of the ragdoll and a kinematic rigidbody that will be your controller.

    Hey,
    You could also cache the MuscleProps for each muscle and access the cache by muscle index.
    Since 2018.3.b11 there will be no GC problems with OnCollisionStay anymore.

    Cheers,
    Pärtel
     
  6. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    12
    Good point, thank you!
    On 2018.3 RC it faster x3 than 2018.2 , amazing!
     
    Partel-Lang likes this.
  7. JacobDzwinel

    JacobDzwinel

    Joined:
    Dec 19, 2013
    Posts:
    15
    Hi Partel, everything works fine now, I even test my own function to activate PuppetMaster immediately and it works with no problems. BTW, check out my project i'm working on, https://twitter.com/jacobdzwinel .
    Thanks!
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey dude, I have noticed that game project in Twitter a few times, I did wonder if it used PM :). Thanks for sharing and awesome work, that combat looks very cool and professionally done!

    Cheers,
    Pärtel
     
    JacobDzwinel likes this.
  9. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    12
    Here is another pertomance question. If i use
    Code (CSharp):
    1. puppet.mode = PuppetMaster.Mode.Disabled
    it still work in profiler.

    And another, about fighting system. Is there something setting for booost layer colliders? Like punch or kick with more velocity.

    Thank you! :)

    And btw. ECS is coming, will it be?
     
    Last edited: Dec 18, 2018
  10. Mad_Fox

    Mad_Fox

    Joined:
    May 27, 2013
    Posts:
    48
    Hi, i'm struggling with this simple task, when my players fall of the map, i teleport them again to the middle of the scene, that works perfect, but the puppet still have the velocity of the previous fall, i want to teleport AND put the puppet velocity in zero.
    what's the best way to null all the velocities of the puppet?
    Cheers!
     
    Last edited: Dec 17, 2018
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    It still shows up in Profiler, because it needs to still read the pose of the character in case it gets activated next frame. You can also just deactivate PuppetMaster gameobject if you don't want it to do anything.

    About boosting, that is what there are Boosters for :). Define a public Booster booster; in declaration space, fill it in in the Editor, then call booster.Boost(behaviourPuppet); when you start the attack. Boosters work in 2 ways: impulse multipiers cause the impact to deal more damage to the other puppets, making them lose pin weight and fall more easily and immunity provides immunity for the boosted puppet so it would not get unpinned itself by kicking another puppet. You can define the muscles to which the boost effect will be applied.

    About ECS, if you meant pure ECS, then not for some years at least, as PhysX doesn't even support that yet. Joachim has said that their working on something though.

    Hey,
    Did you use puppetMaster.Teleport()?
    You can reset velocities like that:
    Code (CSharp):
    1. foreach (Muscle m in puppetMaster.muscles) {
    2. m.rigidbody.velocity = Vector3.zero;
    3. m.rigidbody.angularVelocity = Vector3.zero;
    4. }
    Best,
    Pärtel
     
  12. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    12
    Awesome! Thank you. :)

    And another queston. My puppetmaster colliders don't work in scripts. I test it with debug:
    Code (CSharp):
    1.   private void OnCollision(MuscleCollision m)
    2.         {
    3.             collisionLayerNumber = m.collision.gameObject.layer;
    4.             if (collisionLayerNumber == 9)
    5.             {
    6. Debug.Log(" collision layer " + m.collision.gameObject.layer.ToString());
    7. }
    Another layer is okay but body layer isn't. Also in physic settings matrix is okay and falling is okay too.
    What am i missing?

    Now i think somthing there is another damage system, better than i try to create :D
     
    Last edited: Dec 18, 2018
  13. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    Are your puppets all parented to the same gameobject?
    If so, then they should not. It is an optimization, MuscleCollisionBroadcaster.cs checks for collision.collider.transform.root to prevent the puppet from expensive and unnecessary processing of collisions with itself.

    Best,
    Pärtel
     
  14. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    12
    You are right. :)
    But it must be at the top of the hierarchy always?
    Can I customize parent steps? All my characters get into one game object when organizing a scene.
     
  15. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Should I still use Grounder script from Final Ik when I use Puppet Master? Or Puppet Master do same what Final Ik grounder do?
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    You can customize it, but it has to be changed in script. The lines are 93, 104 and 115 in MuscleCollisionBroadcaster.cs:

    Code (CSharp):
    1. if (collision.collider.transform.root == transform.root) return;
    So it returns out of OnCollisionEnter/Exit/Stay when the root of the muscle matches the root of whatever it collided with.

    I know that this root limitiation is inconvenient, but every frame when some collisions happen is expensive already in terms of performance for both internal PhysX calculations and the calculations that BehaviourPuppet needs to do and collision events may be called tens or hundreds of times per physics step so the exclusion really needs to be as fast and efficient as possible.

    Hey,
    You still need Grounder from FIK, PM doesn't have a grounder of it's own. I mean PM prevents the feet from going into the colliders physically, but if there is no Grounder, chances are that the feet will just get stuck or you see some weird friction with the ground going on. You might actually want to also disable the feet colliders while the puppet is pinned to avoid any friction with the ground until the puppet loses balance. You can do so by going to the "Group Overrides" in BehaviourPuppet, finding the override for the Foot group and enabling "Disable Colliders".

    Best,
    Pärtel
     
    Crossway and Hobodi like this.
  17. ImperativeGames

    ImperativeGames

    Joined:
    Dec 11, 2016
    Posts:
    29
    Hello, PuppetMaster is cool asset! Although I'm having hard time trying to make it work with Tactical Shooter AI asset with complex AI agents. For example, after setting up PM legs of the Puppet doesn't quit follow Target legs:

    Any idea what I should do to fix this?
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey and thanks!
    You probably have way too low value for "Muscle Spring" in PuppetMaster. There are no foot muscles to pin the feet, so the lower legs will be actuated my muscle spring alone. If there's not enough of that, they will dangle like that. Muscle Spring depends on ragdoll mass, so if you have a heavier ragdoll, you'll need more spring. Also lower iteration count requires more spring.

    Best,
    Pärtel
     
  19. somosky

    somosky

    Joined:
    Feb 15, 2014
    Posts:
    105
    I haven't used Puppet Master in while so maybe there's just something I'm missing. Under the Puppet OnLoseBalance I used to be able to call a Unity Event. Now under Unity Events it just says persistent calls and if I add my method to that section it is not called OnLoseBalance. Is there something I'm missing?
     
  20. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    52
    How can I add multiple target transforms to the user control AI?
     
  21. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    52
    Also is there a way to assign this target on runtime? I noticed I cant assign a transform that is in the scene to prefab "zombie puppets"

    Thanks in advance :)
     
  22. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    I tried in the latest Unity and all, but don't see any "persistent calls", it all just looks the same as it used to. Can you make a screenshot or something? Which Unity version were you using?

    Hey,
    UserControlAI is just a demo script, to make the demo AI characters follow a target. You can make your own AI controller that just replaces moveTarget to make it follow another transform. You can assign it like this:

    Code (CSharp):
    1. using RootMotion.Demos;
    2.  
    3. public class MyAIScript {
    4.  
    5. public UserControlAI userControl;
    6.  
    7. void Update () {
    8. if (someCondition) userControl.moveTarget = somethingElse;
    9. }
    10. }
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    The puppet can only lose balance after being in contact with something on the "Collision Layers" of BehaviourPuppet. Maybe you have the layer of the ground included in that so the feet colliding with the ground would cause it to unbalance at random times?
     
  24. alsomitra

    alsomitra

    Joined:
    Aug 31, 2017
    Posts:
    4
    Hey,
    Thank you for a wonderful program.
    I am remodeling melee. But he suddenly lost his balance.
    I guess he is collision with something of his own.
    So there is a question.
    What do you think collision with him? Is there a way to check something? Is there a workaround?
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Oh, looks like I broke the forum. Not sure how my answer was posted before your question..
     
    hopeful likes this.
  26. Spanky11

    Spanky11

    Joined:
    Mar 9, 2015
    Posts:
    283
    Hi Partel, In my (VR) game, when a character dies, I'm setting PuppetMaster.State.Dead and the character goes limp.

    I want the user to be able to pick up the body, so I'm attaching my custom "InteractableItem" component to each body part with a collider. With my interaction in place, I'm able to, for example, grab the body by the head, and this is working fine. But then when I let go, the body slumps to the ground as expected, but for some reason the head starts to jerk around, and also it no longer seems to be solid, and so collisions don't seem to work (with anything as far as I can tell), and my "OnTriggerEnter" mnethod in my InteractableItem.cs no longer gets called. In other words, I can pick the body up by the head once, but then not again. When This happens, I can still pick up the body by grabbing one of the other body parts, but when I let go, that part starts shaking and the collider no longer works.

    I've looked at this for over an hour and can't figure out what's happening. I've examined the layers of the head object before, and after I pick up the body, and don't see any change. I'm pretty sure I'm not calling Physics.Ignore collision on it.

    See the video. You can see how the head of the character is vibrating, and the sphere doesn't collide with it. The sphere still collides with other body parts. Can you help me work through this issue? I don't have much of an idea about the inner-workins of puppetmaster, but it seems like something about the head object is going into an unusual state. Maybe I need to call some kind of re-initialize method to make the head body part work correctly again?

    Thanks in advance!

     
    Last edited: Jan 3, 2019
  27. Spanky11

    Spanky11

    Joined:
    Mar 9, 2015
    Posts:
    283
    I tried experimenting by manually changing the state to active, and then set it to dead again, but the head object still is shaking. By the way, when I pick up the character using the Vive controller, I'm attaching it to the controller via a configurable joint. When I drop the body, I'm destroying this joint. This probably isn't relevant, but I wanted to make sure you understand how I was interacting with the body parts when I pick them up.
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey, could you paste me the code you were using for starting and stopping the grab? Maybe I can spot something.

    Like If you are destroying the joint by GetComponent<ConfigurableJoint>(), it could be actually destroying the joint that connects the head to the body instead.
     
  29. Spanky11

    Spanky11

    Joined:
    Mar 9, 2015
    Posts:
    283
    Thanks Partel, I figured out. It took me a long time to see it, but I was changing the scale of the NeckHead object to 0,0,0 after dropping it. Colliders need a size to work!
     
    hopeful likes this.
  30. ImNotAfred

    ImNotAfred

    Joined:
    Dec 23, 2016
    Posts:
    27
    Can you update your tutorials on how to set up PuppetMaster on characters in Unity 2018.3+ ? It nothing works now, everything is broken...
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    Sorry, latest PM was released before Unity2018.3.
    Please import this patch.

    Best,
    Pärtel
     
  32. sdh_unity

    sdh_unity

    Joined:
    Nov 12, 2018
    Posts:
    5
    Hey!

    Thanks for this. Also trying to work with this. Little confused about where this code goes? Trying to get a callback for whenever any puppet muscle collides with something.

    Sam

    Edit: I still don't understand the code you wrote for the Start() function but I figured this out by copying code over from BehaviourPuppetDamage.cs.. <3 <3 <3 (Love this product!)
     
    Last edited: Jan 7, 2019
  33. ImNotAfred

    ImNotAfred

    Joined:
    Dec 23, 2016
    Posts:
    27
    Thanks for the patch which fixes prefabs problem, Pärtel.
    I installed it, but it behavious strangly now. After applying biped ragdoll creator and then setting up puppetmaster my character is shaking like he was without a muscles. I checked the muscle tension and other parameters and there are ok.

    I had not any problem with previous versions of PuppetMaster.
     
  34. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    463
    few questions for VR,
    I'm interested in making a melee sword game.

    say an enemy is playing an horizontal attack animation with a sword and i strike their sword with mine with a high velocity.
    Are there puppet master variables that can simulate opponent "strength", to affect how much my strike affects their sword?

    Say enemy is "weak", then by striking their sword, i can make their arm move away further, but if enemy is "strong" the impact would only move their arm a little bit.
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    That's strange, doesn't see it happening here.
    Sure you have the collisions disabled between character controller and ragdoll?
    Does the shake go away if you disabled "Angular Limits" and/or "Internal Collisions" in PuppetMaster?

    Hey,
    Yes, technically it's possible. But your own sword needs to be a dynamically controlled object too, not just a kinematic rigidbody as kinematic rigidbodies have "infinite force". You can do that by connecting the sword to your VR hand controller by a ConfigurableJoint. Takes a lot of adjusting the joint's parameters though. Or drive it by script using AddForce/Torque.

    As far as enemy behaviour, you can tweak the values in BehaviourPuppet to define how much hit it will take.

    Best.
    Pärtel
     
  36. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    463
    There's a VR velocity based object holding where the sword is non kinematic and is pinned to the controller via velocity.
    That's what you mean by AddForce/Torque approach right?
     
  37. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    Yeah, that'll do too.
     
  38. Shaquita

    Shaquita

    Joined:
    Jan 28, 2014
    Posts:
    37
    I have a problem when getting back up using the Puppet behavior. Its with a 2.5D project, ive locked the Z axis motion for the pelvis so it doesnt move down Z while being collided with but when getting back up it rotates itself to the forward direction.

    Pics:

    Starting position/orientation:


    Fallen:


    Back up:


    How its setup:


    Zaxis joint:


    Am i setting the joint up wrong or is there a way to change the orientation when getting back up instead of being forward?
     
  39. pravusjif

    pravusjif

    Joined:
    Jul 24, 2012
    Posts:
    10
    Hi there Partel,

    I'm having trouble when manually triggering the unpinned state (calling SetState(BehaviourPuppet.State.Unpinned) on my BehaviourPuppet) on my characters while in the air, it looks like the ragdoll body appears below for a couple of "frames" as you can see in the vid / gif:

    https://puu.sh/CviWv/1bf351c0b5.mp4

    https://puu.sh/Cvj2O/c7eceddd75.gif

    For moving my character I apply forces to a rigidbody on the object in which I have the animator (not involving the muscle bodies nor any other body).

    Do you have any idea about what may be happening?

    Thanks in advance!
     
    Last edited: Jan 12, 2019
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    It's not about the joint. It's BehaviourPuppet getting the rotation of the ragdoll and rotating the Target Root to the ragdoll heading so it would get up without spinning the ragdoll much.
    The best solution I think would be to smoothly rotate the Target Root back to face left or right when behaviourPuppet.state == BehaviourPuppet.State.GetUp.

    Hey,
    Could you tell me, what is the Update Mode of the Animator? And do you have BehaviourFall added or just BehaviourPuppet?

    Best,
    Pärtel
     
  41. pravusjif

    pravusjif

    Joined:
    Jul 24, 2012
    Posts:
    10
    I only have the "BehaviourPuppet" and the animador update mode is in "Normal".

    Apparently changing it to "Animate Physics" improves this behaviour as it appears below but not so much now.
     
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    Looks like the mapping fails to map the animated character to the ragdoll for a frame. What is the "Normal Mode" of BehaviourPuppet?
    I just released v0.81 to the Store yesterday, it has some fixes to Unity2018.3 stuff, but also improvements to reliability in terms of how PM updates its behaviours. Might be work to update, the problem might just disappear.
    If not, any chance you could send me a repro project or package? Haven't been able to reproduce here.

    Best,
    Pärtel
     
  43. devis

    devis

    Joined:
    Aug 23, 2014
    Posts:
    30
    Will you be updating the PuppetMaster Intregration to work with newest Invector Shooter Template?
    PuppetMaster now seems to mess up not only some of the Characters Animations, but also its physics.

    The Animators Floats and Bools stop working, resulting to for example Falling State being triggered and you character falling eternity on Idle pose. However adding PuppetMaster seems to tone down the Animations a lot. When PuppetMaster is turned off, the character jumps way higher for example.
    So in short; It doesn't really work with the Controller anymore.

    I had this idea, of having PuppetMaster being Kinematic but still reacting to "Obstacles" Layer and turning it Active when hitting them, did not find any way of doing this though.
     
  44. JacobDzwinel

    JacobDzwinel

    Joined:
    Dec 19, 2013
    Posts:
    15
    Hi Partel,
    Is it possible (BehaviourPuppet) to have getup animation in kinematic mode without simulation turned on? I want to blend my bones to character's animation starting positions and then play get up animation without any collisions.
     
  45. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    26
    Can I use Character Joints instead of Configurable Joints?
     
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey guys, sorry for the delay, looks like I missed a notification.

    Hey,
    The current Invector integration is for Invector's Third Person Controller, not the Shooter Template. If you can send me a repro project link to support@root-motion.com, I'll take a look and try to find the problems.

    Hey,
    What if you just disabled all colliders like this
    Code (CSharp):
    1. foreach (Muscle muscle in puppetMaster.muscles)
    2.         {
    3.             muscle.DisableColliders();
    4.         }
    when the getup starts (use the On Get Up Prone and Supine events in BehaviourPuppet to call a method with that code). And then re-enable them in the On Regain Balance event.

    Another option would be to set BehaviourPuppet "Normal Mode" to Kinematic and "Min Get Up Duration" to 0 so it would switch to Kinematic mode right away when getting up. It would still switch back to Active mode if there's a collision with anything on the "Collision Layers" though.

    Hey,
    No, CharacterJoints just don't have the tools required for PuppetMaster to actuate the muscles. If you'd prefer to set up your ragdoll with CharacterJoints for the simplicity of it, you can do so. Just select the root of the ragdoll and do GameObject/Convert To ConfigurableJoints when you are done.

    Cheers,
    Pärtel
     
  47. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    686
    Hey there Partel,
    I was wondering if you might be able to point me in the right direction. The main thing I am interested in trying to fix at the moment is, when my characters become unpinned it seems that the majority of the time their arms and hands stretch out and bend downward at the wrist pretty heavily. You can somewhat see it in the first example below link. The second thing pertains to the feet, which you can also see in the below gif. They begin to spin around sometimes.

    Do you have any recommendations of what would be the properties to adjust to try and... I guess you might say, calm things down? The ragdolls often seem so stiff and rigid when they unpin. I am not sure if more examples might help, but the video below the gif has some more footage of random things I had recorded. I am hoping that with a quick glance you might be able to think of a few things I might be able to adjust? Between PuppetMaster, FinalIK, the integration between them with Stagger, there are so many things to adjust I sometimes end up getting things so far out of wack that I just have to start the settings all over from defaults.

    https://i.imgur.com/qcZTJ0o.gifv



    Thanks for all your awesome work!
     
  48. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,828
    Hey,
    Looks like the animation used for the unpinned state might not be the best, looks like it's a T-pose or something like that, which makes the arms stretch out to the sides like that. Try replacing that animation to something else, if you go and expand the "On Lose Balance" event in BehaviourPuppet. Try the "Protective" animation clip in the PuppetMaster package for example.
    About the stiffness, try adjusting "Unpinned Muscle Knockout" in BehaviourPuppet. Reduce it to make it looser. And increasing "Muscle Damper" in PuppetMaster probably gets rid of the dangling feet problem.

    Fun looking game though!! :)
     
  49. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    686
    Thank you sir, I very much appreciate it. I will take a look at those things right away. Also, double thanks. : D Hopefully it does end up as fun as it has been while testing, lol.


    ---- Edit - I went to take a look and it looks like it is set so that OnLoseBalance under BehaviorPuppet is set to "Switch to Behavior: BehaviourBipedStagger", which on looking at that, OnLoseBalance is set to Animation State: Falling, x-fade 0.5, Layer 0. It looks like Falling is in the BehaviorFall blend tree along with Protective. On finished goes back to BehaviorPuppet.
     
    Last edited: Jan 28, 2019
  50. Subliminum

    Subliminum

    Joined:
    Nov 9, 2017
    Posts:
    56
    Hello,

    I am currently working on a ragdoll damage/ dismembering system using Puppet Master. It is able to apply damage, impulses and remove the joints like in the Skeleton Removing Muscles demo.
    My problem is that when using skinned meshes even when pre-split in a modeling program, is that each 'split' needs to actually be duplicating the muscle/collider/rigidbody that would normally just be disconnected, disconnecting higher up the hierarchy before then hiding the vast majority of the duplicated section with a shader or something and setting it to unpinned in PuppetMaster. This would be to prevent the vertices trying to weigh in halfway around the map where the rest of the character is playing and producing the classic stretching NPC bug. How can i go about duplicating certain sections of the rig temporarily so that the puppet can still eventually be rebuilt and erroneous parts deleted or returned to a separate gibs pool. I'm trying to keep the system as performant as possible so ability to reuse the parts is crucial.

    Any ideas or suggestions would be awesome!
    Thanks in advance,
    Subliminum.