Search Unity

Rifle Animset Pro with Playmaker controller | Asset Store

Discussion in 'Assets and Asset Store' started by Kubold, Feb 13, 2014.

  1. Kubold

    Kubold

    Joined:
    May 10, 2012
    Posts:
    359
    Hi,

    the problem we see here is with the skinning of the arm on your model. It looks like there is no smoothing between weights in the Spine - Right Arm area. This kind of skinning will cause problems in any animation that moves the clavice bone (the shoulder).

    This can be fixed by skinning some of the vertices to the shoulder bone, not just spine and arm, and then smoothing it all out. You can do this in Maya, Blender, 3ds max or any other 3d software that supports fbx and animation.

    skin1.jpg
    skin2.jpg
     
    Last edited: Apr 15, 2019
    hopeful and TokyoWarfareProject like this.
  2. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    thanks for the info!!! glad to see ther eis a solution, bit out of the scope of my skills but will have a look. Definitelly your image shows the same issue and that there is a fix :D. Kudos
     
  3. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    EDIT:
    I've found playmaker issue is explained in your website. I really need to check how you know what feet is groudned in your controller because I can not see animation curves saying so lol.
    solution here:
    https://www.kubold.com/faq-unity

    EDIT2: being able to see how you built the controller is a breeze for me to build my own in C#

    Hello again, In a clean project I import playmaker and rifle animset and console is flooded with exceptions. I guess your playmaker code got old. I just need to see how is the correct way for the things to work as atm I'm having hard stop from walk to idle and I see there is "WalkStopsLUBlend Tree" but I dont know how to call if left or right and I whant to see how you did in playmaker. Similar for Sprint, not sure how it gets called, I guess I should call directly from my script but I see no transition parameter/conditions
     
    Last edited: Apr 16, 2019
    Kubold likes this.
  4. Kubold

    Kubold

    Joined:
    May 10, 2012
    Posts:
    359
    Hi,

    I see you managed to figure it out, but I agree, I should make the controller to not need iTween.

    To sum it up:

    - iTween (an animation system) was part of Playmaker for many years, but now it is a separate pack (but still free). Besides PlayMaker, you also have to install iTween and enable iTween support in PlayMaker, before importing Rifle Animset Pro.

    - In Rifle Animset Pro there are two transitional animations of stopping. One is with right foot in the air, and the other is with left foot in the air. The game should decide which one to play when stopping, basing on which foot is in the air in walk cycle. The easiest way to do this is:

    Do this once every time the character is about to stop:
    a) Get Global Y Position of left foot bone
    b) Get Global Y Position of right foot bone
    c) If left foot bone position Y is greater than right foot bone position Y, then the left foot is in the air, and you should play stopping animation with suffix "_LU". If not, then the right foot is in the air, and you should play stopping animation with suffix "_RU".
     
    Last edited: Apr 17, 2019
  5. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    Yes thank you, I found that you drive LU-RU based on isRU parameter that is a curve that tells if RU is grounded or not .

    What is strange to me is that I can only see the curve with IsRu parameter on the "Rifle_SprintLoop" animation, for the rest, like animation in blend trees like could be "Rifle_RunFwdLoop" the inspector is greyed out. But I guess the curves are set up by you somehow beforehand

    I've mimic your playmaker in my code and it seems to decide correctly wha animatio to use.

    I call this won input key up,

    (...)
    isR = anim.GetFloat("IsRU");
    (...)

    void Stop()
    {
    if (isR > 0.95f) anim.SetBool("IsStopLU", true); //cuando pisa con derecho =0
    else { anim.SetBool("IsStopRU", true); }
    }

    I do now need to figure out the Stop angles and adapt my compas form the tanks so I can have the aim angle, although I'm considering for aiming use IK, but I've to learn first and decide later what is better solution.
    tx

    ---------------


    edit
    I was having a hard time trying to guess how the isRU parameter was being set for animation in blend trees, as in inspector the curves are only shown for the Sprint animation and animation in blend trees hav ethe inspector greyed out.
    For curvest to be set you've to select the animation asset like this:
    upload_2019-4-17_13-22-54.png
     
    Last edited: Apr 17, 2019
  6. BioBurden

    BioBurden

    Joined:
    May 28, 2018
    Posts:
    115
    Has anyone made a controller for these animations that they would be willing to share? Thanks in advance.
     
  7. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    Not sure if anyone still haunts this forum, but I'll ask just in case. The YT tutorial for replacing the character with your own is out of date but it's not too hard to adjust to the current version of RAP. When I switch weapons with my character, the animation plays properly, but the mesh for the previous weapon remains visible, so I must have missed a step. Has anyone else experienced this?