Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

PuppetMaster - Advanced Character Physics Tool [RELEASED]

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

  1. Dmeowmixer

    Dmeowmixer

    Joined:
    Jan 25, 2015
    Posts:
    12
    Oh man Partel, thank you so much. We thought we were fully updated and were so confused. Thank you thank you thank you. Everything looks good
     
    Partel-Lang likes this.
  2. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    I am finding it near impossible to align a prop when attached to the prop system (specifically a weapon). Can you provide some advice please.
     
  3. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    Never-mind, figured it out eventually, the prop example helped. Was adjusting the incorrect prop muscle, so for others having the same problem, you need to adjust the prop muscle without the puppetmaster components.
     
    Partel-Lang likes this.
  4. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    42
    Hello Pärtel, what could be causing puppets failing to adapt to the ground disappearing underneath them, and getting up from lost balance in mid air? It's a problem I have reproduced many times when making either controllers or AI using PuppetMaster but have never paid enough attention to know what I am doing that is causing it. These are puppets with otherwise no logic on them, with "Puppet" and "Fall" behaviours ported from example puppets and corresponding animation controllers. They will stay in mid air upon a ground collider being removed but if forced into unpin will fall properly then get up on the lower actual ground.

    EDIT
    I've confused myself now and can't remember if this is stated functionality to begin with. I mean the fall behaviour says it does that but I cant find the raycast logic after a moderate search. I've ended up just making my own that causes an unpin when a raycast sees the puppet is too far from the ground. How does one go about calling a different behaviour? Does BehaviourPuppet.State.Falling exist or some form of equivalent? Will remove this question if I find it in the documentation
     
    Last edited: Sep 11, 2023
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,519
    Hey,
    Yes, BehaviourPuppet doesn't have the authority to make your character ragdoll if ground disappears from under it. You'll have to make a raycast and if ground is too far to land on your feet, call behaviourPuppet.SetState(BehaviourPuppet.State.Unpinned); to ragdoll it. If you don't want it to get up before you allow it to get up, set behaviourPuppet.canGetUp to false.

    Best,
    Pärtel
     
  6. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    42
    Thanks. What of "BehaviourFall", is that still current? Also, is there a means of specifying different animation trees for different fall instances, so I can call "unpinned" but have it animated with different fall anims?
    Also using "smooth follow" on "camera controller" is causing skipping every couple of seconds and changing the update mode does nothing (update, fixed, late, fixed late), neither does setting rigidbody to interpolate/extrapolate or changing collision detection. It's following a puppet tied to a character controller, would you have any idea how to remove this "skipping"?

     
    Last edited: Sep 18, 2023
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,519
    Hey,
    Yes, BehaviourFall is still current, but all it really does is blend between different falling animations based on puppet's height from the ground, so it would, you know, appear to brace for impact before it happens. If BehaviourFall is present, then BehaviourPuppet switches to BehaviourFall when it gets ragdoll and BehaviourFall switches back to BehaviourPuppet when it starts getting up. So there is just 1 behaviour running at the same time at any time.

    About the camera thing, did you try using LateUpdate and adding your camera script to a higher value in the Script Execution Order than PuppetMaster has?

    Best,
    Pärtel
     
  8. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    42
    Thank you for your continued support.
    I switched the SOE and have RootMotion.CameraController running before PuppetMaster yet it persists. I then moved it above all other Rootmotion assets such as AimIK and IKExecutionOrder but no luck. Its a controller using Puppetmaster with Aim IK, Recoil, Ragdoll Aiming etc. I will have to keep looking, thanks though
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,519
    Hey,
    CameraController needs to run after PuppetMaster.
    Also, which target transform the camera is following? Try using the hip bone instead of the character controller.
    Those issues are easier to understand and debug if you turn time scale down to say 0.1 and fixed delta time up as much as possible, then you see it in slow motion basically.
     
  10. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    42
    Thanks. The target is the spine but after changing to the hip instead it still happens. I also changed timescale to 0.1 and fixed delta to 0.1, at 0.2 the puppet would just ragdoll. Left it walking for a few minutes and it doesnt show, only shows under normal timescale.
     
  11. WonkyDonky

    WonkyDonky

    Joined:
    Aug 24, 2014
    Posts:
    61
    Hey I had this problem again. Adding UpdateAnchor(true) to the Muscle script fixed it. I dont remember was that line added at some point and taken out again? Is there some other solution to fix this issue? Thanks!

    EDIT: Also Biped Ragdoll Creator incorrectly assigns references for Character Creator 4 character, it gives this warning:
    "BipedReferences limb hierarchy is invalid. Bone transforms in a limb do not belong to the same ancestry. Please make sure the bones are parented to each other"

    The bones are correct though and I have to manually change the references. (The CC4 characters have some extra bones) Is there way to make eg. preset/config?
     
    Last edited: Oct 20, 2023
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,519
    Hey,
    Sure you have the latest PuppetMaster, that bug was fixed in the latest. Can see version info in Plugins/RootMotion/PuppetMaster/PuppetMaster ReadMe file. Latest is 1.2.

    BipedRagdollCreator gets its references via animator.GetBoneTransform(), so it's the arm and leg bones from the Humanoid rig. Maybe you can change those bones in the avatar configuration scene?
     
  13. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,519
    Which character controller is that you were using, self made or 3rd party like Opsive?
     
  14. WonkyDonky

    WonkyDonky

    Joined:
    Aug 24, 2014
    Posts:
    61
    Wow, sorry, I remember checking earlier from the Package Manager that I couldn't update PuppetMaster, but now I checked and I could and I had the 1.1 for some reason...

    BipedRagdollCreator works also now, I didn't have Animator in the character as I use custom animation. But now on I'm gonna add it with the correct avatar for a moment to get the correct references
     
  15. gliealonso

    gliealonso

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

    I'm having an issue that when my character starts the game, the prop starts in the correct position, and after 1 second it slides to a wrong position.
    bfvsdfsfsdf.PNG
    fbdfvsds.PNG



    I tried putting the Prop Muscle Target in the correct position as shown in the image below, and then going to PuppetMaster and fixing the positions and rotations, and the issue still persists.
    cascad.PNG

    Any solutions?

    Many thanks!
    Gabriel.
     
  16. hermitmode

    hermitmode

    Joined:
    Sep 15, 2020
    Posts:
    42
    It's a self made controller setup that uses a Character Collider/Controller component (cant remember off the top of my head). It has utilised parts of your "third person controller" mixed with the recoil example and uses "puppet aimer" as well.

    Another issue presents itself also, is there a way beyond PinPow being raised to allow a puppet to walk steep inclines without unpinning? It may be that I am just testing in an unoptimised area with too many mesh colliders at once that it becomes unstable but I am having a lot of ragdolling upon waling up sharp inclines
     
    Last edited: Oct 30, 2023 at 8:10 AM
  17. WonkyDonky

    WonkyDonky

    Joined:
    Aug 24, 2014
    Posts:
    61
    I want puppet's muscle collisions to affect things on my scripts, so not necessarily just the Puppetmaster's variables (pinweights etc), are PuppetBehaviours still the way to go? I saw there was MuscleCollisionBroadcaster that is tied to having PuppetBehaviours?
     
    Last edited: Nov 1, 2023 at 1:52 PM
  18. Cybertiger

    Cybertiger

    Joined:
    Dec 19, 2013
    Posts:
    34
    Hi Partel,

    I was using PuppetMaster a few years back on single player games and it worked fine. My current project requires Multiplayer and we are using Photon Fusion for that. My ragdoll character prefab works fine in an empty scene without fusion but once i spawn the same prefab through fusion PuppetMaster get's disabled. It seems that
    Code (CSharp):
    1. Physics.autoSimulation
    always returns false.
    Is there any recommended way how to use fusion with PuppetMaster or is this not supported at all?
    Many thanks in advance.