Search Unity

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,554
    It's okay if the force is in thousands, but you can use other ForceModes like VelocityChange, that's instant and ignores mass.

    Hey,
    That bug happens with only the puppets that are created in Unity 2021.2 or later. The ones that were created with an earlier version seem to work fine. Looks like a Unity bug that resets joint connectedAnchors to zero when you disable joint.autoConfigureConnectedAnchor at Start. Anyway, I found a fix to it.
    Please open Muscle.cs and add UpdateAnchor(true): to line 532 like this>

    UpdateAnchor.PNG

    Will update the package in the store asap.

    Hey,
    Can you send me the full log from the console for that inertia tensor error please? I need the script name and line number.
    Is the prop rotated wrong or is the hand in the wrong place?

    Hey,
    Should call puppetMaster.Teleport() to teleport a puppet. Also, there's the "Puppet Respawning" demo and Respawning.cs for reference.

    Best,
    Pärtel
     
  2. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Hi Partel!

    Thanks for the reply!

    upload_2022-2-10_11-3-3.png

    This is the error. And the PropMuscle should be in the right position, it worked normally before the update.

    Many thanks!
    Gabriel,.
     
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    OK, I think that prop doesn't have a rigidbody on it before you pick it up?
    Please go to PropMuscle.cs and change line 186 to:
    if (currentProp.inertiaTensor != Vector3.zero) muscle.rigidbody.inertiaTensor = currentProp.inertiaTensor;

    Hoping it will fix the rotation too.

    Best,
    Pärtel
     
  4. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Hi Partel,

    It did not work, the opponents hands still doesn't follow the weapon.

    I tried a few things with no success. Such as changing the type of the animators, or ticking and unticking the Joint and Muscle Settings from PuppetMaster, such as Angular Pinning, Update Joints Anchors and etc.
    upload_2022-2-10_17-35-16.png

    2 things I had to remove things from the PuppetMastlePropMelee script because it was causing errors was this:
    upload_2022-2-10_17-36-51.png



    Besides that, this is how the PuppetMasterPropMelee looks:
    upload_2022-2-10_17-44-43.png


    Should I add a RigidBody?

    Many thanks,
    Gabriel.
     
  5. shma_unity

    shma_unity

    Joined:
    Jun 13, 2018
    Posts:
    118
    Hello Partel,

    I've been doing a PuppetMaster driven "shove" through collision on a character, and it has been going pretty well.
    Everything is working, but I have a problem bringing it all together:

    My character primary movement is driven by a character-controller/Pathfinding-agent.
    This controller is attached to the Parent of both the PuppetMaster and Final-IK rigs. Any animation with root-motion is applied to that parent object.

    However, the puppet motion is not applied to that same parent object (when the character loses balance and the hip is being translated from its original position). This causes some issues with the character controller unfortunately.

    Is it possible to apply the motion done in Puppet Master as root motion to a parent object? What would be the best way to do so, or do I have to change my design and move the character controller to the character rig itself?

    Thank you in advance,
    schema
     
  6. the_unity_saga

    the_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    268
    hello developer! thanks you again for this amazing asset, it brings a lot to the table.

    hey, how best do we extend your "Biped Ragdoll Creator" script to make custom modifications or additions? im trying to make multiple versions of it, to build my own ragdoll chains for many different types of character

    is it possible to also extend the "Full Body Biped IK" scripts from FinalIK asset if we own both?

    thank you for any assistance you can provide.
     
  7. codedotart

    codedotart

    Joined:
    Sep 19, 2015
    Posts:
    13
    Thank you, that helped.
    Now I am trying to use puppetmaster for multiplayer using Mirror. Can you help me to make sure that ragdoll can be synced over the network? Also Sometimes the ragdoll just falls off the surface for some reason when the character spawns or respawns.
     
  8. daedal

    daedal

    Joined:
    Dec 19, 2013
    Posts:
    31
    Hey Partel,

    My Physics.autoSimulation is set to false when using Photon Fusion for networking. I added calls to OnPreSimulate and OnPostSimulate like so to get PuppetMaster working:

    public void BeforePhysicsStep() { puppetMaster.OnPreSimulate(Runner.DeltaTime); }
    public void AfterPhysicsStep() { puppetMaster.OnPostSimulate(); }

    The only problem is that my character animations are now sped up. They are running at least 50% faster than they should be. Any ideas on how to solve that? I could feed in a reduced delta time, but that would affect more than just the animations.

    Thanks!
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Looking at the PM change log, can't think of anything in there that would cause this. I wonder why you had to comment out those lines in PuppetMasterPropMelee to prevent errors, had you maybe previously made changes to PM source and those changes got flushed when you updated to new version?

    Hey,
    PuppetMaster's parent must not be moved, don't add and root motion or navagent to that. The reason is that the ragdoll must be moved by forces calculated by PM alone. If it's parented to a moving object, it will inherit unwanted kinematic motion. All the navagent stuff must be on the gameobject with the Animator, that is a sibling, not parent of PM.
    If that's too many things to change at this point, can also just call puppetMaster.transform.parent = null; in Start().

    Hey,
    I've spent a lot of time thinking how to make generic versions of those tools in a way that would be easy to use for everybody. If I had a solution to that, it would already be in the package. Limiting some things to bipeds takes care of so many unknowns and issues.

    You can actually use FullBodyBipedIK on many types of characters, like quadrupeds or birds. And if your rig has like 6 arms you can use additional LimbIK/ArmIK components on the extra limbs. Just make sure to solve them after FBBIK using the IKExecutionOrder component.

    Hey,
    There's a Mirror networking example package in PM, under Plugins/RootMotion/PuppetMaster/_Integration folder, that should get you started.
    About falling through, can you send me the code you use to respawn?

    Hey,
    PuppetMaster updates the Animator in OnPreSimulate() by the deltaTime provided. So make sure you don't have anything else updating the Animator and that the Animator component is disabled. Maybe Fusion also updates the Animator from somewhere? Not sure about that, haven't tried it yet.

    Best,
    Pärtel
     
    the_unity_saga likes this.
  10. the_unity_saga

    the_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    268
    thank you for the response, I'll start making sure to get familiar with IKExecutionOrder component.
     
  11. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    I got my old backup with PuppetMaster 0.9 and the issue started after I updated Unity to version 2021.2.7f1, even with PM 0.9 the issue happened. And updateing to 1.1 doesn't fix it.

    Any suggestions?





    Many thanks,
    Gabriel.
     
    Last edited: Feb 18, 2022
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey, no idea, sorry, can't reproduce it with any of the props I have here. Would it be possible for you to send me some kind of a repro?

    Best,
    Pärtel
     
  13. daedal

    daedal

    Joined:
    Dec 19, 2013
    Posts:
    31
    The Animator component is disabled. And nothing else is updating the Animator given that the animation doesn't play when disabling PuppetMaster. Also, if I disable PuppetMaster before entering play mode, the animation plays normally.

    Strangely enough, the animation speed seems to be variable. The animation is running significantly faster than it was a couple days ago. And it looks like nothing relevant changed to cause that.
     
  14. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    If you go to PuppetMaster.cs line 835 and change targetAnimator.Update(deltaTime) to targetAnimator.Update(Time.deltaTime), will it work then?
     
  15. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117

    Sometimes some issues happen with PuppetMaster, and I remember that I luckily just opened an Opponent Prefab, and clicked on the GamObject with the PM, and then saved the prefab, and then the PM issue would be solved. And the same thing happened here and it was solved. Why? I have no idea, but I'm glad it's working now... Haha
     
  16. daedal

    daedal

    Joined:
    Dec 19, 2013
    Posts:
    31
    Trying that made me realize the issue was on my end. It was just Fusion firing too many events due to the editor domain not getting reloaded. And it was manifesting most obviously through the animation speed.

    There's one more issue related to some modifications I made to your code. I previously added some logic to PuppetMasterModes.SwitchModes to force a dead ragdoll with an active mode to a dead/kinematic state. I did this to reduce the performance costs of motionless dead ragdolls. And unlike the frozen state, it allows for the reactivation of the ragdoll through collision detection (forces have to be applied after a frame delay following reactivation).

    This is no longer working properly after connecting to a network because the ragdoll will pin as soon as the kinematic state is set.

    Any ideas what the issue could be here? Or any suggestions on a better way to achieve this optimization?

    Thanks!
     
  17. cowj

    cowj

    Joined:
    Mar 10, 2019
    Posts:
    17
    When I use the plugin animancer to play the animation and set the animantor updateMode to animanPhysics, turning on the PuppetMaster will cause the character to change to the initial A Pose, is this a known issue and is there any way to fix it?
     
  18. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    While trying to make my PuppetMaster zombies grabbable, I ran into this strange issue and even after hours of debugging, I still can't find the solution. I'm using Grab.cs from the demos, without the offset, since I'm creating the configurable joint directly on the hand. But for some reason, the puppet will never actually get near the position of the joint. Here's a video showing the issue I'm facing. Any help would be tremendously appreciated.

    Also, I had to slow down the animation, otherwise when connecting the puppet's spine to the new configurable joint, there would be some really bad mesh stretching for a second. I thought running the code under a coroutine that waits on a FixedUpdate would fix the issue, but to no avail. Any idea what could be causing this?



    As can be seen in the video, I have a smaller, grabbable puppetmaster zombie. I also have a bigger puppetmaster zombie that does the grabbing when he gets near a smaller zombie. I then run the animation, create a joint on the bigger zombie's right hand, connect the smaller zombie's spine rigidbody to the new joint's connected body, and unpin the puppet. But for some odd reason, the small zombie just won't get close enough to the target (the bigger zombie's right hand.) Here's the code:

    Code (CSharp):
    1.     private IEnumerator GrabTargetRoutine()
    2.     {
    3.         yield return new WaitForFixedUpdate();
    4.         if (_currentTarget.TryGetComponent<Zombie>(out Zombie zombie))
    5.         {
    6.             Debug.Log("Found zombie. Attempting to grab.");
    7.             _heldZombie = zombie;
    8.             BehaviourPuppet otherPuppet = zombie.PuppetMaster.behaviours[0] as BehaviourPuppet;
    9.             otherPuppet.SetState(BehaviourPuppet.State.Unpinned);
    10.             otherPuppet.canGetUp = false;
    11.  
    12.             foreach (Muscle m in zombie.PuppetMaster.muscles)
    13.             {
    14.                 m.rigidbody.gameObject.layer = LayerMask.NameToLayer("Enemy Object Interactor");
    15.             }
    16.             _joint = _rightHand.gameObject.AddComponent<ConfigurableJoint>();
    17.             _joint.connectedBody = zombie.GrabbedRigidbody;
    18.  
    19.             // Lock linear and angular motion of the joint
    20.             _joint.xMotion = ConfigurableJointMotion.Locked;
    21.             _joint.yMotion = ConfigurableJointMotion.Locked;
    22.             _joint.zMotion = ConfigurableJointMotion.Locked;
    23.             _joint.angularXMotion = ConfigurableJointMotion.Locked;
    24.             _joint.angularYMotion = ConfigurableJointMotion.Locked;
    25.             _joint.angularZMotion = ConfigurableJointMotion.Locked;
    26.             _rightHand.mass *= 5;
    27.             _thisZombie.PuppetMaster.solverIterationCount *= 10;
    28.  
    29.         }
    30.     }
     
    Last edited: Feb 22, 2022
  19. Daezalus

    Daezalus

    Joined:
    May 16, 2020
    Posts:
    9
    Hi Partel,

    Firstly, thanks for a great asset and your continued support for it.

    I'm having some difficulties with using Puppetmater and the physics matrix, along with Realistic Car Controller, and wondered if you'd be so kind to offer your insight. I'm trying to knock over NPC characters that have a Puppetmaster ragdoll, but for some reason it seems that the 'BodyPart' layer is affecting the RCC suspension, and I cannot get it to work correctly like it was previously. Very occasionaly it will work as it should, but most of the time it unfortunately doesn't. I was wondering if you may have experienced anything like this, or know of any reason that it might be incompatible.

    It seems that the vehicle's suspension is being affected solely by the Ragdoll physics layer. The entire vehicle is set to 'RCC' and does not have any objects attached that include the Ragdoll layer. I cannot figure out how it would be affected, and it only seems to work correctly when the physics do not interact with each other. Obviously, this means I cannot activate the puppet when it gets hit by the RCC car. I have turned off all the other physics layers with RCC that could potentially affect it, but I still cannot figure out what the issue is. It only seems to be affected when using the Puppet layer.

    I have included some links to videos to demonstrate the issue -

    Puppet working correctly with custom car -


    Puppet not working with custom car -


    Puppet not working with default RCC car-


    Also, could I please ask what your position is on developers of others assets using Puppetmaster to study for integration purposes? I have asked Bonecracker (creator of RCC) for help as well, and he is asking if I can send him Puppetmaster so he can understand the problem better. I would obviously not send your asset to someone without your permission.

    Any help or suggestions would be greatly appreciated. Thank you for your time to read this.

    Kind regards,

    Ben
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Not sure.
    Only idea, to use the Frozen state, but add a trigger collider around the puppet that switches it between Dead and Frozen when something enters/exits.

    Hey,
    Animancer + PuppetMaster only work in Normal mode. It's an issue with PM needing to update Animator from FixedUpdate in AnimatePhysics mode, but Animancer not being OK with that.

    Hey,
    Try setting _joint.autoConfigureConnectedAnchor = false;
    then joint.connectedAnchor = Vector3.zero;

    Hey,
    I haven't tried RCC, but I think must be doing some raycasting for the wheel colliders like most other car controllers do. Maybe that raycasting LayerMask needs to be changed instead of the layer collision matrix.
    Also add the car's layer to BehaviourPuppet's "Collision Layers" so it would be able to unpin the puppet when you walk into it and not cause the pinning forces to blow the car off to space.
    When you enter the car, probably should set PM mode to Disabled so it wouldn't affect the way the car handles.

    No problem with you sending PM to Bonecracker.

    Best,
    Pärtel
     
  21. cowj

    cowj

    Joined:
    Mar 10, 2019
    Posts:
    17
    ok thank you ,i notice that and i modify the source code to update animancer compoentment like update animantor in fixedupdate,and it works. Only a few code need change
     
  22. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Thanks for getting back to me, Pärtel :) Your suggestion fixed the positioning of the connected body, but I'm still encountering terrible mesh stretching the moment the grabbed body is connected to the joint. I've tried slowing down my grab animation, but that had little effect and looks like a slow-motion grab which isn't my intention. Have any idea what could be causing this mesh stretching? It seems as though the puppetmaster can't respond quickly enough to being anchored to another body, or to the speed of the grab animation.

    Here's a video of what's going on:
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    It's a general PhysX joint stability issue. Anything from here might help. Also try switching solver type to Temporal Gauss Seidel in Physics Settings, that is a new much more stable joint solver.

    Can also try joint.connectedAnchor = Vector3.MoveTowards(joint.connectedAnchor, Vector3.zero, Time.deltaTime); instead of snapping it to zero immediatelly to reduce the amount of force applied to the ragdoll by that joint.
    Or set X/Y/ZMotion to Limited, and gradually reduce the limits to zero.

    Best,
    Pärtel
     
  24. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Thanks for the tips, Pärtel! Tried gradually moving the anchor to zero, but unfortunately that didn't seem to improve the issue much and slowed down the responsiveness of my animation. Fortunately, switching the solver type helped quite a bit, then waiting on fixed update at critical moments nearly completely fixed the stretching :) Going to revisit your other tips for other use cases in the future. Thanks again!
     
    Partel-Lang likes this.
  25. the_unity_saga

    the_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    268
    hey Dev, thanks again for your hard work!

    um, I was looking through your tutorials and found this video:



    can we get a copy of this demo for use in puppetmaster so we can compare results to better optimize our scenes and also examine your set up? i assume its just using a chase nav component with player capsul collider object as waypoint, and then play animation when in range of player object????

    it looks like its running smooth, and has quite a bit going on..

    im noticing i get slow down issues some times but not sure whats the cause, maybe my physics settings??

    should I be disabling the puppet master puppet components when not in use and simply activate them with a trigger later?

    also, I found that you have a old integration with KCC:

    https://assetstore.unity.com/packages/tools/physics/kinematic-character-controller-99131

    if i want to maximize performance with use of your Puppetmaster asset, would using KCC make a difference at all?

    anyway thanks again for the hard work!
     
  26. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    305
    Tried to use Temporal Gauss Seidel but this makes the ragdoll to explode more easily.
    Hope somebody can help me with this.

    Partel, any advice?
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I forgot I had that video still up there, it's 9 years old, PuppetMaster has been completely rewritten from scratch since then, so I don't have that demo scene anymore, sorry.
    If you're having performance issues, please check out this page about that.

    KCC integration currently in package is outdated, an updated version can be found here. I don't think KCC makes any performance difference though.

    Cheers,
    Pärtel
     
  28. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi Partel,

    I am encountering issue where when I unpinned the puppet due to a collision, the puppet gain unnatural amount of speed. I know there is a Max Rigidbody Velocity in the BehaviourPuppet, but reducing that doesn't seem to help. Do you have any tips on how I can reduce the occurrence of this issue?

    Thanks.
     
  29. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Does it happen only vertically when you get unpinned just as you start to jump? Or does it happen in other cases too?
    Increasing "Pin Distance Falloff" in PuppetMaster component should help.

    Best,
    Pärtel
     
  30. onuryuzak

    onuryuzak

    Joined:
    Apr 15, 2020
    Posts:
    1
    Hey Partel,

    First of all this tools amazing. Thank you for this.

    Now, I have questions about puppet master.

    I want to make self balanced puppet master but I dont have any idea how can I do this. And there is no tutorial like what I want. Can you help me about it?

    How can I make drunk movement player? After that How can I get it to be affected by gravity? It's in the air. I want it to land on the floor when the game starts.

    Thank you.
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey, just replied to you here.

    Cheers,
    Pärtel
     
    onuryuzak likes this.
  32. the_unity_saga

    the_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    268
    hello dev, thank you for your hard work.

    I was wondering if you can share how you got the animation cowboy target rig to import into unity without any skeletal mesh data attached? I can't figure out the settings to use to make my own animation target rigs and follow along your disconnect muscle example demo.
     
  33. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I used 3ds Max for it, but it was a decade ago, haven't done any 3D since then so don't remember exactly.
    I believe I had the cowboy setup like a normal character rig (bip) with animation, but without any skinned mesh applied, then just exported it. If your 3D app doesn't support exporting bone animation without a skinned mesh, could make a quick lazy skinning of your model to the rig and just deactivate the SkinnedMeshRenderer gameobject in Unity.

    Best,
    Pärtel
     
    the_unity_saga likes this.
  34. paul_hayes

    paul_hayes

    Joined:
    Jul 3, 2012
    Posts:
    9
    Hi Partel, thanks for all the great libraries.

    I'm struggling with dynamically scaling a puppet. Is it possible? I need to scale the puppet when I instantiate it from a prefab. Is there a technique to achieve this you could recommend?

    yours
    Paul
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Yes, there's a demo about that "Scaling" and PuppetScaling.cs.

    Best,
    Pärtel
     
  36. paul_hayes

    paul_hayes

    Joined:
    Jul 3, 2012
    Posts:
    9
    Thanks Partel, I can't believe I missed there was a scaling demo already there.
     
  37. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    Hi Partel,

    Still having the issue of the PuppetMasterPropMelee not being correctly attached to the puppet's propmuscle.

    I made a video showing the issue

    (PLEASE LOWER YOUR VOLUME BEFORE LISTENING!)
    There is something wrong with my mic haha

     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    The problem is just that the pinning forces that are trying to keep the prop pinned to its animation are conflicting with the collision depenetration forces that are trying to keep the prop out of that big box collider. When the prop is forced too deep into the box by pinning, those forces will grow huge and that causes the joints to freak out. So it's mostly a general PhysX joint stability issue. PuppetMaster normally overcomes that issue using BehaviourPuppet. It temporarily reduces pin weights for muscles that collide with stuff to allow them to be pushed away from their animated targets.

    Make sure the layer of that box is included in BehaviourPuppet's "Collision Layers".
    If it already is, will have to reduce Collision Resistance for the "Prop" group. Can do so in BehaviourPuppet, under "Muscle Group Properties" header there are "Group Overrides". Find/Create override for the Prop group and reduce it's collision resistance.

    Also, switching "Solver Type" to "Temporal Gauss-Seidel" in Physics Settings probably helps. That's a new more stable joint solver in Unity.

    Best,
    Pärtel
     
  39. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    117
    I fixed this by adding a RigidBody to the Prop Muscle Melee. Thanks again Partel!
     
    Partel-Lang likes this.
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi guys,

    Letting you know I'll be away on a little vacation, will return 1st of June. Please leave your questions here, will reply when I'm back. Thanks!

    Pärtel
     
  41. nicew

    nicew

    Joined:
    Sep 6, 2014
    Posts:
    5
    Hi I am making a VR game. My puppet has some weird jitter in left arm when it comes back from unpinned state(noticable in high fps I recorded a video but it is not noticable in video). I noticed that it only happens when angular limits are on. It is very essential for my project and I am at my wits end. I increased solver iteration count, enable fix update transforms etc. Only thing that works is reducing mapping weight or disabling the colliders. I hope this issue is solvable. Thanks!.
     
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    If Angular Limits cause jitter then that's because the limits are too stiff to allow for the physical arm to follow its animation. Please try loosening joint limits on the arm joints.

    Best,
    Pärtel
     
    nicew likes this.
  43. nicew

    nicew

    Joined:
    Sep 6, 2014
    Posts:
    5
    Thanks I solved this by reducing mapping weight to zero when the puppet is unpinned. I will try your suggestion later.
     
  44. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    I've setup the puppetmaster character, all working good. At quite late stage I realized I have to add one more skinned mesh cloth to the character, but I'm stuck. I reimported the original FBX with the new cloth, but ofc the new cloth doesn't show up as the puppetmaster character is a copy.

    I first dragged the updated fbx to the scene, copied the cloth only and parented it to the puppetmaster character, exactly as it is with the BFX. Then I updated the root bone node, nut unfortunately my new cloth just hangs in the idle location when hitting play.

    Any ideas how to link the cloth to the puppetmaster controlled character (copy of the original FBX)? I wouldn't like to rebuild everything from the scratch again.
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Probably the fbx link got broken with setting up PuppetMaster so when you update the fbx, it's all kinds of messed up.
    Here's how to setup PM without breaking the prefab/ fbx link.

    1. Drag 2 instances of the model into the scene
    2. Add BipedRagdollCreator to one of them, use it to create the ragdoll.
    3. Add PuppetMaster to the same model
    4. Assign the other model as "Animated Target" in PuppetMaster.
    5. Assign layers and click on "Set Up PuppetMaster"

    That way PM doesn't have to destroy the prefab and your fbx link remains intact. You should see the character in PuppetMaster's root hierarchy in blue.
    prefab.png
    You can then save the whole thing as a new prefab and the fbx prefab will be nested inside it.

    Best,
    Pärtel
     
  46. InfinityGameDev

    InfinityGameDev

    Joined:
    Jun 28, 2016
    Posts:
    54
    Hi Partel, I've been having an odd issue. I'm using PuppetMaster and AimIk. I've noticed that the puppet keeps falling over. So I ran some tests and when I'm viewing in scene view with the game running it works perfectly. But if I close scene view, the puppet falls over the moment it's out of camera view. Does this have something to do with occlusion culling? I have no idea why it would but I'm thinking something changes when the object isn't being drawn.

    Thanks,
    James

    Edit: Nvm I forgot to turn off cull update transforms
     
    Last edited: Jun 9, 2022
    Partel-Lang likes this.
  47. Deleted User

    Deleted User

    Guest

    Hey, how can a skip the resurrection part and straight respawn my pooled character after death pinned and as it was when he never died in 1 or 2 frames?
     
  48. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Please see the "Puppet Respawning" demo and Respawning.cs about that.

    Best,
    Pärtel
     
  49. OmnifariousStudios

    OmnifariousStudios

    Joined:
    Mar 12, 2018
    Posts:
    48
    Have a bit of a weird situation I'm trying to figure out and wanted to see if anyone know if it's possible.

    Currently, I set the Puppet into kinematic mode, but make it to where the kinematic rigidbodies are not following the animated character. Instead, they follow a different "target", which is a timeline of transform data I feed into them.

    So far, this works for the kinematic ragdoll. The problem is, I can't seem to get the animated target to follow/map to the kinematic ragdoll. It just goes into an animated state and stays there. Any ideas or places to look?
     
  50. Deleted User

    Deleted User

    Guest


    Thanks a lot, with my setup it's a bit different because I don't use animator state machines and because of this I've needed to write my own Animation Unpin and get up logic ... But I'm sure I will get it working.

    I have another question:
    I have my character set up with 1 Puppet Master and right now I'm doing Item Holders, so I have modelled a nice Item Holder which is a separate mesh with bones as a submesh on the character.
    Is it possible to create a 2nd Puppet Master just for this Holder?, so it's having its own physics and works independently.

    And if this is possible, how should I Group this Holder Muscles? As Hips or Tail?

    EDIT: The Holders don't follow Animations so it's probably better to just manually set up joints to keep this holder under control and making a custom damping script^^
     
    Last edited by a moderator: Jun 22, 2022