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

Motion Controller

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

  1. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm thinking I'll submit the Shooter Motion Pack to Unity in about 3 weeks. Then, it's up to Unity. I've seen them approve my assets in a couple of days and I've seen it take 4 weeks. That part is out of my hands. :(
     
    Vog likes this.
  2. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
    @Tryz
    right,i will use your shoot pack,3 weeks it is not long time.could your tell me Features about your shoot pack?or user guide is better.
     
    Last edited: Oct 18, 2017
    Tryz likes this.
  3. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I've posted a couple of videos. I'll release more info when I can.

     
    Salja, hopeful and FargleBargle like this.
  4. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
    i want create a game style like "alien swarm",would i create a new movetype and camera type?
    camera control 's moba style,and motion control's shooter style dont fit the "alien swarm" style.
    maybe i must create a new one camera style or how to setup current camera style?
     
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I just watched a quick video of Alien Swarm, but I've never played it.

    Others have used the MC for top-down games. So, it's definitely doable with the motions that exist. You just have to work out camera and control scheme.

    For a game like this, I think you almost need to think of the players like NPCs. You're going to click the ground, use the nav mesh to determine the path, and then have the character go there. So you can check out my videos on NPCs and that should give you a good start.



    You won't need new movement motions as you should be able to use the pivot and strafe motions that I have. Just like I do in the videos. The camera won't be able to be used for rotation. So make sure you disable that in the motions.

    The camera is different. Since you want a top down view, you'll need a camera or camera motor that supports the features you want. That may be something you need to create.
     
  6. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    I'm not sure if I am missing a step but I am changing the damage multiplier on the Attack Style but it does not seem to do any more damage. I tried 2x and now I'm trying 50x but the amount of health taken from the enemy is always the same.

    I couldn't get a damage multiplier to make a difference to the damage in the demo as well.
     

    Attached Files:

  7. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52

    maybe alienswarm is too unpopular.my target style is just like unity demo angrybot,
    mouse location control player's facingDirection,
    and keyboard "wsad" control movement.
    so your NPCs video is not exactly fit my.
     
  8. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Then you probably would need a custom motion.

    Here's an example where I inherit from BasicWalkRunStrafe. I call it BasicWalkRunFocus and it doesn't use the camera. Instead, it uses the mouse location (or other focus point) to control the player's facing direction and the WASD keys control movement (in world space, camera space, or character space).

    For example, with the mouse to the left of the character... the character will face to the player's left. Pressing W will have the character move "his forward" which is to the world's left.



    https://www.dropbox.com/s/7yg1pftkm8xntnd/BasicWalkRunFocus.cs?dl=0

    By inheriting from BasicWalkRunStrafe, we can just us the animator setup that I already have.

    Hopefully this gives you a good starting point. Feel free to modify as needed.

    [EDIT]
    I was having fun so I beefed this up more and changed the name. Now you can focus on the mouse, input, a target, or a position. You can also determine if the WASD keys move the character relative to the world, camera, or character direction. :D
     
    Last edited: Oct 19, 2017
    TeagansDad likes this.
  9. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    I am trying to make a Krypto modifier for the spells so it is easier to use his amazing particles with the ooti spell system.

    for this, i am creating a spell action. However, i am unsure how I can access particles and projectiles spawned?

    When its done it will of course go up on the vault
     

    Attached Files:

    christougher likes this.
  10. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    On the vault, I have some integration with his asset already. You may want to check that out first.
    http://www.ootii.com/UnityMotionVault.cshtml#RE4

    I don't have a way to access the GameObjects (particles, projectiles, etc) created by a previous node. They are tracked by the node that created them, but there's really no way to find that previous node. I think I can add a list to the SpellData that gets passed around. I just need to make sure I don't mess up references. I need to think about this a bit more.
     
  11. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    Is it possible that you can update the Sword and shield package demo so that the enemy uses the new motion controller functions such as Basic Equip and Basic Attack. I am having a hard time getting my character to equip a sword and shield using the function :

    mBasicInventory.EquipWeaponSet();
     
  12. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Unfortunately, I'm not following...

    The Assets\_Demos\MotionControllerPacks\SwordShield\Scenes\demo_SSMP scene has an enemy called "YBot Target". He's using all the new MC motions and functions (including Basic Item Equip and Basic Melee Attack).

    If you look at his AI script (SS_NPC_Controller_v2.cs), you'll see he equips his sword and shield using mBasicInventory.EquipWeaponSet() at line 138.

    I just did a fresh download of the MC, SSMP, and Mixamo animations. Everything seems to be working.

    Which demo are you using?
     
  13. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
    i have some error with" mMotionController.CurrentForm":
    "
    if (_Form <= 0 && mActiveForm != mMotionController.CurrentForm)
    {
    mActiveForm = mMotionController.CurrentForm;
    mMotionController.SetAnimatorMotionPhase(mMotionLayer.AnimatorLayerIndex, PHASE_START, mActiveForm, 0, true);
    }

    "

    because my MotionController.cs dont have define about CurrentForm.so what part about CurrentForm in MotionController.cs?my MotionController version was2.65
     
  14. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    i downloaded and imported the newest animations and they look at little different from before. and it seems that your motion importer cant find them:

    upload_2017-10-20_9-20-18.png

    as you can see he can draw sword but all of the movement is not found :(
     
  15. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    I have just completely reinstalled ALL of the motion controller packs and imported the mixamo animations, however, all the animation in the animator connected to the sword and shield package are empty:

    upload_2017-10-20_9-57-27.png

    upload_2017-10-20_9-57-51.png


    i suspect that its because the package from mixamo has been changed. Hope you can help me out here.
     
  16. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    Shouldnt you import the animations before the motion packs?
     
  17. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    Even if it still can't find the animations if I create a new animator controller and set up the package again. So I think the code is looking for some old names that no longer exists in the new animation zip.
     
  18. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    773
    Did you copy over the metadata files for the new animations? The SSMP package includes an "Extras" folder containing a file called "AnimationMeta.zip". You need to copy the contents of that file into the Mixamo folder after adding the animations. Then restart Unity, and allow it to import the animations, using the supplied metadata. Then load the demo scene, and set up the pack on the player and enemy characters, as shown in the Demo Quick Start section of the manual. If you don't use the matching metadata files for the animations you're using, or don't set the pack up according to the instructions, the animations won't work properly.

    To be safe, you should download the latest versions of Motion Controller and SSMP pack, and the latest animations from Mixamo, and then double check the files in the Mixamo folder after adding the animations and metadata, to ensure the metadata file names match the animation file names (you'll need to enable viewing of hidden files first). There could be some redundant legacy metadata files there as well, but they should be automatically deleted by Unity when it evaluates the folder. As long as you have matching metadata files for all of the animation (FBX files) you should be fine. ;)
     
    Last edited: Oct 20, 2017
  19. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    i did this and still the animator cant find the animation clips i think its because maximo has changed the names. Below is a picture of the zipped files from maximo on the YBot:

    upload_2017-10-20_13-41-56.png
     
  20. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    And here is what they look like in my folder:
    upload_2017-10-20_13-42-50.png
     
  21. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Your right. Your version of the MC doesn't have CurrentForm yet. Change CurrentForm to DefaultForm.
     
  22. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @Censureret ,

    I'm sorry you're going through all this. I can understand how frustrating it can be for it to not "just work".

    Unfortunately, I'm not sure why it's working for me and others, but not for you. What I did was create a new video without stopping or pausing. This way you can see every step I go through.

    In the past, when someone reported an issue like this it turned out that they didn't put the files where I said or didn't unzip my .meta files. It looks like you have. So, maybe it was the animation download settings on Mixamo?

    I used Unity 2017.2 for my video. Once it's done uploading I'll post it for you.

    Can you confirm what versions of Unity and my assets you're using? If you go to the root folder of my individual assets you'll see a "Version.txt" file.
     
  23. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    I am using the newest version of unity I think its 2017.2 can you confirm that you started completely from scratch and downloaded the animations from Maximo (I.e did not use an old collection)?
     
  24. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Yes. Confirmed.

    I also did it with Unity 5.5, but didn't make a video.

    Video just finished. I'm not sure what's different between you and me. Maybe the video will help.


    [EDIT]
    One thought. Are you possibly setting the pack up on one layer, but putting the motions on a different layer? Maybe that's what's getting crossed...
     
    Last edited: Oct 20, 2017
  25. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    it works now after following your video. There must have been a step that I missed somehow. :S Thank you so much for you help!
     
    FargleBargle and Tryz like this.
  26. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    I posted this earlier but I think my post got buried :)


    I'm not sure if I am missing a step but I am changing the damage multiplier on the Attack Style but it does not seem to do any more damage. I tried 2x and now I'm trying 50x but the amount of health taken from the enemy is always the same.

    I couldn't get a damage multiplier to make a difference to the damage in the demo as well.
     
  27. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Sorry about that. :)

    You're right. Somewhere along the line I disconnected it and I'm not seeing a clear place to put it back.

    I'll look at it this weekend and get it back for my update next week.
     
    tchris likes this.
  28. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz

    by the way is there a way to toggle between available targets (so that you can change which "enemy" you have locked onto)?
     
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    No. I don't have a way to cycle through targets. I just target the one you're looking at.

    If you come up with a way to do it, you can manually set the Target on the Combatant and the IsTargetLocked flag. That should cause things to work as if I found the target.
     
  30. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @Tryz il create one and send it to you in a mail then you can put it on the vault if you wish :)
     
    TeagansDad, tchris and Tryz like this.
  31. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    tim a quick question when i make now some fight animation like punch how i can say how much damage he make ? and is the punch detect on the npc ?

    I thinking at the Moment how can a creature without sword and arrow make damage on the Player when i have a creature what use bite i will use ootii in a produktive game but we have Not only human npc and I look for a way to make damage from a creature

    Will be amazing when you can tell me how is the Best way
     
    Last edited: Oct 21, 2017
  32. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Set it up the same way as a sword (using the Sword Core). You just need a "Fist" weapon with no mesh and you could use a sphere collider instead of a box.

    If course you'd need a different Motion Form as well.
     
    Tryz and Salja like this.
  33. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Yeah i have think the same thanks i hope now only find a way for the creature maybe tim has a idea
     
    Tryz likes this.
  34. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    As @TeagansDad said, I really think that creatures attack using the same approach we do for humans.

    Let's take a dog for example..

    The dog has an Actor Controller, Motion Controller, Actor Core, Basic Inventory, etc... just like a human.

    The animations for BasicIdle, BasicWalkRunPivot, and BasicMeleeAttack are different from our humans, but they are the same motions (with different form values): idle, walk forward, and bite.

    With Basic Inventory, we just have a single "weapon set": mouth bite.

    For our weapon, we can actually use the same process we use for a sword. We create a prefab that has a Sword Core, but it doesn't have a mesh. It's an invisible prefab that would be positioned over the dogs mouth. So, when the dog's attack animation plays we see if the mouth area hits the enemy. No different than when the sword attack animation plays.

    To me, the "character" or "actor" is nebulous. While my animations work for humanoids, the motions and components don't really care if you're a human, dog, dragon, or insect. You just need the animations that fit the skeleton.
     
    Last edited: Oct 21, 2017
    tchris and Salja like this.
  35. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504

    Hi, thank you very much for this long reply. The way you explain to setup the demo scene Is like my current setup allready. I tested tap to pivot and it is not what I am looking for.

    If we take the demo scene as an example, when right clicking that works exactly as I want, but when I am not right clicking I want the mouse to move the camera around the player wihtout affecting the direction it is walking towards. Basicly the character should walk towards vector3.forward while pressing W on the keyboard wihtout being affected by the camera turning around the player.

    Thank you.
     
  36. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    In that case, you'll have to create a custom motion to get exactly what you want.

    Basic Walk Run Focus will allow you to do this if you uncheck all the "Rotate To" options and check "Actor Relative Input". There's no pivoting. This motion was built for top-down style games and to allow facing one direction while moving another, but could work.
    https://www.dropbox.com/s/7yg1pftkm8xntnd/BasicWalkRunFocus.cs?dl=0

    Basic Walk Run Strafe will allow you to do this if you uncheck "Rotate With Camera" and "Rotate With Input". There's no pivoting. This motion was built to expect the character to face the direction of the camera for strafing and walking backwards (like The Division)

    Basic Walk Run Pivot
    won't work for you. It's built to rotate in the direction of the camera when moving and the RMB is held (like Tomb Raider)

    Walk Run Pivot uses the camera to determine the character's direction. I can add a property to not rotate as you're asking, but as soon as the camera is facing the character the character will do the 180 pivot animation and turn around.

    Walk Run Strafe is built to always have the character facing the direction of the camera. This way the character strafes and walk backwards.

    Walk Run Rotate will allow you to do this if you uncheck "Rotate With Camera" and "Rotate With Input". There's no pivoting. This motion was built to rotate with AD and strafe with QE (like WoW).

    As you can see, there's several different examples that behave in different ways.

    I'm not exactly sure what you're wanting for movement, pivoting, and rotation. In the end, you may need to create a custom walk-run motion that behaves exactly how you want it to. That's totally doable and why the MC was built to allow for custom motions.
     
    FargleBargle likes this.
  37. Ooi

    Ooi

    Joined:
    Nov 22, 2015
    Posts:
    11
    So I just downloaded the Sword and Shield pack. This is the content of the meta zip file. Any idea how to fix lmao?
    Also, both the Version.txt and Version.bak says "0.30"?

     
  38. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I just downloaded and the files are there, but it looks like the file properties are marked as 'hidden'. I've had this happen a couple of times where either Unity or Windows changes the file flags to 'hidden'.

    Are you able to show hidden files in your zip tool or file explorer?

    If not, here's a link to the zip without hidden files. That should help.
    https://www.dropbox.com/s/9vbbgn58zof23fm/SSMP_AnimationMeta.zip?dl=0

    You're right about the version number too. I must not have updated that. :eek:
     
  39. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    One question with non-humans, my Combatant.PrimaryWeapon is null for this non-human character. And I see the instance of the equipped weapon is empty. For the sword we always picked RIGHT_HAND for the SlotId Does this need to be something different since I am using a Generic animation type instead of Humanoid?

    My weapon is an empty gameobject as you explained but I'm assuming it needs to be spawned on the skeleton somewhere in order to attack? Can I put something else in SlotID for it to go to the right bone?[/user]
     
  40. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I was looking at the code and there are some properties that I set when the item is equipped. I was going to document that, but then it hit me that a better way is to have an "Equip On Start" checkbox that automatically equips the weapon set when the game starts. That would create the weapons, equip them, set all the properties, etc.

    So, I'll add that for this week's update.

    However, if you want to try it now, do these 3 things:

    1. Add a new property to the BasicInventory.cs (around line 147)
    Code (CSharp):
    1.         /// <summary>
    2.         ///  Determines if we start by equiping the active weapon set (without running animations)
    3.         /// </summary>
    4.         public bool _EquipOnStart = false;
    5.         public bool EquipOnStart
    6.         {
    7.             get { return _EquipOnStart; }
    8.             set { _EquipOnStart = value; }
    9.         }
    2. Use the new property in the Basic Inventory Start() function at line 288:
    Code (CSharp):
    1.             // Equip the default weapon set
    2.             if (_ActiveWeaponSet >= 0 && _EquipOnStart)
    3.             {
    4.                 EquipWeaponSet(_ActiveWeaponSet);
    5.             }
    3. Expose the new property in the BasicInventoryEditor.cs (line 85)
    Code (CSharp):
    1.         if (EditorHelper.BoolField("Equip On Start", "Determines if we automatically equip the weaponset when the game start.", mTarget.EquipOnStart, mTarget))
    2.         {
    3.             mIsDirty = true;
    4.             mTarget._EquipOnStart = EditorHelper.FieldBoolValue;
    5.         }
    With that, there's now a check box on the Basic Inventory Inspect that says "Equip On Start".



    Just set the weapon set index to your bite or claw and check the checkbox. When the game starts, we'll instantiate the "weapon" prefab, set the properties, and you'll be good from the start.

    I think that's the cleanest solution.
     
    hopeful, tchris and TeagansDad like this.
  41. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    @Tryz Thanks, that sounds great. I'll try it tonight. What do I put in for the SlotID of the bite ? Actually, what exactly does the SlotID mean? I never really got it. :)
     
    Tryz likes this.
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    The Basic Inventory slots do two things:
    1. Provide a way to list available slots and determine if an item is equipped.
    2. Provide the transform name that will become the parent of the item when it is equipped.

    Typically the slot ID matches the Unity Humanoid Bone that defines the transform the weapon will be a child of. I ignore case and get rid of underscores and spaces. So, we could have used:

    RightHand
    Right Hand
    RIGHTHAND
    RIGHT_HAND
    etc.

    When we equip the sword, the sword's transform becomes a child of the transform associated with the slot ID (RIGHT_HAND = HumanBodyBones.RightHand).

    In your case, the slot ID would match the name of the transform you want the "weapon" tied to. So, lets say you're dealing with a dog who bites. You created the object that is the weapon which represents the teeth. The slot ID would be the name of the transform to parent it to... "Head", "Jaw", etc. Since it's not a humanoid skeleton, we need the name of the actual transform. That depends on the dog's skeleton.
     
    tchris likes this.
  43. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    I just thought I'd share this code I did for the player being able to stun the enemy using certain attacks. In this case I picked attack style 10.

    I was going to try and see if there could be a flag on the actual Attack Style that indicates if this attack style stuns so it's not hardcoded in the SelectAttackStyle() but I haven't got there yet.


    This is a reactor when the DefenderDamage message event happens
    Code (CSharp):
    1.  public class NPCAttackReactor : MonoBehaviour
    2.     {
    3.         public float stunTime = 6f;
    4.         MotionController motionController;
    5.         void Start()
    6.         {
    7.             motionController = gameObject.GetComponent<MotionController>();
    8.         }
    9.  
    10.         public void DefenderDamaged(ReactorAction reactor)
    11.         {
    12.             if (reactor == null)
    13.                 return;
    14.             CombatMessage combatMsg = reactor.Message as CombatMessage;
    15.             if (combatMsg == null) return;
    16.             if (combatMsg.Defender == gameObject)
    17.             {
    18.                 if (combatMsg.canStun)
    19.                 {
    20.                     motionController.ActivateMotion("Stunned");
    21.                     StartCoroutine(CancelStun(stunTime));
    22.                 }
    23.             }
    24.         }
    25.  
    26.         private IEnumerator CancelStun(float waitTime)
    27.         {
    28.             yield return new WaitForSeconds(waitTime);
    29.             CancelStun()
    30.         }
    31.         private void CancelStun ()
    32.         {
    33.             MotionMessage lMessage = MotionMessage.Allocate();
    34.             lMessage.ID = MotionMessage.MSG_MOTION_CONTINUE;
    35.             motionController.SendMessage(lMessage);
    36.             MotionMessage.Release(lMessage);
    37.         }
    38.     }
    This is a reactor on PreAttack for my player. Just as an example it always happens on attack 10. But there could be more options.
    Code (CSharp):
    1. public void SelectAttackStyle (ReactorAction reactor)  {
    2.          if (reactor == null)
    3.              return;      
    4.          CombatMessage combatMsg = reactor.Message as CombatMessage;
    5.          if (combatMsg == null) return;
    6.          combatMsg.canStun = (combatMsg.StyleIndex == 10);
    7.      }
    I added this in the ootii/Framework_v1/Code/Actors/Combat/CombatMessage.cs class
    Code (CSharp):
    1.  
    2.      public bool canStun = false;
     
    hopeful and Tryz like this.
  44. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    That is AWESOME!

    I can't tell you how happy it makes me to see people expand on these assets. :D

    The ICombatAttack and AttackStyle classes don't have a "canStun" property, but I'm happy to add it (or something like it).

    What if we added an int field like "EffectFlags" (as a bitmask)?

    What's nice about this is that we can use bitmask adding to add multiple effects. So, we could have something like:
    0 = None
    1 = KnockBack
    2 = KnockDown
    4 = Stun
    8 = Disarm
    16 = ...

    This allows us to assign multiple effect including ones we haven't thought of yet. I could add some helper functions, but basically we could say:

    Code (CSharp):
    1. // 1 = KnockBack
    2. if (AttackStyle.EffectFlags != 0 && (AttackStyle.EffectFlags & 1) != 0))
    3. {
    4.     // Knock back effect exists
    5. }
    6.  
    7. // 4 = Stun
    8. if (AttackStyle.EffectFlags != 0 && (AttackStyle.EffectFlags & 4) != 0))
    9. {
    10.     // Stun effect exists
    11. }
     
    hopeful and tchris like this.
  45. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    I'm really enjoying the new Reactor functionality. It opens so many possibilities.

    That sounds great. I wanted to share my code because I figured you may have a cleaner way to add something like this to the base code.
     
    Tryz likes this.
  46. w409544041

    w409544041

    Joined:
    Aug 3, 2017
    Posts:
    52
    there is still a problem.In alienswarm like game,when i face forward,"w"means move forward.and when i face left "w"will means move right.
    But in your solution,whatever my facing dirction,"w" always means forward.

    so is it means i must edit animatior?and how?
    thx for your help.
     
  47. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Check 'Rotate to Mouse'
    Check 'Camera Relative Input'.

    When you move, the character will face the mouse cursor. If the mouse cursor is to the left of the character, the character will face to the left. Pressing 'w' will have the character strafe to his right while facing the mouse cursor.

    Play with it and try different checkbox settings (like un-checking Camera Relative Input).

    If nothing else, this shows you how you can create your own movement using custom motions. Feel free to customize as needed.
     
    Last edited: Oct 23, 2017
  48. Ooi

    Ooi

    Joined:
    Nov 22, 2015
    Posts:
    11
    @Tryz I also find @tchris Reactor functionality to be fun/interesting. Think you able to implement it into the next release? ;) Effects such as move-speed boost, airborne, damage-over-time etc... are some ideas come to mind. This will make balancing/prototyping easier without having to hard code every action.
     
  49. tectuma

    tectuma

    Joined:
    Nov 26, 2012
    Posts:
    46
    I am having issues networking your controller. I can only pass strings floats and ints from the client to the server and back. The WASD where easy just passed the floats my issue is getting my head around how to get the Keycods (input and receiver). Also the player rotation seems to unsync after a while from the client and server. I know it is prob my issue but would love some input/examples....
     
  50. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    With the Actor Core's "Effects" section, we can do things like damage-over-time, move-speed boosts, and add particle effects now. In fact, this is exactly how I apply spell effects to the characters.



    They are typically setup through code as they are usually created at run-time. That's where custom reactors like what @tchris did can come in. With a minimal amount of coding, it gives you the ability to do what every you want.

    I think all the blocks are there. It's just a matter of the developers doing what @tchris did and snap them together to create cool and unique ideas. :)

    Is that what you mean?
     
    Last edited: Oct 24, 2017
    hopeful and tchris like this.