Search Unity

Motion Controller

Discussion in 'Assets and Asset Store' started by Tryz, Feb 21, 2014.

  1. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha... No. It's new.

    But, we all have those moments. :)
     
    BackwoodsGaming and antoripa like this.
  2. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Hi Tim

    I have a very very very novice question for you. I'm trying to get my Ootii health stat to display in my Inventroy Pro UI window (http://devdog.io/unity-assets/inventory-pro/documentation/2.5p/api/changing-character-stats). I'm wondering if you could give me some pointers on how to actually call GetAttributeValue()?

    I honestly have no idea how to actually call that method.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Devdog.General;
    5. using com.ootii.Helpers;
    6.  
    7.  
    8. public class StatOotiiHealth : MonoBehaviour {
    9.  
    10.     public GameObject player;
    11.     public float playerHealth;
    12.  
    13.     // Use this for initialization
    14.     void Start ()
    15.     {
    16.  
    17.      playerHealth = GetAttributeValue(HEALTH);
    18.  
    19.     }
    20.    
    21.  
    22.     void Update () {
    23.  
    24.         var myPlayer = PlayerManager.instance.currentPlayer.inventoryPlayer;
    25.         var stat = myPlayer.stats.Get("Default", "Health"); // For example categoryName: "Default", and statName: "Health".
    26.  
    27.         // And now we can modify the stat any way we like, events will be auto. fired to update the UI
    28.         stat.ChangeCurrentValueRaw("playerHealth"); // Negative values are also allowed.
    29.         //stat.ChangeFactor(0.1f); // Add 10% health.
    30.        
    31.     }
    32. }
    33.  
     
  3. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha... no problem.

    The "Basic Attributes" component is just a MonoBehaviour (like every other component). So, the first thing you need to do is grab it. Then, you can call functions on it.

    I assume you're using the "player" variable to hold the GameObject that is the player (and has the BasicAttributes component). You'd do this:

    Code (CSharp):
    1. BasicAttributes lAttributes = player.GetComponent<BasicAttributes>();
    2. if (lAttributes != null)
    3. {
    4.     playerHealth = lAttributes.GetAttributeValue(EnumAttributeIDs.HEALTH);
    5. }
    Make sure you include my attribute namespace at the top of your file:
    Code (CSharp):
    1. using com.ootii.Actors.Attributes;
    That should do it.
     
    rubble1 likes this.
  4. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    wow, thanks for the quick reply.

    I'm now getting this error:
    Assets/_SharedAssets/Scripts/StatOotiiHealth.cs(19,50): error CS0103: The name `EnumAttributeIDs' does not exist in the current context

    Is this because it's not able to read from the Basic Attributes component? For some reason I'm not getting a slot in the component for the public gameObject player and i'm thinking that this is causing the Enum error.

    Or, is it because I have the code you posted in the void Start container? I'm not sure how else to contain it.
     
    Last edited: Feb 20, 2017
  5. notbilldavis

    notbilldavis

    Joined:
    Feb 25, 2016
    Posts:
    7
    So I have been playing around with adding blood splatter to my actor component with the sword and shield pack. In the OnHit function I spawn the prefab for it and it's going as expected but there is a delay getting the message. So what happens is my character swings the sword, a hit is detected, there's a pause, and finally the victim reacts with their damaged motion and my blood splash is triggered.

    Is there something I can do to speed this up? Maybe I've screwed something up or not setup the sword or colliders correctly?

    Just picked up the archery pack too, so I'm excited to start playing with that after getting the melee combat perfected!

    Thanks!
    Bill
     
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It may be that I haven't released that yet.

    Just use the string "HEALTH" or whatever is in the Basic Attributes item and you'll be ok. It would be this:
    lAttributes.GetAttributeValue("HEALTH");
     
  7. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    There shouldn't be a delay. You're not using any custom animations or anything... right?

    The way it works is that the animation event tied to the swing fires. Then, the attack is processed and damage is sent to the defender. The OnHit and damage animation should fire that frame.

    One thought. When you downloaded the animations from Mixamo, did you set the download to 60 FPS? If you look on one of the animations, the inspector will tell you if it's 30 or 60.
     
    notbilldavis likes this.
  8. notbilldavis

    notbilldavis

    Joined:
    Feb 25, 2016
    Posts:
    7
    No custom animations, still sticking to the Mixamo stuff. Inspector says 30 FPS, is that what I want? Interestingly I noticed that the OnHit for the SwordCore never actually triggers which seems like could be a clue. I can hit a breakpoint on the OnStartSwing, but it never breaks on OnHit.
     
  9. notbilldavis

    notbilldavis

    Joined:
    Feb 25, 2016
    Posts:
    7
    So putting some logging in, it seems the delay is on everything. I am logging on swing start, impact, and damaged and it's all happening at the same time. It's just all happening later than I would expect it to.

    As for what it's worth, I'm using Rewired for input but my character does seem to start swinging the sword as I hit the button which I expect. Maybe I need to just dig a little deeper myself.
     
  10. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    @Tryz Sorry I wasn't clear, I was tired when I wrote my post :p

    I followed your setup tutorial on youtube for the sword and shield pack, step-by-step, it worked out fine, so the problem isn't there I don't think.

    What happened is the enemy will advance fine on the player, however the player will only "tap-walk" as I call it; holding down any movement key, jones(Player) will rotate on the spot but won't move unless I "tap" the movement keys, He also walks fine if I hold down shift though.

    I don't know if its the S&SMP or just a bugged unity 5.4.f2(64bit)
    P.S
    I am using the default unity input solution and the only thing in my project is the ootii folder.

    Thanks in advance for your help.
     
  11. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    I'm not ootii but I can say that the animations you want are the 60 fps ones and the fbx is for unity option.
     
    TeagansDad, Tryz and notbilldavis like this.
  12. notbilldavis

    notbilldavis

    Joined:
    Feb 25, 2016
    Posts:
    7
    That seems like exactly my luck if that is the issue :p I'll download the right animations now and report back on if it fixes it. Thank you!!


    Edit: Good news, everyone! Changing to the correct animations fix my issue. Boy do I feel dumb, but at least my game is working great!
     
    Last edited: Feb 20, 2017
    hopeful and Tryz like this.
  13. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Right on!

    Thanks Tim!!!

    In case anyone is wanting to display stats in IP, here is a pretty elementary start. Note that I have this attached to a StatUI component to display the value.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Devdog.General;
    5. using com.ootii.Helpers;
    6. using com.ootii.Actors.Attributes;
    7. using UnityEngine.UI;
    8.  
    9. public class StatOotiiHealth : MonoBehaviour {
    10.  
    11.     public GameObject player;
    12.     public float playerHealth;
    13.     [SerializeField]
    14.     private Image content;
    15.  
    16.     // Use this for initialization
    17.     void Start ()
    18.     {
    19.        
    20.     }
    21.  
    22.  
    23.     void Update ()
    24.     {
    25.  
    26.     BasicAttributes lAttributes = player.GetComponent<BasicAttributes> ();
    27.         if (lAttributes != null)
    28.  
    29.             {
    30.                 playerHealth = lAttributes.GetAttributeValue("HEALTH");
    31.             }
    32.  
    33.  
    34.         content.fillAmount = playerHealth / 100;
    35.         Debug.Log (playerHealth);
    36.     }
    37. }
    38.  
     
    rubble1, Hans, hopeful and 1 other person like this.
  14. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm pretty confident it's not SSMP or I'd see the issue and other people would report it too.

    If you want to zip up your project and email it to tim@ootii.com, I'll look.
     
  15. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Ugh, Sorry to bombard you with this. I have a question about SetAttributeValue().

    I have a script that gradually decreases the hunger stat in IP and if that value gets below 10 it starts to impact on the player's "Health" attribute (on the Ootii character). I can't find anything on setting this value change? Is there anywhere I should be looking for this info, or is asking here ok?
    Thanks again,

    Code (CSharp):
    1. using Devdog.InventoryPro;
    2. using Devdog.General;
    3. using Devdog.InventoryPro.UI;
    4. using UnityEngine.Assertions;
    5. using UnityEngine;
    6. using System.Collections;
    7. using com.ootii.Helpers;
    8. using com.ootii.Actors.Attributes;
    9.  
    10.  
    11. public class StatOotiiHunger : MonoBehaviour
    12.  
    13. {
    14.     //public CharacterUI characterUI; // Assign in the inspector
    15.     public GameObject player; // Assign in the inspector
    16.     public float foodDamageAmount;
    17.     public float checkFood = 10;     //How often the script checks the food value. This also is how often the player is damaged when the food is 10 or below
    18.     public float checkFoodTimer = 0;
    19.     private WaitForSeconds waitTime;
    20.     private IStat hungerStat;
    21.  
    22.     void Start()
    23.         {
    24.         }
    25.  
    26.     public void Update()
    27.         {
    28.         BasicAttributes lAttributes = player.GetComponent<BasicAttributes> ();
    29.         hungerStat = PlayerManager.instance.currentPlayer.inventoryPlayer.stats.Get("Default", "Hunger");
    30.         waitTime = new WaitForSeconds(1f); // Create once to avoid GC
    31.         StartCoroutine(DegradeHungerOverTime());
    32.         checkFoodTimer += Time.deltaTime;   // Start Food Timer
    33.         }
    34.     protected IEnumerator DegradeHungerOverTime()
    35.     {
    36.         yield return waitTime;
    37.         // Decrease stamina by 1 every second. This will auto. repaint any UI that displays this stat.
    38.         hungerStat.ChangeCurrentValueRaw(-.005f);
    39.  
    40.         if
    41.             (checkFoodTimer >= checkFood && hungerStat.currentValue <= 10) //Check food value has reached 10
    42.         {
    43.             lAttributes.SetAttributeValue("HEALTH")(foodDamageAmount)
    44.             //playerDamageScript.Damage(foodDamageAmount);    //Damage Player
    45.         }
    46.     }
    47. }
    48.  
     
  16. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    Sent the project for you to review.
     
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Your IDE's Object Browser is the best place as it shows all the functions available. It has documentation and everything.

    Just like you call GetAttributeValue, you call SetAttributeValue

    Code (CSharp):
    1. lAttributes.SetAttributeValue("HEALTH", lCurrentHealth + foodDamageAmount);
    lCurrentHealth you'd get using GetAttributeValue()

    EDIT:

    I see what you did. You can't call functions like that. :)

    Instead, I updated my example above.
     
    Last edited: Feb 20, 2017
  18. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Thanks Tim!
     
    Tryz likes this.
  19. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Your project animations are pretty hairy.

    You've got animations that aren't part of my setup:
    Y_Bot@sword_and_shield_walk_inPlace

    And some of your animations aren't using my meta data:
    Y_Bot@sword_and_shield_walk

    Y_Bot@sword_and_shield_walk for example is Mixamo's "walk backwards" animation and not the normal "walk forward" animation I expect.

    In the demo scene, your character also has lots of extra motions.

    I think your best bet is to start fresh. Make sure you download the animations per the doc/video and copy over my meta files. That really matters as that's where Unity stores my animation changes.

    I actually made a video recently that might help too.


    Unfortunately, your current animations (and meta data) just aren't what I expect with the setup and they are going to continue to cause you issues.
     
    TeagansDad likes this.
  20. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    Tim, I followed your video to the letter, there should'nt be extra animations, and the meta data is from the zip provided by you. I not sure how this happened.

    I'll try reinstalling again just to be sure then I'll update you on it.
     
  21. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    @Tryz Thanks redid the tutorial got it working, I must have missed something, I was sure I followed the video to the letter, anyhoo, it's working now Thnaks to the ootii team.
     
    Tryz likes this.
  22. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    The best way to get this working with ootii's stats is a custom implementation of the IAttributeSource interface, using Inventory Pro.

    It just so happens that I've already done this, and it works without a hitch:

    Code (CSharp):
    1. using com.ootii.Actors.Attributes;
    2. using UnityEngine;
    3. using Devdog.InventoryPro;
    4.  
    5. namespace com.ootii.MotionControllerPacks.InventoryPro
    6. {
    7.     public class InventoryProAttributeSource : MonoBehaviour, IAttributeSource
    8.     {
    9.         public InventoryPlayer _InventoryPlayer;
    10.         private bool mIsInitialized = false;
    11.        
    12.         public bool AttributeExists(string rAttributeID)
    13.         {
    14.             if (!mIsInitialized) { return false; }
    15.  
    16.             var stat = _InventoryPlayer.stats.Get("Default", rAttributeID);
    17.             return stat != null;
    18.         }
    19.  
    20.         public float GetAttributeValue(string rAttributeID, float rDefault = 0)
    21.         {
    22.             if (!mIsInitialized) { return rDefault; }
    23.  
    24.             var stat = _InventoryPlayer.stats.Get("Default", rAttributeID);
    25.             return stat.currentValue;
    26.         }
    27.  
    28.         public void SetAttributeValue(string rAttributeID, float rValue)
    29.         {
    30.             if (!mIsInitialized) { return; }
    31.  
    32.             var stat = _InventoryPlayer.stats.Get("Default", rAttributeID);
    33.             stat.SetCurrentValueRaw(rValue);
    34.         }
    35.        
    36.         void Start()
    37.         {
    38.             if (_InventoryPlayer == null)
    39.             {
    40.                 _InventoryPlayer = GetComponent<InventoryPlayer>();
    41.             }
    42.  
    43.             mIsInitialized = _InventoryPlayer != null;
    44.         }    
    45.     }
    46. }
    47.  
    You would use InventoryProAttributeSource instead of the BasicAttributeSource included in ootii's demo scenes. We no longer need it; instead, we're applying weapon damage directly to the Inventory Pro "Health" stat.

    The Inventory Pro UI components (in the IP demo scenes) are already configured to display the value of Inventory Pro stats in real-time. So you don't need to do anything else. Just put this component on your player character, and that should be it.

    A more advanced version of InventoryProAttributeSource would allow you to specify which stat category (other than "Default") to use, but this basic version is enough to get started with.
     
    reocwolf, Hans, Tryz and 1 other person like this.
  23. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    I have one more question, I was looking through the animator on jones and couldn't find where the attack animations were.

    I was trying to set it so you can walk with the shield up and swing swing your weapon white simultaneously rotating your character. for example at 1.05 to 1.08 the player with the big sword pivots white swinging the sword:
     
  24. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    @DanielKW - The attack animations are in the PSS_BasicAttacks-SM sub-state machine.
     
    Tryz and DanielKW like this.
  25. DanielKW

    DanielKW

    Joined:
    Nov 11, 2014
    Posts:
    38
    Tryz likes this.
  26. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    This is amazing, TegansDad

    I'm getting an error though, i replaced the Basic Attributes with the component you posted but now when I'm attacked I get this error.

    Out of curiosity, how does it know to assign this to the player's Health Stat?

    I'm really grateful for this!

     
  27. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    @nathanjams - Hmm, I'll have to load up the project I was using that in to see if I missed anything about the setup.

    I don't think I've run that project under 5.5, so I'll just need to let it re-import. Should hopefully have an answer for you within an hour.

    When you call SetAttributeValue("Health", 50), it will use the "Default_Health" stat on the InventoryPlayer. So you're just using the name of the IP attribute. Not sure if it's case sensitive, so you could try that while I wait for my project to re-import.
     
    nathanjams and Tryz like this.
  28. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Okay, that took a lot less time than I thought; with all those 3D Forge model packages I figured it would take at least half an hour to re-import. At any rate, the only other thing that I saw that was different was that in the Actor Core, I used "Health" as the Health ID, rather than "HEALTH" -- as I said, I'm not sure if Inventory Pro's stat API uses case-sensitive attribute names or not.




     
    nathanjams, Hans, Adrad and 1 other person like this.
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    nathanjams likes this.
  30. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi Tim, I'm in need of your guidance. I'm trying to have a spider move using the BehaviorTree Designer and the motion controller. I took a look at your test scene provided by the integration package (which runs perfectly). However in my case the behavior tree is running to the first navigateto task but my spider stays in the idle state. I followed the lenghtly video on YouTube regarding setting up your own motion but even after following all those steps, no luck here.
    I was wondering if you have rootmotion in your provided characters, I don't have in my bought assets. Is there an simple example available on moving a non rootmotion enabled character?
     
  31. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    @antoripa was kind enough to port those BD actions over and share them on the Vault. Unfortunately, I haven't played with them in a long time.

    I know with the Node Canvas ones, you can simply move a character by checking the Actor Controller's "Use Transform" property. With this approach, you can use any of Node Canvas' movement actions because they simply move the raw transform... then, I animate based on "simulated input". No root-motion needed. However, I don't believe the BD versions support that yet.

    All of my out-of-the-box animations have root-motion. So, not having root-motion is probably the main issue.

    Depending on the motion you're using, you can set a WalkSpeed and RunSpeed as a motion property that will replace root-motion. Since we're dealing with a spider (and I'm assume a custom motion), I'm not sure that exists. What motion are you using to move with?

    EDIT:
    One thing I just thought of is to check if the character is using a NavMeshInputSource. If so, there may be a speed override there too.

    Again, it's been a long time since I've looked at what the BD actions are doing.
     
    Last edited: Feb 20, 2017
    antoripa likes this.
  32. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    @cygnusprojects I can support with BD and MC.
    Can you share a screenshot of your setting ?
     
    Tryz likes this.
  33. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Thanks! Which settings do you want to see (there are a lot of them :))?
     
  34. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    @Tryz , @antoripa : Ok, my spider is moving if I redesign the behavior tree with the MoveTo tasks from the BehaviorTree Movement Pack extension (and providing a speed value for each task). I'm good for now, will try to make the animation work next.
     
    antoripa and Tryz like this.
  35. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    cool ... feel free to contact me in case you need support ... cheers
     
  36. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    It's working! It was either the case sensitiv, or that I hadn't assigned the main player to the Actor Core component. I have teh Actor Core component attached to my player so I thought that it was automatically assigned. Though I'm starting to second guess this.

    Seriously, @TegansDad, this is awesome. Five stars indeed!
     
    Last edited: Feb 20, 2017
    hopeful and Tryz like this.
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I thought you'd like to see some of the latest spells...



    Each spell I make, adds more to the library of things you can do. :)
     
  38. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Very nice! Quick thought for chain lightning... What about obstacles blocking a leap? Say one of those blocks were between targets, would it block it?
     
    Tryz likes this.
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hmmm... I didn't think about that.

    I could put a check in to ensure the line from source-to-target isn't blocked. That should be easy enough.
     
  40. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    looking good so far.
     
    Tryz likes this.
  41. TheWhiteWolves

    TheWhiteWolves

    Joined:
    Aug 18, 2014
    Posts:
    11
    A quick question tim, with that chain lightning spell is it possible to have it jump to multiple targets at once instead of 1 at a time.

    e.g. if it hit the middle guy then could it jump to both side ones at the same time instead of cycling through them like it does at 04:00 in the video?
     
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Not really.

    Having it jump to multiple targets where each arc would then jump to multiple targets and so on... would quickly create a huge number of "threads" (think 1 x 5 x 5 x 5 after only 3 jumps).

    The processing of the nodes is a single "thread". So, the "wait" node in the video can't have 125 instance all running at the same time.

    I'll have to see if I can do a "Fan Lightning" that jumps once (to multiple targets). That would require a node that could manage multiple particle instances, but I think it's doable. However, once we get into each of them jumping... that would cause issues.
     
  43. TheWhiteWolves

    TheWhiteWolves

    Joined:
    Aug 18, 2014
    Posts:
    11
    It would be really interesting if there was an ability to, kinda something where its a case of you "could" chain it several times but if you were sensible you wouldn't, my thought would be something that doesn't jump far (i.e. maybe only jumps once) but it jumps to multiple targets around the source at once.

    So for example you have the normal chain lightning spell like in the video which bounces from one target to the next up to its bounce limit and then you have a burst lightning spell which hits the first target and then bounces to every target within 5ft of the first one at the same time then stops.

    I see it as a spell that you would use against a group of enemies who are tightly packed (e.g. troops in formation) whereas chain would be more something you use against a loose gathering of enemies (e.g. troops sat around camp fires)
     
    Tryz likes this.
  44. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Yeah, that's what I was describing with "Fan Lightning"... although I think I like "Burst Lightning" better. :)

    I think that's doable.
     
    reocwolf likes this.
  45. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    What would be the best method to check the current speed in the TestActivate method of a motion? (Yes, still trying to get any kind of locomotion animation in my spider :D)
     
  46. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Vector3 lVelocity = mActorController.State.Velocity;

    Are you using the "Use Transform" checkbox to move your spider? If so, I create pseudo input in order to help drive animations. Check out the Motion Controller's ProcessMovementInput() function.

    You'll see that I use the ActorController.State.Velocity to set the MotionController's State.InputForward, State.InputX, and State.InputY properties. You can access all that in the motion itself and this info is passed to the animator. This is how I have the NPCs animate even when the transform is moved by some other method (ie AI).
     
    TeagansDad and cygnusprojects like this.
  47. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Thanks for the info Tim, will work from there. No, I tried the Use transform and for some reason (didn't spend much time investigating why) the spider was running through the walls iso following the path. I'm using the Oottii Nav Mesh Driver to get the spider going.
     
  48. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    When using UseTransform, I disable collisions as I assume the code setting the transform.position is in control.

    EDIT:
    Help me understand the spiders.

    You're using the Nav Mesh Driver... that typically means you're NOT using the Motion Controller, but instead just an Actor Controller. In that case, it's similar to the spiders in my Actor Controller demo (they don't use root-motion).

    If you're using the Motion Controllers and created special "spider walking" motions, you'd probably be using the Nav Mesh Input Source as that will control the Motion Controller. Otherwise the Nav Mesh Driver and Motion Controller will fight for who is driving the spider.
     
    Last edited: Feb 21, 2017
  49. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    That will explain why none of the animations is triggered. So out with the Nav Mesh Driver. Will have to recheck the Use transform setting then.

    Will try with a Nav Mesh Input Source and post my findings (probably tomorrow). I have the impression things are getting quite complicated when dealing with non root motion animations. Maybe a hint for a video setting up custom motions using non root motion animations (like the one you did for explaining Tut Sheath) ;)
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Give me a day or two and I'll do a video. I think once you see me do it, it will make sense.
     
    cygnusprojects likes this.