Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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,353
    It really depends on what you're doing.

    For example, I can't tell if you're using the Actor Controller with a custom driver or if you're using the Motion Controller (which is an advanced driver).

    Say you're using the Motion Controller for movement. Then, how the movement interacts with the camera depends on which motion you're using:

    Basic Walk Run Pivot & Walk Run Pivot use the camera to determine relative input. This gives you movement like Assassin's Creed where the character can face the camera.

    Basic Walk Run Strafe & Walk Run Strafe uses character relative input. This allows the character to strafe with the AD keys and walk backwards with the S key (ie The Division).


    Since you mention "MoveRelative()", I'm assuming you're creating your own custom driver. In this case, you can use the functions "Move()" and "MoveRelative()" to control movement. MoveRelative() will take input and assume that's relative to the character's direction.

    I purposely made the Actor Controller not care about a camera.

    If you want to make camera relative movement, I would do that in your driver and pass that to the Actor Controller through the Move() function. Honestly, the Actor Controller has worked pretty solid for several years. So, if you feel you have to modify code... it's probably the driver and not the AC.

    This depends on the camera motor you're using.

    If you're using Basic Walk Run Pivot motion (ie Assassin's Creed) and then use the 3rd Person Follow camera motor, you'll find the camera is pulled along after the character. The character can face the camera and when they walk away, the camera is pulled with them. Again, very "adventure game" - esque.

    If you're using Walk Run Strafe motion (ie The Division) and then use the 3rd Person Fixed camera motor, you can check the the motion's "Rotate With Camera" option and now the character will rotate with the camera.

    So, it depends on the approach you're going for. In the 3rd person camera motors, they are always going to look towards the "Anchor" + "Anchor Offset". Typically that's the head of the character. If you want the camera to look ahead, you could use a different anchor instead of the character and control that offset.

    You can learn more about Camera Anchors here.
     
    TeagansDad likes this.
  2. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Unfortunately, I'm not really following what you're asking.

    I did try the code on the NPC and it worked. It also won't interfere with the player if you put the code on the NPC itself. If you can help me understand more I might be able to help more.
     
  3. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    For an NPC, you have to force the motions to activate. In my NPC demo for example, the SHMP_NPC_Controller.cs shows how I do this at line 227. Like in the code of this thread a couple of posts up, I do the following:

    Code (CSharp):
    1. BasicShooterAttack lAttack = mMotionController.GetMotion<BasicShooterAttack>();
    2. if (lAttack != null && !lAttack.IsActive)
    3. {
    4.    mMotionController.ActivateMotion(lAttack);
    5. }
    Depending on how you're building your NPC AI, you'd write code like above, create a Node Canvas node, etc. Your NPC will follow the same flow as the PC. So, make sure you have ammo in your inventory, make sure you've got a gun equipped, etc.

    The SHMP_NPC_Controller.cs is a working example of AI using code.
     
    StayUpLate likes this.
  4. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    Also; make sure to uncheck the number key sync on the NPC. Otherwise the NPC will mirror your weapon (un)equip :D

    @Tryz I'm trying to talk to a child GameObject of the M4 rifle during runtime. I'm talking to the cloned M4 from within the guncore.cs.

    Right now I can talk to the component using

    Code (CSharp):
    1. GameObject myM4 = GameObject.Find("mycharacter/hip/arms/blabla/m4(cloned)/piece");
    but what I did there is too hardcoded for NPCs or other PC's to be able to use the gun core. Is there a soft reference to the cloned weapon under the 'current' character, no matter it's name or bone structure?
     
  5. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    A few bullet impacts and an intense muzzle flash will give some extra spice to shooting :D What do you guys think? Too much muzzle effect or right in the sweet spot?

     
    Tryz likes this.
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    That is crazy awesome! I love it. :D
     
  7. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    You can grab it from the "Instance" property of the inventory item.


    Here's some example code:
    Code (CSharp):
    1. mInventory = gameObject.GetComponent<BasicInventory>();
    2. BasicInventoryItem lItem = mInventory.GetInventoryItem("Rifle_01");
    3. GameObject lRifle = lItem.Instance;
     
    StayUpLate likes this.
  8. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    Thanks Tim! :D That seems like it would do the trick!

    Got random tracer bullets (1 in every x rifle shots is a tracer, very cool in low light!) working as well. Just need a decent glowing tracer "bullet" prefab, if anyone has a spare one.. Wrote the code myself so I can share this one as well once it looks decent.
     
  9. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Kia ora

    Taken me a while, (hell was Jan 2016 time flies when ya having fun (or not) lol) not sure if you remember your good deed a while back, (what goes round come around man) BUT I did not forget mate. I picked up the motion controller and the pack fo go with it, 6 assets all up (might need the bone controller yet). now to get into it and try making an Elder Scrolls style setup.
    Watched some videos to preview whats what, will be watching again a few times I'd say. not sure you have a setup for a first/third person with a scroll camera distance in third person (eg: Elder Scrolls, Morrowind, Oblivion, Skyrim) so the player can very the camera distance in closed spaces. closet to what I'm after is the adventure mode I think, not quite there but I guess it doable to make what I'm looking at
     
    Tryz and Mark_01 like this.
  10. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    91
    Thanks!
    I have a new question(probably more to come :D), I want to match Rigidbody objects movement to character movement to simulate character pushing or pulling an object. The approach I'm considering is to take characters current velocity and apply it to rigidbody object.
    Problem is I'm a bit lost in all the movement/velocity variables and when do they get applied to character. What's the best way to grab players velocity and apply it to same object at the same time? What I tried was using mMotionController._ActorController.Velocity in LateUpdate but I think I got either variable or update time wrong.

    Or is there a better way to approach this?( I already tried joints, but I can't use fixed join due to slopes, and others are just too unpredictable)
     
  11. YCE2010

    YCE2010

    Joined:
    Jan 23, 2013
    Posts:
    26
    Try disabling shooting by mouse click and put the code to shoot in a button.
    In my case just works if I didn´t use the InputSource in Motion Controler (the Input Source field of Motion Controller component empty). If I use the InputSource, when I press the button to shoot my weapon moving all the time but didn´t shoot. I hope this help you.
    Best regards and thanks.
     
  12. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    So, if I understand correctly; you want your NPC to shoot his gun only when you click on a UI button, not on Unity's default Fire1 (Left mouse) which Ootii controller also uses? You say your custom code lives attached to that UI button; and that it works fine when you do not specify the InputSource on the MC? If you specify the InputSource, your weapon won't shoot but the gun does move around?

    The first thing that comes to my mind is: Who/what is controlled by what? I'm guessing the NPC has to be able to walk around on it's own without a player giving it input. This can be done by setting him up with the motion controller (and some packs if you want to) and checking the "Use Transform" like this:

    ac.png

    In the Motion Controller, you have make sure to UNcheck the 'find' boxes in the bottom right on this screenshot:
    mc.png

    Now you can use a solution to your liking to move/animate this NPC to your desires. You can for example make it a navmesh agent and follow waypoints or gameobjects, hook up NodeCanvas and create some AI nodes, Playmaker, etc, or just write your own :)

    The shooting from the UI button could then call the attack motion (not sure what it was, I think it's a few posts above me here). So the only thing that's being controlled on the NPC is the attack motion; by your UI button. NPC's movement will be based on your script/nodes/etc.
     
    Tryz likes this.
  13. YCE2010

    YCE2010

    Joined:
    Jan 23, 2013
    Posts:
    26
    I'm sorry, it seems I did not explain it well, maybe for my English. The problem is exactly as you say but with the player, forget the NPC. The button is for shooting with the player.
    Best regards and thanks in advanced. I will appreciate any help.
     
    Tryz likes this.
  14. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    If you want to be able to shoot without an input listener you can activate the shooter attack motion via code. I believe Tryz posted a code snippet on one of the previous pages. Though there are lots of scenario's and I'm not sure of the details of your scenario. Maybe you can post a quick video or some screenshots?
     
  15. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    I'm aiming (lol) to change my single-click targeting to a 1st person ACOG zoom, and holding the targeting would just use regular 3rd person targeting.

    Anyone ever done this or have a good idea for a starting point? Brackeys has a tutorial about this, but he starts from 1st person and just hides the gun on zoom. I think with the camera controller it starts out a little different?

    something like this:

    OWIUIYb.jpg
     
    Last edited: Sep 20, 2018
    Tryz likes this.
  16. paifu

    paifu

    Joined:
    Jul 15, 2012
    Posts:
    21
    Hello, is it possible to create some shooting magic wands with one of the motion pack ? If yes witch one should I buy for that? Shooter or Archery?
     
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Exactly.

    I think I understand now. :)

    For the player, you can use the code I mention and disable the mouse-press shooting by changing the "Attack Alias" to blank.



    Now he won't shoot when pressing the left-mouse-button, but will shoot with the button click on the GUI.

    I hope I'm closer to what you want. :)
     
  18. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Hi. Yes. :)

    For example, the Spell Casting Motion Pack has a Magic Missile example and I've seen people change the spell to shoot from a staff. Depending on your needs, you might need to create a custom node, but you can do a lot with what I have.

    With the Shooter pack, you could also create a 'gun' style wand by changing out the Muzzle component and Bullet prefab. I think this approach would be better if you're looking for a machine-gun style of shooting.

    I would lean towards the SCMP unless you really need that ultra-fast firing.
     
    mandisaw likes this.
  19. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    I do remember. :)

    It's definitely doable by swapping out the active motions and camera motors. I do something similar with holding the right-mouse-button where I go into over-the-shoulder aim mode. Try out the default "Adventure" mode with targeting activated.

    Check out this post I did on 1st person games too. I think it will help explain some things you'll have to design for.
    First Person Considerations
     
  20. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Hey @Hellwaiker ,

    That code is exactly right. However, I turn that into Unity Units (meters) per Seconds. So, the value is set like this:

    Code (CSharp):
    1. mState.Velocity = (lFinalPosition - mPrevState.Position) / Time.deltaTime;
    If you multiply that back to per-frame velocity, it should work.

    If that doesn't work, email me directly with some examples of the data you're seeing and I might be able to help more. Email tim@ootii.com.
     
  21. paifu

    paifu

    Joined:
    Jul 15, 2012
    Posts:
    21
    Thanks for the quick reply Tryz, I am currently dropping UFPS that I used before in my project because it wasn't well adapted for my 3rd person project with an over shoulder view and was desperately looking for a better solution.
     
  22. ve110cet

    ve110cet

    Joined:
    Dec 11, 2017
    Posts:
    10
    Hi Tim,

    I recently purchased your Motion Controller and I have to say it's awesome! I've been recommending it to a number of my dev friends and intend to purchase your other assets as I need them. I'm trying build a new motion and have a few questions/issues. I'm not sure what the etiquette is on this forum (do you prefer one question per post?) but here are a few questions for you:
    • Within the ActorController, you've got a collision overlap, I have a number of checks that I want to do for my TestUpdate(), but I want to make sure that something is within the collision overlap before doing them. Is there a way of accessing it? Or is this even the correct way of doing it?
    • Is there any way to turn off grounding for the duration of the motion? There's a motion that I'm working on (wall running) that I want the player to be able to do near the ground, isGrounded seems to be messing this up. The problems are:
      • When the character starts the wallrun while grounded, it starts the animation but won't move in any direction. By testing a bunch of stuff, I've figured out that this happens if the character is too close to the ground. I've put in a hack while creating this where it starts the character above the grounded check distance. I want to fix this properly and disable grounding until deactivation if possible.
      • I'm not sure that disabling grounding with fix this next one: The motion deactivates when the character runs to a place where there is no wall anymore (done with a raycast), the character is stuck in last animation state rather than exiting into WalkRunPivot or falling states. This only occurs when the player is near the ground and I'm assuming this has something to do with grounding. Any height above 0.3 units and the state will properly transition into JumpFallPose. I've tried unchecking Force Grounding in the Actor Controller, but that had no effect.
    • Is there anywhere I can look up how mRotation and mMovement are evaluated? When I'm using those for transformations, some weird stuff can happen. For the moment, I'm just using AC.SetPosition() and AC.SetRotation().
    • Does a list of all the Unique Phase IDs for the states/animations exist somewhere? I think that would be useful for comparison and planning my own unique identifiers so that I don't overlap with ones you've already created.
    Again, amazing product and thanks in advance for all your help!
     
  23. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    441
    A little friendly reminder, still no emergency but just confirming my issue is still on your list :)
     
    Tryz likes this.
  24. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    332
    MC_PM.jpg

    Some people have asked me if I can do actions for Slate Cinematic Sequencer, and here they are.

    Screenshot_2.png

    -- EquipMotionControllerWeaponSet (Equip Motion Controller WeaponSet) Note: You can use a WeaponSetIndex (int).
    -- SetMotionControllerCursor (Set the Motion Controller Cursor During Cutscenes) Note: You can Enable or Disable.
    -- SetMotionControllerInput (Enable or Disable Motion Controller Input During Cutscenes)
    -- StoreMotionControllerWeaponSet (Store Motion Controller WeaponSet During Cutscenes)

    Screenshot_3.png

    If someone still wishes just say a quick note.

    My Playmaker Actions for Motion Controller you can found in the Vault, or at Github.
    I will move later this actions to github too.

    Changelog:

    V1: Relase
    V2: Massive Code Cleanup
    V3: Move to ActorActionClip
    V4: Fix Mistake
    V5: Fix Mistake
    V6: Small Improve & Rename
    V7: Change Path to "Assets/ParadoxNotion/SLATE Resources/Extensions".
     

    Attached Files:

    Last edited: Sep 23, 2018
    Tryz, TeagansDad and StayUpLate like this.
  25. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    Lovely stuff there Salja! Let's do something together soon :D I just bought Umotion as well so I'll be spending my weekend trying to create/mod jump+roll animations and some funky idles. I'm totally up for sharing any motions so I'll post a vid when I'm getting somewhere.
     
    Salja likes this.
  26. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    332
    Thanks :D Yeah i have UMotion too but never have the time to play around with it :D i play sometime ago around with Final IK and Motion Controller
     
  27. YCE2010

    YCE2010

    Joined:
    Jan 23, 2013
    Posts:
    26
    Hi and thanks for the quick replay, the problem persits. Look, add the code you mentioned to the player in a demo of Shooter Motion Pack, and disable the mouse-press shooting. Run the demo and try shooting using the button. You will see the problem I tell you. I did it and I got the same problem.
    Best regards.
     
  28. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Kia ora

    Am I right in asuming the correct way to go setting up a character if one has all the pacgaes in from video 1 through 6, 7, or 8. Sorry I jus get a bit of a disconect when videos are done showing featuers but not really done to give a correct workflow. I'm gonna starte with the challenger will use the custom packs, sword, bow and spell and as I have the camera controller and mount points not sure what my workflow should be. I got https://assetstore.unity.com/packages/3d/characters/humanoids/viking-ulf-109418 as a starter character who has some animation of his own to try out as well
    Jus need to get which/what order I should go about this. The guide is a little missleading, I don't know if I need both the motion controller and the actor controller or if motion controller as taken over
     
    Last edited: Sep 22, 2018
  29. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    I'd love to help you as well, but it's very difficult without actually seeing your setup to pinpoint the problem. Can you share anything with us?
     
    Tryz likes this.
  30. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    919
    The Actor Controller handles the lower level movement (moving the transform, collisions, etc), while Motion Controller manages the Animator states and character actions. When you add the MC component to a character, it automatically adds the Actor Controller for you.

    As for workflow, I'd suggest:

    • Add Motion Controller, pick one of the movement styles
    • Add Camera Controller, pick the 3rd person style
    • Set up the Motion Packs, I usually go: Sword & Shield, Archery, Spellcasting
    You'll need to tweak some settings once you're done, and Mount Points will need to be set up manually.

    Or, wait for the big update that is coming soon (once Tim has time to finish testing). I wrote a new Character Wizard that will do all of this for you with as little input as selecting a character model and pressing a button (except Mount Points, but I intend to add that in the future). ;)
     
    Mark_01 and Tryz like this.
  31. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    @TegansDad thanks a heap for your help, hopfuly I can customize things to get a Skyrim-ish style controller by the time
    I'm done. the idea is to be able to swap clothing/armours out too, oh and weapons
     
    Mark_01 and Tryz like this.
  32. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Hey @ve110cet , welcome. I'll try to hit each of your questions...

    A while back, Unity didn't have a way for its physics calls to ignore triggers. So, I created my version of the physics function (which use Unity's) to filter out triggers. Today that really isn't an issue. So, you can use Unity's normal overlap function (ie UnityEngine.Physics.OverlapSphereNonAlloc) for any extra collision calls you want.

    You'll also find their 'NonAlloc' versions are good because they don't create garbage. I use them as well.

    All that said, you're welcome to use my RaycastExt.SafeOverlapSphere function too. Just call it like any other function.

    Yes. I do that with climbing motions. Check out Climb_1m.cs Activate() function.

    I do have logic that will pull the character down to the ground. This way if you're running on steep terrain you don't move, fall, move, fall, etc. Instead we just keep running down. However, you can disable that too.

    I do this:

    Code (CSharp):
    1. mActorController.IsGravityEnabled = false;
    2. mActorController.ForceGrounding = false;
    3. mActorController.FixGroundPenetration = false;
    4. mActorController.SetGround(mClimbable.transform);
    First I get rid of the grounding and then I force the thing we're climbing on to be the ground. This way if it's rotating we'll rotate and climb too. You'll probably want to do this with the wall you're running on.

    Just remember to reset the values when the motion deactivates. :)

    Since you're doing a wall-run, you'll probably have to pull the character to the side in order to have them 'stick' to it, but the settings above should free you from the ground.

    Those values are local values for the frame. So, if you set the mRotation to 90-degrees of yaw, he'll rotate 90-degrees in a single frame. Typically you'll want to do something like mRotation * Time.deltaTime.

    That should fix it.

    Check the MotionController.cs at line 1154. That's where I use these values to change the MC's movement and rotation.

    I probably need to review these, but check the ootii Phase IDs here.

    When I give out a batch, I typically give them out in the 80,000 range and 1,000 at a time. I can block some for you if you want. It's always exciting to hear about others creating motions. :D
     
    mandisaw likes this.
  33. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    You rock! Thanks for sharing. :D
     
  34. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    I'll check that out. Would you mind emailing tim@ootii.com and mention this post? It be we're just missing each other.

    Also, please include your Unity Order ID in the email. That helps me track who I'm helping. :)
     
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Thanks for being patient! :D

    I copied my Teleport Self spell to a (New Teleport Self) and set that as my new spell. Then, I modified the spell to use:
    0 = Min Range
    20 = Max Range



    Finally, I moved my camera really high above the character and I could select the ground really close:



    In your post, you mention "because once set at 20 the cursor is locked 20 meters away". You want to set the first "Distance" value to "0" (that's the minimum range) and the second value to "20" (that's the maximum).

    Can you confirm that's what you did?

    The other thing is that it may be the camera doesn't let you look down 90-degrees on the character. I know I put that limit on some of my third person cameras in order to avoid the crazy spin you get at the south and north poles. In the picture above for example, that's as close as I can get because my camera stops the pitch at something like 80-degrees. I'm wondering if that could be the issue too.
     
  36. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Did TeagansDad's suggestions helps? He's definitely an MC pro.

    With Mount Points, you will be able to swap clothing, armor, and weapons. You'll just have to make sure the clothing fits your character's skeleton (ie bone names).
     
  37. notno

    notno

    Joined:
    Feb 19, 2018
    Posts:
    4
    Quick noob question: is there documentation for how to set up the motion controller and/or input source so that moving the mouse WITHOUT holding a button down will rotate the character and the camera? I'd like to free up the mouse buttons for actions. Thanks!
     
  38. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Hey @notno , In the Unity Input Source that's in your scene, change the "View Activator" property from "Right Mouse Button" to "None". With that, the camera and character will rotate without the need to hold a button.
     
    StayUpLate likes this.
  39. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    Try: On the input set trigger to NONE (in the option where you can choose between left or right mouse btn).
     
    Tryz likes this.
  40. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    :D funny. posted at the same time
     
    Tryz likes this.
  41. notno

    notno

    Joined:
    Feb 19, 2018
    Posts:
    4
    Thanks @Tryz and @StayUpLate. So prompt, and such a simple solution!
     
    StayUpLate and Tryz like this.
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    You rock! :D
     
  43. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    I must have missed somit I don't have an Animator, was the click setup buttons ment to create a default one?
     
  44. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    Clicking one of the Movement Styles on the Basic view of the Motion Controller will assign my default animator if one isn't set.

    You can find the default animator here:
    Assets/ootii/MotionController/Content/Animations/Humanoid/Humanoid.controller

    I always suggest copying it and making changes or setting up motion packs with the copy. Then assign and use the copy. This way when you update, I won't override your animator.

    As you setup motion packs per the documentation, I'll modify the character's animator controller to add the state machines as needed.
     
  45. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    I'm on hold now till I find how to fix a definition error that Aquas poped ove postprocessing that I have no idea how to fix
    I was fine saved reloaded later and blame Unity stopped due to code error, so I'll let you know how I get on later when I get stuff fixed. last run with my character I had her in a T post turning the direction I push the wasd keys and no movment
     
    Tryz likes this.
  46. StayUpLate

    StayUpLate

    Joined:
    Jul 29, 2018
    Posts:
    59
    Character moving around in T-pose could indicate that your character avatar is not correct for the character's bone rig or that you use animations which were targeted for a different avatar. It might also be an issue of humanoid vs generic avatar. This avatar is defined on the animator component of your character gameobject.

    When you imported your character into the unity project, in the 'Rig' tab did you get all-green bones on the rig and a checkmark at the "Humanoid" rig import? That is the phase where Unity creates an Avatar for that character based on its bone rig.

    This can be a burden to get right. An easy check is to see if your character can handle a (temporary) custom Animator Controller with 1 very simple animation in (there are free humanoid animations on asset store, or you can use the Unity third person controller from the standard assets as a quick reference.)

    If your character works with none of these animations; you might have to re-import the character into unity and see if it can be greenlit to Unity's "Humanoid" standard, or in worst case fix the bone rig outside unity first.

    I'm kinda assuming your character IS humanoid :D If not, forget about the humanoid part in my post and go for generic.

    This might help you out as well: https://docs.unity3d.com/Manual/ConfiguringtheAvatar.html
     
    Last edited: Sep 24, 2018
    Tryz likes this.
  47. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    332
    Playing around with some new Idea with ootii and Slate Cutscenes, the idea is to blend from gameplay to interactive cutscenes.
    Example, the Player runs into a Trigger (now we disable the input and enable the “Use Transfrom of AC”) the Character walks now alone to a point, if the cutscene is finish we make a nice blend back to the gameplay, thats will make a nice flow with ootii and slate.

    Is hardcore WIP i just play with some ideas



    But yeah will release soon :D
     
    Malbers, hoodoo, Tryz and 1 other person like this.
  48. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    The character I'm using is the Orc female from the Orc's package in the asset store I can how ever change to Eva Adventrure or one of the Elven Sisters, I also have the fantasy RPG pack from Infinity so I can use the male or female from that asset if the Orc's are not kosha
     
  49. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,353
    As long as those characters come in as a Unity "Humanoid Rig", they should work. Even the orcs. :)

    The key is that "Humanoid Rig" because that's what allows Unity to transfer animations from one character to another.

    @StayUpLate posted a Unity link and that's exactly right.
     
  50. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    441
    Hi Tim,

    I've got really weird results with this to be honest.

    I'm using the regular Camera + Cinemachine, MC Camera is set to the main Camera object itself (as Cinemachine just position the camera anyway)

    When I'm quite zoomed out with 2-20 or 0-20 I can move the cursor to 20m only on the bottom side. I believe it's because of the Camera angle it's 20m away from the Camera, and everything above my character seems too far so the cursor is blocked. The more I zoom in the more it's working.

    I am not in a 90 degrees angle in the top-down view, it's a bit like a "side top-down" like in a Diablo game

    An example:

    upload_2018-9-25_11-21-45.png

    In green I have the cursor working, in red not - My paint skills are not influencing the results!

    So I've set my max distance higher (to 30 or 40 for the tests) and there it works.

    Is there a way to calculate the distance from the Actor Controller instead of the Camera? Otherwise I think I'll be ok by setting a larger distance

    But then comes a little question: Is there a way to have a different cursor when the cursor position is out of the boundaries? I would use a "forbidden" cursor because right now it's just blocked virtually and the cursor disappear when it's out of range
     
unityunity