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

Interactor - Interaction Handler (Advanced AAA Interactions)

Discussion in 'Assets and Asset Store' started by razzraziel, Sep 11, 2020.

?

Rate your level of interest please.

  1. Extremely interested!

  2. Considerably interested.

  3. Slightly interested.

  4. Not interested.

Results are only viewable after voting.
  1. Infamous-H

    Infamous-H

    Joined:
    Aug 15, 2019
    Posts:
    2
    Hello there-

    I am having issues getting this to work in my project. Looking to hire someone to set it up in our project along with some specific interactions that can be reused.

    All help is greatly appreciated
     
  2. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
  3. Toby31

    Toby31

    Joined:
    Jul 7, 2014
    Posts:
    70
    Hey Razz thanks for the response if you are referring to the Creating Targets, Pre sets and Adjusting Interaction Speeds video I've already gone through this and setup custom prefab targets based of the player rig and I'm still getting the error. I can see in the scene view interactor is showing the interaction it joins the line to the target but no cigar unfortunately. Do you have any other suggestions please?
     

    Attached Files:

  4. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @Toby31

    It says 0 21 on the last word of that warning message which means your character has 0 bone for interactions but your target has 21 bones. So something wrong with your setup.

    Did you added InteractorIK and adjusts its setting properly? Can you show the latest setup after my last suggestion?
     
  5. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    This is a super amazing project. Looking forward to 1.0 release. Would love it if you can drop videos of the progress to get us even more excited. Cheers.
     
    razzraziel likes this.
  6. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Thank you @EmeralLotus
    Unfortunately, I can't focus on this too much right now so that's why we don't see lots of updates frequently. Because I don't have a job and I am doing freelance jobs to make a living. Also, that's why I had to explain it on a popup window that shows up when you install Interactor but it seems no one reads that :)

    I was just saying at there, your reviews mean a lot to me, so if you like it, please review it because it really helps to move this tool to be developed faster. And if you don't like it, please send a message.

    Right now I'm planning a new update in January and I'll be sharing new content.
     
  7. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    Hi. I'm trying to integrate Interactor to my project. I've followed the tutorial videos and I had no problems creating interactions with the demo scene but I have failed to integrate it with my project. I'm using Horror FPS kit asset character controller and there should be no problems as it's a humanoid character.

    I've created two effectors, left hand and right hand and placed the Basic UI and Basic Input Interact and Interactor IK scripts to the character game object. I've created two interactable objects. One is a tv to point with a finger and the other one is a candle to pick up.

    In play mode Basic UI shows both of the interactable objects on UI and I can use mouse scroll wheel to select them. If I press use key (I changed the script to use U key instead of E key) or left mouse button nothing happens. I've also created prefabs for left and right hand. I suppose it's something simple I need to fix. I'm using Unity 2021.3.16f1.
     
  8. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @GreaserMonkey

    Sure, let me help you. First can you check common issues so we can be sure those are not the issue (Including the IK Pass one).
     
  9. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    Hi!

    Here are some screenshots from the setup:
    upload_2023-1-14_19-42-11.png

    upload_2023-1-14_19-7-7.png

    upload_2023-1-14_19-31-41.png

    upload_2023-1-14_19-34-21.png

    upload_2023-1-14_19-40-30.png

    Animator is not on the same root game object with InteractorIK so I now added Animator Callback and set the Interactor Ik point to the Heroplayer Interactor IK. I made those changes but it did not fix the problem so player characters hand did not move although object is detected to be available.
     
  10. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @GreaserMonkey

    Let me check if PlayMaker have any IK features since you have it. You can also check its IK options because if it modifies the ik parts (hands or feet), that can be the issue here. And you can try Interactor without Playmaker on your character to see results.
     
    Last edited: Jan 14, 2023
    GreaserMonkey likes this.
  11. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @GreaserMonkey

    Does Playmaker have any ik and avatar involved example scenes? Can't find it.
     
  12. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    It seems to have at least two Actions where it can get and set IK goal. I do not have those Actions in my project.
    upload_2023-1-15_13-1-57.png
     
  13. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    I disabled all the FSM's I have on the character and I also disabled the Animator component but that did not solve the problem.
     
  14. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @GreaserMonkey

    You can send me a small project to test it, with only necessary files. Or send an email so we can have a short live session and I can examine what's wrong. It is probably something you're missing or something you have as third party. But it is really hard to tell what from here.

    You can also strip down your character except character controller and animator components to try Interactor. Then add other components one by one while testing.
     
    GreaserMonkey likes this.
  15. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    Thanks! I'll test all those things and I'll get back to you with the results.
     
  16. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
    I created another project with just Interactor and Horror FPS Kit and I did not get the interactions to work. How would we go about if I'd send you the cleaned project? I already stripped the project folder with Asset hunter pro but it still has a few gigabytes of files. Most of them seem to be Unity's files.
     
  17. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
  18. GreaserMonkey

    GreaserMonkey

    Joined:
    Feb 10, 2019
    Posts:
    65
  19. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @GreaserMonkey

    I tried your project. It seems you didn't select the target types. And also your interaction areas were a bit tight so I used Auto settings instead.

    So you can fix your issue in just a minute like this.
     
  20. JoeGovi_HealthScholars

    JoeGovi_HealthScholars

    Joined:
    Jan 27, 2021
    Posts:
    5
    Hey there,

    I am looking for a solution for my interaction problem. The sequence of events would go like this.

    1. Pick up object (likely with one handed pickable)
    2. Use object on separate interaction in a different part of my room
    I couldn't find many prop interactions in the examples so looking for some tips with existing interactor systems.

    Thanks for a great asset.

    Joe

    Edit: For example I pick up a hammer(or whatever tool), walk to a different part of the room where I want to use the hammer on a separate interaction
     
    Last edited: Jan 18, 2023
    deltonHulbert likes this.
  21. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @JoeGovi_HealthScholars

    Unfortunately there is no interaction suitable for hammer use like in your example. Because there are too many possibilities based on objects and it is impossible to put them all.

    You can follow two different ways here. One is using animation files to get using hammer effect. So picking it up and dropping it will be handled by Interactor with precise hand movements. But using hammer will be a generic hammer animation that you'll activate when picked it up. For example there is a weapon in UnityArmature Example Scene that you can pick with E (Moves object to hand) or R (Leans down to pick it up). And then once you pick it up, you can switch to weapon using animation by pressing G.
    So at this point, you need your own control script(nothing fancy, just a basic controlling script would be enough) to handle if object got picked up by player, and if so, player would be able to switch object specific animations. I hope that gives the idea.

    Second way is creating your interaction type, which is harder but instead of generic animations, you can control hands accurately. You can watch its tutorial here.

    Also creating custom behaviours will be more easy with v1.0, by just using inspector. But right now it is still work in progress and will be available in 1-2 months minimum.

    Let me know if those helps.
     
  22. spicavrstudio

    spicavrstudio

    Joined:
    Jan 28, 2023
    Posts:
    2
    screenshot.png
    When playing an idle animation where the character is sitting, the position of the interactor is the same as when standing. So new interactions from a seated position are not possible. Any solution?
    I want the height or position of the interactor range to change depending on the posture of the character.
    Just a thought that came to my mind, but could I just assign an interactor to the spine rather than the object itself?
     

    Attached Files:

  23. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @spicavrstudio

    Actually that's a good point to consider and rework for effector positions. Current state is just considering static positions based on the settings on Interactor. It is more efficient but it is obvious it has some drawbacks in your case. I'll definitely consider updating it.

    For now, you can increase the ranges and angles on InteractorObject override for those interactions when you use them while sitting. That'll solve your issue of inability to interact when in a sitting pose. And I think it won't have any negative effect, and if you have, you can just toggle the override option of these interactions depending on your sitting and standing poses. Let me know if that helps for now.
     
  24. spicavrstudio

    spicavrstudio

    Joined:
    Jan 28, 2023
    Posts:
    2

    Thank you. I've increased the range to solve it. I will actively use it for interaction and combat with NPC in VR games, so as you said, I would be very happy if updates such as changes in the position and angle of the interactor according to the animation status or movement of the interactor around a specific reference point are planned. Thank you for your support.
     
  25. richardphong1

    richardphong1

    Joined:
    May 30, 2020
    Posts:
    6
    Hello.

    So I'm trying to get my character to push a button. I already know my character works with Touch/Still. How do I get my script to work such that when I press L2 my character will push the button? Is InteractionStates critical to getting that to work? Does StartStopInteractions() handle that kind of thing?

    I can see great potential with this asset on my project.

    Thanks you
     
  26. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @richardphong1

    Yes you can use StartStopInteractions() or you can call a specific interaction with StartStopInteraction(ThatObject) to use it. InteractionStates is something else that you don't need to worry about, it just works at the background.
     
  27. richardphong1

    richardphong1

    Joined:
    May 30, 2020
    Posts:
    6
    Thank you for responding. How should I get the interaction object from the button?
     
  28. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @richardphong1

    You can look at BasicInput and BasicUI scripts.

    Interactor checks nearby interactions, if it finds any, adds them to its list (interactor.intOjbComponents).
    BasicUI checks Interactor if there are any interactions in that list, if so it enables itself to show them. And sets object index with user input by selectedByUI (index counter of interactor.intOjbComponents list).
    BasicInput checks user input, if pressed calls StartStopInteractions().
    And StartStopInteractions starts the interaction on the list with index which is selectedByUI set by BasicUI.

    But it depends on your workflow.

    All current possible interactions are in interactor.intOjbComponents list. First you can check if your desired object is in that list, if so you can show an input text for user (Press L2), and when pressed send that object (InteractorObject) with StartStopInteraction(InteractorObject). Interactor will check if that interaction is exist and possible, if so it will start.

    Let me know if that helps.
     
  29. richardphong1

    richardphong1

    Joined:
    May 30, 2020
    Posts:
    6
    Is this more or less how it works? This runs in the update.

    private void Interact()
    {
    if (_isInteractPressed && _interactor.intOjbComponents.Count > 0)
    _interactor.StartStopInteractions(true);
    else
    _interactor.StartStopInteractions(false);
    }

    I'm having an issue with this. When I approach a button, my interact function doesn't do anything. It just automatically presses the button and keeps doing it until all interactions stop working. On the character, I'm using the default character controller with a rigid body on it
     
    Last edited: Feb 6, 2023
  30. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @richardphong1

    StartStopInteractions will start all interactions if they're in good position for each body part. If there are 5 interactions around you, and 3 of them are good (let's say two left hand interactions and one left foot), it will start the first left hand and the other left foot at the same time.

    True and false statements are for input type. False for body part IK interactions, True for mouse click distant interactions (Point & Click style) without any body parts.

    StartStopInteraction(IntObj) is for starting specific interaction with given InteractorObject.

    In your code, it is constantly calling StartStopInteractions().
     
  31. Toby31

    Toby31

    Joined:
    Jul 7, 2014
    Posts:
    70
    Hi Razz, I got it to work today by going back to the test and adding interaction object for Final IK. I missed this in the documentation thank you for your help it's greatly appreciated.
     
  32. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Glad to hear that!
     
    Toby31 likes this.
  33. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi Razzraziel,

    I also noted that there does not seem to be an example of how to trigger an interaction object by code in the documentation.

    But firstly, I am having issues with the Interactor not detecting the interaction object. Please note that I am not using the BasicUI and BasicInput (as I am in VR). Yet, I always obtain 0 object count with the code below in Update().

    if (ref_interactor.intOjbComponents.Count > 0) { interactOBJ_N = ref_interactor.intOjbComponents.Count; }

    Moreover, could you confirm if this is how one could trigger the 1st interaction object on the interactor list?
    if (interactStart == true){ref_interactor.StartStopInteraction(ref_interactor.intOjbComponents[0].interactorObject);}

    I think it would be very useful to have a basic script which would simply show the list of interaction objects in range using public variables (i.e., without the need for the UI script or input script) and with a few bools to trigger the 1st, 2nd or 3rd item on the list of interaction objects.

    Thanks!
     
  34. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Is the Interactor asset still being supported?
     
  35. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @SI_007

    Sorry for skipping your question, I moved my house this month so I wasn't active. Now I'm back to work.

    Yes, it is correct. You feed the interactor object with StartStop to start or stop its interaction. But also keep that in mind that it needs to respect the rules (range, angles, not being an interaction already etc).

    ref_interactor.intOjbComponents[0]
    Is this not ok with you to have a list of objects? You don't need basic input or UI scripts for accessing those. I'm a bit confused. But yeah there will be more public methods to control interaction flow on current update.
     
  36. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi Razzraziel,

    Thank you for your response and confirmation regarding the triggering of the action. Indeed, everything respected the rules (range, angles, etc.), but the detection was not registering. I ended up going back to just using FinalIK.

    I think my suggestion for a simpler way to get a quick overview of the available interaction object (whether it is presented as single objects or a list of objects, as long as it can be viewed on the script itself, without the need for the UI panel) and having a trigger example (a bool on that same script) would make it much easier for troubleshooting the basic mechanism and integrating it into our own particular setup.

    I do look forward to retesting your asset once an update is provided!
     
  37. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @SI_007

    If you had no detection at all, triggering may be the issue. Since Interactor uses OnTriggerEnter to register objects around you, either your player or the object need to have a Rigidbody. Otherwise it won't trigger and so it won't enter to that list unless you put it by scripting manually (AddInteractionManual(interactorObject)).

    And lastly you have ExtraDebugs component which tries to tell as much as it can about the specific interaction on screen real time with interaction states, rules etc. But if they're not registering, it won't show up in the screen as well. Unity Armature example scene has them as example.

    Let me know if Rigidbodies are the issue here because if they can't be registered, there is no way to debug it within Interactor because Unity can't detect it.



    Other than that, update will improve things as well. But the real deal will be v1.0.
     
  38. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Thanks for your help Razzraziel.

    From your further explanation, it might indeed be related to the requirement of having a Rigibody to register the available interaction objects, as I used a simple character. I'll certainly take another look at it next week to see if my registering issues could be resolved.
     
    razzraziel likes this.
  39. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Any ETA on v1.0? I've held off on using it until then.
     
  40. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @julianr

    Can't say anything about v1.0 but we'll have a good update in this month and currently I'm full time working on it. In the meantime, I'd like to hear what you wish to see most (since you held off) with email.
     
    julianr likes this.
  41. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I'll drop you an email. :)
     
    razzraziel likes this.
  42. richardphong1

    richardphong1

    Joined:
    May 30, 2020
    Posts:
    6
    Hi so I finally got it to work. However, I am wondering if there is a variable that allows me to know it is currently interacting with an object so I can disable movement.
     
  43. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @richardphong1

    Sure you can access all your effectors with the order you created them on Interactor.
    Let's say your first effector is Left Hand so its index is 0;

    Code (CSharp):
    1. interactor.effectors[0].connected  //bool to check if it is in interaction
    2. interactor.effectors[0].connectedTo //interacted InteractorObject
    3. interactor.effectors[0].connectedTarget  //interacted InteractorTarget
     
  44. dhishii

    dhishii

    Joined:
    Aug 22, 2018
    Posts:
    7
    Hi, I am trying to follow the tutorials to use this asset but I'm have some trouble.

    I am using Unity 2021.3.17 with Final IK.
    When setting up the Back Path, is there an option adjust it using the transform tool? I can only see the Targeted Path option.

    Also when setting up the grab, do you know why the hand target changes?
     
  45. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Hi @dhishii

    When you hold Ctrl (or Command) button you can select the path with cursor you want to edit. It only shows one path transforms which is the selected one. You can see more details in 03_InteractorPaths ExampleScene wall texts.

    Hand gesture may change because of your Match Source on InteractorTarget. If you assigned a different target there, it will change into it to optimize. But if it is empty, please try to reset InteractorTarget by right clicking on the component and adjust its settings again.
    Let me know the results.
     
  46. dhishii

    dhishii

    Joined:
    Aug 22, 2018
    Posts:
    7
    Thank you!
    The 03_InteractorPaths ExampleScene helped.

    For the Match Source on the Interactor Target, I tried resetting it and if I leave the Match Source empty, it will instantiate my interactor target, there. When I interact with the target, it moves my Interactor Target (MMO_Left_Hand_Torch) inside the character. Is this when the Match Source gets changed? I tried adjusting the transform of my Interactor Target but that didn't help.
     
  47. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @dhishii

    Yes if you leave Match Source empty, it will assign itself as the source, so you can assign itself for best practice if you won't use a shared gesture.

    Can you show that?
     
  48. dhishii

    dhishii

    Joined:
    Aug 22, 2018
    Posts:
    7
    Sorry, I forgot to upload the images. MS1 is shows the Interactor before interacting with it and MS2 is the interactor after interacting with it.
     

    Attached Files:

    • MS2.png
      MS2.png
      File size:
      2.1 MB
      Views:
      60
    • MS1.png
      MS1.png
      File size:
      2.5 MB
      Views:
      59
  49. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    @dhishii

    Oh, you mean in the hierarchy? I thought it was moving it to actually inside of your character in the sceneview, like in its 3d model.

    Yes, it makes the object you pick as child to your character, so it can move with your character and have relative rotations as expected.

    What happens to torch? InteractorObject is on it right? It should be the one which placed as child. What happens when you try to pick example scene objects?
     
  50. dhishii

    dhishii

    Joined:
    Aug 22, 2018
    Posts:
    7
    The Interactor Object is on the torch. It also gets placed as a child.

    When I pick up the demo objects, the hand position target will change to the direction of the character.
    In the video, the target hand position is on the opposite side. When I press "E", it changes it the correct direction.

    Is there a setting I need to change to have the hand position face the player?