Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PuppetMaster - Advanced Character Physics Tool [RELEASED]

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

  1. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hi all,
    I'll be in Germany from 27th to 5th for a brief vacation, so support might be slower than usual for the next week, sorry.


    Best,
    Pärtel
     
  2. arubaru

    arubaru

    Joined:
    Mar 24, 2017
    Posts:
    9
    Already tried that, but it's not the problem. Here you have what it looks like




    PD: Still dont know what caused the problem but reimporting the model and setting it up as a puppet and all the references again seemed to solve the problem
     
    Last edited: May 31, 2017
  3. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    When I updated puppetmaster and final IK I got a new issue. Now when I spawn in a creature into my game the puppetmaster part of the rig gets pushed way off the level. I'm not sure why this is happening. If I disable the puppetmaster component then reactivate it after the gameobject is created the puppetmaster won't fly off but will give me a warning that the bone's aren't close enough together which I might be able to do a workaround by freezing the position until the puppetmaster is enabled. Though it seems like I shouldn't need to do this at all. Have any ideas?
     
  4. CoolStuntz

    CoolStuntz

    Joined:
    Mar 12, 2017
    Posts:
    1
    Thanks for this, Partel. Your "PuppetMaster.Teleport" solution works perfectly in my testing so far. It solved a problem I was having!
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hi all! Back from my little vacation now, thank you all for your patience! :)

    Did you have "Fix Target Transforms" disabled in PuppetMaster?

    Hey,
    Could you send me that PuppetMaster rig in a repro project or something so I could take a closer look?

    Hey,
    Glad to hear that, thanks for letting me know! :)

    Pärtel
     
  6. arubaru

    arubaru

    Joined:
    Mar 24, 2017
    Posts:
    9
    It was checked :)

    Greetings
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Then I really have no idea based on the information I have, but I'm glad the problem is gone.

    Best,
    Pärtel
     
  8. Hinnyboy

    Hinnyboy

    Joined:
    Apr 21, 2017
    Posts:
    1
    Hi Pärtel,

    As I understand, this tool is not meant for rag-dolls using 2D components (rigidbody2D, 2Dcolliders etc.), right? How hard would it be to adapt it for 2D?

    Anima2D is quite nice (and free) where you can create a skeleton based 2D animation with sprite-mesh and IK and stuff. I would really like my 2D animation to be affected by 2D physics just like your PuppetMaster is affecting 3D animations. Any ideas?
     
  9. HuginnRaven

    HuginnRaven

    Joined:
    Dec 20, 2015
    Posts:
    33
    So I really want to buy this asset, it looks great and might be exactly what I'm looking for.

    HOWEVER! the tutorials are very basic in nature and the documentation is very limited. I get that the asset isn't finished yet but how am I to understand this asset and use it if I can't delve deep into it? Am I missing something, is there documentation included when I buy the asset that gives me a detailed overview of the functions?
     
  10. Alfonso_CJ

    Alfonso_CJ

    Joined:
    Nov 19, 2015
    Posts:
    35
    Hiya! I've encountered this bug several times now GIFPMB2.gif several times now and I'm wondering if someone has solved how to fix this? I'll explain what this is first, This Model was rigged using Mixamo's Auto Rigger, this arm shaking occur when Angular limits is turned on and the humanoid animations look weird as well. I just can't figure out what the problem is. Yep that's it!
     
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey,
    It can't be used with 2D physics components, but if you rig your sprite character with 3D physics components and make it a 2.5D character, it can be done. There is a demo included for that, in Plugis/RootMotion/PuppetMaster/_Integration/Goblin Archer (2.5D Puppets).

    Hey,
    You are quite right, it is still in beta technically. Dont know if you have found them already, but in addition to the tutorials there is the User Manual and Script Reference. Also demos for almost everything and all variables tooltipped.

    Hey,
    Perhaps the joint limits just dont' allow for the range of motion that puppet is trying to follow? What does the animation look like? Try loosening the limits..

    Best,
    Pärtel
     
  12. mburrows

    mburrows

    Joined:
    Jun 18, 2017
    Posts:
    5
    Hello Pärtel! Greetings from Germany.

    First of all I want to thank you for your comprehensive work, I got both Puppetmaster & Final IK.
    I am quite new to Unity & Game Development in General. Actually i am trying to build a Zombie-Shooter kind of game, but there is one issue with Puppetmaster, i do not really understand, and I would love to fix it.

    I have this ugly Zombie-Girl, she is ugly, but one thing makes her even uglier, that is, in some moments during Behavior-Puppet, her Bones become very much dislocated. In this case the knee is somehow twisted, and I have included the Ragdoll view into the example Image. I do not know, what causes this Problem, have you also encountered this "behavior", and know what I could do to solve it ?

    I attach a "beautiful" Image of my zombie-Lady, please don't judge her by her apperance. She can be quite nice, and she always longs to be very close.... ;)

     

    Attached Files:

  13. Alfonso_CJ

    Alfonso_CJ

    Joined:
    Nov 19, 2015
    Posts:
    35
    It's got the default Third person Puppet animations
     
  14. Alfonso_CJ

    Alfonso_CJ

    Joined:
    Nov 19, 2015
    Posts:
    35
    I'll just bring this back again because Unity's NavMeshAgent does not seem to work with the User Control AI, I tried editing that script so it would get NavMeshAgent component and Path but didn't work out so well. Help?
     
  15. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416

    Partel,

    Back in march, you provided a patch to prevent Prop colliders from being effected by PuppetMaster at all. You added a bool called disableColliders to BehaviorPuppet that's used in BehaviourPuppetStateSwitching.cs in the SetColliders method to prevent those Prop colliders from being disabled. However the Prop colliders are still being effected (enabled) if they are attached to the Ragdoll when SetColliders is called because line 176 is enabling all muscle colliders. c.enabled = true and the props are muscles while they are attached to the Ragdoll.

    To prevent PuppetMaster from messing with Prop colliders, I changed the code to the following in lines 176 and 177 in BehaviourPuppetStateSwitching.cs:
    Code (CSharp):
    1. if (!props.disableColliders && m.props.group != Muscle.Group.Prop)
    2.    c.enabled = true;
    Would you consider providing a patch with something like this code so I have the ability to prevent PuppetMaster from messing with prop colliders at all. Perhaps you might change that bool from disableColliders to something like TurnOnOffPropColliders. So if it is false Prop colliders will never be effected by PuppetMaster. You might also consider moving the the TurnOnOffPropColliders bool closer to the DropProps bool in the inspector since both of those concepts deal with Props.

    Thanks
    Allan
     
    Last edited: Jun 21, 2017
  16. wisniowy88

    wisniowy88

    Joined:
    Dec 27, 2015
    Posts:
    4
    Hi Partel!

    I have encountered a shaking problem on some hills:
    ezgif.com-optimize (1).gif

    What I have is Puppet Extended scene with terrain added and these settings that I need:

    Behaviour Puppet Normal Mode = Active.
    When Unmapped - it reduces shaking, but not fix completely,
    When Kinematic - works.

    Animation Update = Animate Physics.
    When in Normal upd mode - works.

    Character Contoller; Ground Sticky = 10,
    Max Vertical Velocity On Ground = 1

    When decrease sticky and increase max velo - shaking reduced, but not fixed.

    When turn off PuppetMasters Map Position(s) - it works, but leads to many new problems.

    Is there any fix that i can stay with my setting?


    Great work!
     
    chaneya likes this.
  17. AlexKassabian

    AlexKassabian

    Joined:
    Apr 24, 2017
    Posts:
    2
    Hi,

    I've noticed that in a networked game, the puppet is split from the character's hierachy when spawned. This is causing issues with things like Raycasting for damage etc, any ideas on how to get around this?

    Thanks!
     
  18. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi Partel!

    Playing with the stagger behaviour, i'm having a little issue. When the character dies, the arms seems to keep doing the windmill even if i disable all behaviours. Any clue? I've tried calling the finish function too, but it has no effect.

    Thanks a lot!
     
  19. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Hello Partel!

    Just a quick question. I remember a while back you mentioned you were working on procedural animations for balancing. Are you still working on this? And if so, do you have an estimate on when we might be able to get our hands on it? It would really be an outstanding feature!

    Thanks,
    Matt
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey, sorry for the delay!

    At which point does it happen, when the puppet is unbalanced? What happens if you enable/disable "Angular Limits" and "Internal Collisions" in PuppetMaster? I'm thinking perhaps either one is blocking the puppet from reaching the target animation.

    Hey,
    Could you share this script or even better that project, if possible, so I could test it out?

    Hey,
    Looks like a camera-puppet motion sync issue, the camera must be updating at a different frequency.
    Here, please try this patch.

    After that, go to the CameraController, set Update Mode to "Fixed Late Update", then to the third person controller and enable "Smooth Physics".

    Hey,
    Just replied to your email...

    Hey,
    Go to the "Windmill Weight", drag the last key a bit to the left, does that help?

    Hey,
    Yes, I have a precedural stagger behaviour, that also tries to keep the puppet balanced before switching to stagger), but it requires Final IK, its in the FIK integration package. This is how it looks like.

    Cheers,
    Pärtel
     
    wisniowy88 and tapawafo like this.
  21. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    I think you missed my message. I'm not sure if I should re-post.

    Can you check it out, just scroll up to right above wisniowy88's post with the gif. It's about BehaviourPuppetStateSwitching.cs still changing prop colliders.

    Thanks
    Allan
     
  22. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey, sorry, missed it indeed.

    Anyway, would just changing the code in SetColliders to this:
    Code (CSharp):
    1. // Sets colliders of a muscle to puppet or unpinned mode
    2.         private void SetColliders(Muscle m, bool unpinned) {
    3.             var props = GetProps(m.props.group);
    4.  
    5.             if (unpinned) {
    6.                 foreach (Collider c in m.colliders) {
    7.                     c.material = props.unpinnedMaterial != null? props.unpinnedMaterial: defaults.unpinnedMaterial;
    8.                        
    9.                     // Enable colliders
    10.                     if (props.disableColliders) c.enabled = true;
    11.                 }
    12.             } else {
    13.                 foreach (Collider c in m.colliders) {
    14.                     c.material = props.puppetMaterial != null? props.puppetMaterial: defaults.puppetMaterial;
    15.                        
    16.                     // Enable colliders
    17.                     if (props.disableColliders) c.enabled = false;
    18.                 }
    19.             }
    20.         }
    work for you?
    I can't think of anything that it would mess up right now.

    Best,
    Pärtel
     
  23. wisniowy88

    wisniowy88

    Joined:
    Dec 27, 2015
    Posts:
    4
    Thanks for response.
    Anfortunately it's not work. Now I can see true puppet-camera sync issues - constantly shaking along move direction:

    Maybe "on hills shaking" issue is not camera related, because it seems to shake in vertical directions only.
     

    Attached Files:

  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey,
    Please import this scene, (along with the patch I sent), does it look smooth to you?
     
  25. wisniowy88

    wisniowy88

    Joined:
    Dec 27, 2015
    Posts:
    4
    It looks like on the gif from my previous post.

    Edit: It's fixed partially. After patch, when I lock camera in position it works smooth (because of Smooth Physics in Character Controller now is on). When camera follows the target, then a camera sync problem comes up.
     
    Last edited: Jun 26, 2017
  26. Dwarf-Cavern

    Dwarf-Cavern

    Joined:
    Apr 7, 2013
    Posts:
    8
    Hello,
    First off, thanks for making such a great tool and for excellent support system, it really is fantastic work!

    I am having some trouble understanding how to use MuscleCollision struct. I'd like to extract collision info from one of the muscles in the setup, let's say hips, so muscles[0] in most cases. But I am having trouble getting the struct to work. Could you give a short practical example as to how I could access collision info from one of the muscles?

    Many thanks in advance and keep up the fantastic work you've been doing!
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey, sorry for the delay, I've been in Amsterdam for Unite Europe.
    Weird, it's smooth both ways in my project. Anyway, I have to be in Geneva for the next week for some IK R&D, but after that I'll have another try at all that camera stuff.

    Hey,

    Code (CSharp):
    1. public BehaviourPuppet puppet;
    2.  
    3.     void Start () {
    4.         puppet.OnCollisionImpulse += OnMuscleCollision;
    5.     }
    6.        
    7.     void OnMuscleCollision(MuscleCollision c, float impulse) {
    8.         if (c.muscleIndex != 0) return;
    9.  
    10.         Debug.Log(c.collision.relativeVelocity); // The Collision stored in MuscleCollision
    11.     }
    But you could always also just put your code in OnCollisionEnter/Stay and add it to the hip gameobject.

    Best,
    Pärtel
     
    Dwarf-Cavern likes this.
  28. Dwarf-Cavern

    Dwarf-Cavern

    Joined:
    Apr 7, 2013
    Posts:
    8
    Thank you for a super quick and concise reply :) Very much appreciated!
     
  29. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    2 Question:
    1. I've noticed that the props my character is holding do not appear to be effected at all by the Internal Collisions setting on Puppet Master. My props are on a different layer than the ragdoll muscles and they are setup Not to collide with each other so perhaps that's why. I've been experimenting with damage effects (ie. showing damaged limbs etc) and I've found that I need to turn Internal Collisions on and increase my Muscle Damper value on the Puppet Master when I lower the Pin Weight and Muscle Weight on specific muscles (Right Arm and Sword Prop). When Internal Collisions is selected (On) it works on the Ragdoll muscles but does not appear to have any effect on the sword Prop he is holding. So the sword prop will still go right through the ragdoll colliders. Is this due to my layer setup between props and ragdoll colliders? If it is, is there anything I can do about making Internal Collisions work between my props and the rest of the ragdoll muscles just while I'm adjusting Pin Weights and Muscle Weights.

    2. I've also noticed that when BehaviorPuppet is in Unmapped mode, adjusting Pin Weights and Muscle Weights on specific muscles on the Puppet Master has no effect. So before I adjust weights, I change the BehaviorPuppet mode to Active and then when I'm done messing with weights, I switch back over to Unmapped mode. Is the correct thing to do? I'm just wondering if it would be better for the system to detect a change in weights and automatically switch to active mode and then back to Unmapped if that was your original setting.

    Thanks
    Allan
     
  30. Vagrant-VX

    Vagrant-VX

    Joined:
    Sep 3, 2016
    Posts:
    8
    hello,
    1.i'm having a problem to create a stable ragdoll on Genesis 8 starter model
    it look like all the joint angle limits are for one side and some joint don't have them at all
    Image1 Image2

    2.how can i create my own behaviors?
     
  31. mburrows

    mburrows

    Joined:
    Jun 18, 2017
    Posts:
    5
    Hi. I kind of figured it out, that the heavy distortion was result partly of improper relocation of the Colliders and to loosely configured Joints. (My Zombie wanted to be a super flexy-Zombie)
    I just redid the ragdoll creation, took a more conservative approach, like simply Ragdoll creator, and done, and there was much less of a distortion.

    The time the distortion happens, is when the Puppet Begins to transist between Fall and GetUp, if i remember correctly. It is now barely visible, but my eye is attuned to it now, so i can still notice. I do not remember anymore, if it was the exact result with "internal collisions" and "Angular Limits".

    I will explore this issue later, when i have some time in my Project to adress those aesthetic issues. For now we can consider it Fixed.. Kind of.

    Thanx for the reply, anyway ;-)
     
  32. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    In addition to my 2 questions above, I have a feature request.

    I would really like it if there was a way to define Custom muscle groups. For instance when my character is hit on the left side, I fire off a left hit animation. When my character is hit on the right side, I fire off a right side hit animation.

    Right now the muscle groups are defined more as appendage groups as opposed to side or area of body.

    For example, being able to define a custom muscle group that includes LeftUpLeg, LeftLeg, LeftFoot, LeftArm, LeftForeArm instead of using a lengthy If then such as if (muscleIndex == 1 || muscleIndex == 2 || muscleIndex == 3 || muscleIndex == 8 || muscleIndex == 9) //If Left Side Hit

    would be very helpful for a cleaner codebase.

    Thanks
    Allan
     
  33. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    apart.png

    Hi, I meet similar issue, my character joints went to the wrong position when something fast hit my character. (that red cube was giving character an uppercut in this image)

    Enabling projection works good for me, but line #411 in Muscle.cs says "Other projection mode will cause sliding" and I comment out this line in order to make it work. Is that a good practice? Any better idea about how to avoid this?

    Appreciate your support!

    Cheers,
    Zhu Chun
     
  34. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hi all, sorry for the delay once again, I've been in Switzerland to test out VRIK for full body tracking in an arcade environment...

    1. I tried to reproduce this, went into the Prop scene, played it, scaled up the box collider on the "Prop M4", changed it's layer and toggled "Internal Collisions" off/on, everything seemed to work as expected. Maybe it's that the internal collisions have no effect on objects that are connected with joints, I mean for instance upper leg and lower leg will never collide even if internal collisions are on.

    2. Maybe you are just seeing no effect because the puppet is unmapped. You'll only see it on the puppet after the ragdoll collides with something and mapping is blended in.

    Hey,
    1. You are looking at in in ortographic mode so that's why you are probably not seeing the limits on ather axes.
    2. Take a look at BehaviourTemplate, you can use it to get started with custom behaviours.

    Hey, thanks for the feedback!
    I have no idea how to actually do this without changing the Muscle.Group enum directly in the script. Making a group for almost every muscle would also make it more tedious to create group overrides and stuff. Perhaps tagging the muscles would make it easier?

    Hey, that sliding thing I noticed when a ragdoll was standing on the ground and projection enabled, it began sliding slightly on its feet. If you are not noticing any problems with friction like that, feel free to use projection. If you override projection mode after PuppetMaster initiates, then you don't need to comment out that line.

    Cheers,
    Pärtel
     
    zhuchun likes this.
  35. killerjim

    killerjim

    Joined:
    Sep 14, 2016
    Posts:
    10
    I've trying to implement weapons impact on a NPC.

    PuppetMaster is working great at having them fall over things, get up, etc..

    But I want to have weapons jolt the NPC when the impact happens. I tried AddForce() to the RigidBody on impact but nothing happens, also tried reducing the "Mapping Weight", "Pin Weight", "Muscle Strength" and "Muscle Damper" on arms, etc. but it just has the effort of causing them to follow the animation more loosely.

    I also tried setting the puppet to unpinned on impact, but really it just hits the floor trying to following the animation.

    What's the best way to implement this?
     
  36. S-P-A-C-E-D

    S-P-A-C-E-D

    Joined:
    Jan 11, 2014
    Posts:
    45
    I've already emailed you about this, but I figured I'd ask on here, maybe it'll be useful for someone else as well...

    I have a unique situation where I need to switch the animators update mode from AnimatePhysics to Normal. Upon doing this the ragdoll flys into the air the majority of the time, or at least glitches out for a frame or two. I need a way to gracefully switch back and forth between the two seamlessly if possible.

    I am making a physics based game and when the player does a certain thing, the Puppet Master jitters. If I change the Animator Update mode to Normal, the jitter goes away completely. When not doing this particular thing, it's smooth if set to AnimatePhysics, and jittery when set to Normal. So I have to go between the two.

    I've already tried adapting your FixedLateUpdate script but that didn't help at all.



    My current solution is not perfect, I disable the puppetmaster using puppetMaster.DisableImmediately();

    Then in the next frame change the anim.updateMode = AnimatorUpdateMode.Normal;

    Then reactivate the ragdoll in the frame after.

    Sometimes, he glitches for a frame then goes back to being normal. Sometimes he flys into the air, but all of this is much more rare doing it this way.

    Is there a more graceful way to do this?
     
  37. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    killerjim,

    First make sure you have the Ground Layers and Collision Layers options set correctly in Behavior Puppet in the inspector. I use physics layers to separate my enemies from the player. So I have to make sure Behavior Puppet on my Player has the EnemyRagdoll layer as one of the Collision Layers and visa versa. This ensures that the player ragdoll will collide with the enemy ragdoll. I also have my player ragdoll collide with various environment objects like rocks etc. Make sure you have the physics layers of those objects selected in the Collision Layers drop down menu in Behavior Puppet.

    Then I use the Event that's built into BehaviorPuppet for ragdoll/"Muscle" collisions.

    As long as you have a reference to behaviorpuppet just use
    behaviorPuppet.OnCollisionImpulse += OnCollisionImpulse; in your Start method.

    Then you need to have a method to receive the collision events:
    Code (CSharp):
    1.  void OnCollisionImpulse(MuscleCollision m, float impulse)
    2.     {
    3.         if (m.collision.contacts.Length == 0) return;
    4.         int layer = m.collision.gameObject.layer;
    5.         Debug.Log(m.collision.gameObject.name + "  " + "Just Hit Me!");
    6.         }
    You can think of this method as similar to OnCollisionEnter except it is fired whenever anything collides with any one of the ragdoll colliders.

    Make sure you unsubscribe from the event when your puppet is disabled:
    Code (CSharp):
    1. void OnDisable()
    2.     {
    3.         UnsubscribeEvent();
    4.     }
    5.  
    6.     void OnDestroy()
    7.     {
    8.         UnsubscribeEvent();
    9.     }
    10.  
    11.     void UnsubscribeEvent()
    12.     {
    13.         behaviorPuppet.OnCollisionImpulse -= OnCollisionImpulse;       //Collsions from other puppet
    14.     }
    I agree ragdoll collisions could use it's own separate documentation and tutorial video. There is a ton of stuff you can do but it's all hidden away in the code, scattered across this forum, and sprinkled throughout the docs online. Hell I just recently learned that if you keep your Behavior Puppet in Unmapped mode for performance reasons, adjusting Pin Weight and Muscle Weight on individual muscles has no effect. You have to switch the Behavior Puppet to Active mode, make your adjustments and then switch back to Unmapped.

    Allan
     
    tapawafo likes this.
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey,
    In addition to the helpful comments by Chaneya,
    you are probably not seeing enough jolt just because you are not dealing enough of an impact to jolt the NPC. With PuppetMaster the puppets are normally using pinning forces to keep pinned to the animation, which unfortunately, but inevitably also dampers any incoming collisions. That is not what happens in real life, obviously there are no forces keeping us where we are other than the ones coming from our own muscles. That's why if a puppet intends to hit another puppet, you'll need to use additional force/damage. That is precisely why the Boosters have been implemented. In your character controller script, define a public Booster booster;, fill it in in the Editor, setting impulseMlp to a high value (loosens the other puppet mode) for the weapon muscle and immunity to 1 (infinite collision resistance) if necessary. Then, right before the weapon is supposed to hit in the animation, call booster.Boost(behaviourPuppet);
    The effect of the booster will be faded out by the "Boost Falloff" of BehaviourPuppet over time.

    Hey, could you tell me in a bit more detail, what is the situation and the state of the puppet at the time you need to switch update mode. Also, at what time percisely in the frame are you calling for that change? I mean from Update, LateUpdate or something else?

    Hey, thanks for helping out a fellow user..
    About the last paragraph, what kind of doc/tutorial exactly would you need? About 2 characters fighting each other?
    Adjusting pin weight and muscle weight on individual muscles does have an effect in Unmapped mode, you are just not seeing it, as the character is not mapped to the ragdoll. Select the PuppetMaster gameobject and see the behaviour of the ragdoll change in the Scene view as you adjust those weights in Unmapped mode.

    Cheers,
    Pärtel
     
  39. killerjim

    killerjim

    Joined:
    Sep 14, 2016
    Posts:
    10
    Thanks for the information..

    I should point out that shooting a weapon for me involves throwing a raycast into space, and seeing if it collides. Prior to PuppetMaster if a hit occurs I resolve the collision down to the correct enemy NPC script and call a method on that (which applies damage and does some impact animation or dead, etc.)

    With PuppetMaster, if I use the booster cab I apply the force using Rigidbody.AddForceAtPosition() on the Puppet's RB (the one that was returned as a result of the Raycast).

    In addition, should I get the booster to target only the RB's (and connected muscles)?

    James
     
  40. S-P-A-C-E-D

    S-P-A-C-E-D

    Joined:
    Jan 11, 2014
    Posts:
    45
    Seems I got it working if I wait a frame to change. I suppose, initially I was actually calling it on contact. New problem, when the animator is in Normal mode, there is a jitter but only on 144hz monitors, 60hz is butter smooth.
     
    Last edited: Jul 14, 2017
  41. Nihilus0

    Nihilus0

    Joined:
    Jan 25, 2017
    Posts:
    52
    Hi, I am using FIK and PM thanks.
    But,
    When I set the mass to 750, I have a problem that the Stagger does not stagger.

    When the mass is 1, the 'Stagger' shows a natural staggering motion, set at 750, so it just falls neatly. I checked to receive the event, but there was no stag.

    So I thought of the 'Behavior Biped Stagger' as a problem with the Param number, so I tried to change the numbers in various ways, but it was not meaningful. All fall neatly without staggering.

    Http://root-motion.com/puppetmasterdox/html/pages.html
    This link also did not have a 'Behavior Biped Stagger' description and a FAQ.
    So I ask for help here.

    Ref. In the 'Stagger (Final IK)' scene, the character's mass set to 750,
    1. The masses of 'ragdoll' are all set to 750.
    2. Set 'Muscle Spring' to '650' and 'Muscle Damper' to '250' for 'PuppetMaster'.
    3. We set 'Collision Resistance' of 'Behavior Puppet' to 500.
    4. The mass of the ball is set at 50 ~ 80.

    Ps. I am not fluent in English.
     
  42. wisniowy88

    wisniowy88

    Joined:
    Dec 27, 2015
    Posts:
    4
    Hi Partel.

    Could you try again with the camera problem from the last patch (Fixed Late Update)? I tried on another PC with fresh Unity and PM and cam sync flickering still exist:(

    EDIT: I noticed the problem can be seen only when there is a +50 fps. When it is below, it is wonderful. It's related with Fixed Timestep - when change it from default 0.02 to 0.01, it is smooth with fps <100.

    Thanks
    Karol
     
    Last edited: Jul 18, 2017
  43. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    So I have about a 3 page document I have been updating as I discover things about combat and collisions. Let me clean it up a little and I'll post it or if you prefer, I can PM you because I may be wrong on some stuff and I wouldn't want to mislead other users. Just let me know.

    Well that's strange. When my puppet is in unmapped mode, the ragdoll colliders do indeed adjust when I change the Pin Weight and Muscle Weight but the mesh continues to follow the animated pose so I wasn't seeing the difference. What I can't figure out is why your Melee Pilot Puppet in the Melee Demo acts differently in UnMapped mode than my puppet. When I adjust Pin Weight and Muscle Weight on your pilot puppet, both the colliders and mesh adjust while in unmapped mode. Do you have an idea of what the difference may be?

    Let me know if you want me to pass that Combat/Collisions doc to you. You may find it humorous reading. :)

    Allan
     
    Last edited: Jul 16, 2017
  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey,
    You should use the booster on melee cases only, use it on muscles that become in contact with the enemy, like the weapon and perhaps the hand and arm if necessary. You can also use AddForceAtPosition to deal additional blow when there is a contact between the weapon and the enemy. Use Rigidbody.GetPointVelocity with collision point to find the force vector on the weapon.

    Hey,
    Havent tested it on monitors with different frequencies, must be the camera updating being out of sync with the updating of the object it is tracking. Can you tell me some more, do you have interpolation on the rigidbodies? Are you using Update or FixedUpdate to move the character? Do you have smooth following enabled on the camera? What do you see when you set time scale to 0.1 or smaller?

    Hey,
    You'll need way more muscle spring for that kind of mass.
    I got it to stagger with muscle spring at 50 000, damper at 5 000. Also set "Damper For Spring" to 0 in the BehaviourBiperStagger's "Balancer Settings".


    Hey, I'm still working on making a proper solution for the camera syncing. Will take some time though, there are so many variables to consider and it's very difficult to debug, hold on..

    Hey,
    Perhaps it's the "Min Mapping Weight" of some muscle groups set to 1 in BehaviourPuppet's "Group Overrides", which would cause those muscles to be mapped even if in unmapped mode?

    I'd be very happy to take a look at your combat collisions doc, would be a great outline for simplifying stuff and improving the docs and tutorials!

    Cheers,
    Pärtel
     
  45. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Thanks. It was the "Min Mapping Weight" that was set to 0 in the group overrides on my character. I set it to 1 and now both the Ragdoll Colliders as well as the mesh renderers are effected when I change Pin Weight and Muscle Weight while in Unmapped mode.

    Thanks again.
    Allan
     
    hopeful likes this.
  46. michaelwolf95

    michaelwolf95

    Joined:
    Oct 16, 2015
    Posts:
    4
    Hi Partel,

    In the Stagger system from Beta v0.6, are the stagger behaviors supposed to save the puppet from falling over, or is it only for the procedural animations?
    Reading the code, it appears that they are supposed to try to keep the puppet balanced, but in the demo scene, the puppets never exit the stagger behavior state without falling over. Is recovering from staggering a planned feature that's not fully implemented yet? Or could this be an issue with the configuration in the demo scene?

    Thank you,
    Michael
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    Hey,
    The staggering was designed for just taking a couple of steps before just falling down, after having hopelessly lost balance, so the puppet would not appear to just give up and hit the ground. Recovering from it would be insanely difficult to achieve, but I'll look into it in the future.

    Best,
    Pärtel
     
  48. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    After setting up puppet master, my character doesn't have "Revert" button anymore and that is a big problem for me. because I need to use this every time I change my character model in 3d softwares. When there is no "Revert" button I have to set up all setting again.

    I attached a pic of section I'm talking about.
     

    Attached Files:

    Last edited: Jul 31, 2017
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,550
    When setting up the ragdoll and PuppetMaster, make a duplicate of the character, make the duplicate a ragdoll and add PuppetMaster to the duplicate and assign the original as the "Target Root" before clicking "Set Up PuppetMaster".

    Cheers,
    Pärtel
     
  50. Vixelv

    Vixelv

    Joined:
    Aug 9, 2013
    Posts:
    2
    Hey, right now I'm making a vr game, with melee combat. For this purpose, I'm using finalik & puppetmaster. After pickup, weapons are driven via puppet master prop, attached to a hand, a hand is handled with VRIK. I want to create a two-handed weapon, that would look like you are holding it with two hands, and apply physics (hit another ragdoll) without flickering. Could you please clarify how I can reach such a behaviour. I’m thinking about changing proproot rotation, making it looking on another hand, may that work ?



    There is TwoHandedProp in Puppetmaster asset, I have not succeeded in using it, yet. Is it making the thing I need?

    ---
    Update:
    Looks like rotating the hand target, child of vr controller is the way it could be done.
    Update #2:
    It works, but additional pin cause weapon trembling, how it could be fixed =) ?
     
    Last edited: Aug 12, 2017