Thank you for your interest in Interactor!
Interactor designed to cover all aspects of any kind of interaction, from the designing stage in the editor to handling complex interactions in runtime. It contains editor tools to simplify the process of preparing a fully interactable environment and boosts creativity in terms of interaction freedom. And in runtime, it handles which player parts are going to interact with which parts of the interacted object, while using its own IK (or Final IK) to animate player bones.
If you have any questions that are beyond the scope of this documentation, please feel free to contact me.
Interactor installation is easy. Just import into your project (import Final IK first if you wish to use integration with that).
It needs a “Player” layer for raycast operations. Create a new one if you don’t have Player layer and assign your player to that layer. This will prevent conflicts while spawning new targets on SceneView and Runtime camera rays for distance objects to interact. Otherwise, player triggers & colliders will block those raycasts.
Change your Color Space to Linear on "Project Settings > Player > Color Space". This is for getting some materials to look correct in example scenes. Otherwise, it is not necessary.
How Does It Work
After Interactor being added to the player character, you need Effectors for each interactable player part. You can add as many effectors as you need onto your character. Effectors need to be positioned as they are the root of interactable parts so this way you can properly adjust their range and angles.
It's quite easy to set positions for effectors and you can place them exactly where you want them to be, with custom made gizmos.
One Trigger to Rule Them All
When an interaction object enters Interactor’s trigger (player’s interaction trigger from now on), effectors start to check that object’s targets which are children of it. Target has another component (InteractorTarget (InteractorIK) or InteractionTarget (Final IK’s class)) for interaction and it has effector type property and some override settings for range & angles. Effectors check those types to get a match and then check their positions to see if the interaction is possible.
If the interaction is possible, the effector goes into a possible state and activates that interaction object. From that moment it is possible to interact with object automatically or with player input (depending on interaction type) until the object’s target position stays in range & angles. On the animation side, it’s InteractorIK’s or Final IK’s turn. Interactor sends an interaction start call for that specific player part and its target.
Interactor has three main components:
Itself which operates its effectors and interactions,
InteractorObject which handles the interaction object’s side, caches its values & targets for being used in Interactor and helps with interactions,
InteractorTargetSpawner which plays a big role in the designing stage as a target prefab holder and spawning them in the scene.
First, you need to prepare some prefabs to work with. These are regular player parts with specifically rotated to fit desired interactions. For example a grabbing hand, finger pointing, etc. It’s really easy to prepare them and it’s just a one-time setup.
Select your body part and duplicate it in the scene. Assign InteractorTarget (InteractionTarget for Final IK) script on it. Select the effector type and other settings on the target script. Set its position to (0, 0, 0) and bone rotations as you wish. Drag it in the project folder to make it prefab and done, you have your first prefab. Make a list of selection for each effector type & body parts. Assign them on InteractorTargetSpawner to add them on SceneView right click menu. Now they can be spawned anywhere and anytime on any object you want. Only InteractorTargetSpawner window needs to stay opened (It can stay as deactivate tab on any place in the editor) for activating the right click menu in SceneView.
Besides of right click menu, also Effector Settings menu on SceneView also needs InteractorTargetSpawner window to be opened. Once you created effectors on the Interactor component, you can edit them on there or with SceneView Effector Settings window. Effector Settings menu can be used in fullscreen SceneView (Shift + Space for default shortcut while cursor on SceneView) for maximum effectiveness.
So you have effectors and targets on the scene. While spawner targets in the scene, there is an option on InteractorTargetSpawner to add components. It will add InteractorObject on the spawned target’s parent. InteractorObject operates interaction object’s settings (On Final IK you also need InteractionObject on objects). You can select interaction types and have a lot of options to make tiny adjustments on interactions. More information can be found at InteractorObject component page.
This is the basic workflow of the Interactor. You can find more information for each component at Interactor Components section and some more tips at the Tips section. Also, don’t forget to watch tutorial videos, it’s a lot easier to follow steps while watching.
This is how Interactor and other scripts communicate. It will be improved and some unnecessary scripts will be removed with upcoming updates.
Click on gif to see fullscreen image.
This section explains the UI workflow, not the settings one by one. For that, you can read the Interactor Components for each one of them.
Interactor has the heaviest editor script in all of the components that come with the package. It handles SceneView custom gizmos as well as the tab selection and drawing a good looking UI. It almost works as fast as regular Unity Inspector components (On Unity 2020 regular Inspector component takes 0.15-0.20ms to complete it’s editor loop, while the main Interactor UI is taking 0.25ms average). And all windows have zero effect when the mouse cursor is not on them. But still, Interactor designed to work without the need of its main component to be selected. You don’t even need to see Interactor UI to work with. You can use the SceneView menu or SceneView handles to edit effectors. Interactor is needed just for adding new effectors and some one-time setups (Assigning Self Interaction object etc). And also if you’re not working with a really really tight performance budget while profiling on Editor (It doesn’t even make sense), you don’t need to worry about anything.
Interactor, InteractorTargetSpawner and SceneView Effector Settings UIs are working in sync. If you make any changes, other UIs will show results at the same time. Also, almost every change can be undone with Alt + Z or Undo selection on editor.
For information about settings, see Interactor component section.
Interactor Target Spawner
For information about settings, see InteractorTargetSpawner Window section.
Interactor SceneView Menu
For information about settings, see InteractorTargetSpawner Window section. SceneView right click menu and Effector Settings windows are connected with InteractorTargetSpawner.
You will find examples for every interaction type in example scenes. There will be more examples in those scenes when new interaction types added.
It’s a good playground the see how everything works. Some interactions can interrupt each other and that can cause some glitches (trying to climb ladders while using the bike etc) but it’s not a polished game in the end. But mostly I set controls/conditions for such glitches and it will be better with time since I’m also using Interactor in my game.
Models & Textures
Most of the 3D models are modeled & painted by me. While adding new interactions, I will also add new models to play in new ways. All of the textures are PBR and available in 4K but Interactor comes with 2K textures to keep the size as small as possible (so updates would be easier). You can download the 4K texture pack from here. Once you imported the package, all textures will change with 4K versions, no extra procedure needed, just import and done.
I included some bonus shaders. Outlines Shader is directly used in examples because it controls the interacted object’s material but others are mostly cosmetic. Shaders are written just for Built-in Render Pipeline so probably they won’t work in HDRP or URP. But they are not necessary for Interactor, as I said they’re just bonuses. Besides the shaders, Interactor will just work the same as Built-in RP for Scriptable Render Pipelines (HDRP and URP). You will find these shaders under the Interactor menu in shader selection for materials.
Cloth shader has a transmissive feature and lets light pass through. So the object shadows can be seen from both sides of the cloth. It has Albedo and Normal map slots and Specular & Gloss sliders to adjust the material. The transmittance amount can be adjusted and there is a rim effect that glows the whole object with the selected color.
Fake Volumetric Light Shader
FakeVolumetricLights used in the ProtoTruck example scene and they create a basic fake volumetric light effect for turret lights. They used on a cone object to look like a light beam. You can play with settings to get the desired look that suits your projects.
Hologram shader is used for creating an old terminal screen effect. It has properties for setting the old tv scanlines, glitches, flickering and more. It can be used for any kind of project.
Standart Metallic Outlines Shader
Outlines shader is the main material for interaction objects in examples. When objects get activated their properties adjust its glow to notify the user. It has two different glowing options and they can be set with different colors as well as with different widths. I scripted it to look exactly the same with Unity Standart Metallic shader so when not glowing, it will just look exactly the same with Standart materials.
3D Text Shader
3DText shader and SceneText shaders are used for some text objects in scenes. 3DText is for the console’s display frame to show values.
Script Reference & Dependencies
You will find scripting API and component's dependencies in Interactor Components page. Components have their API references under their own sections.
Currently, there are three versions of Interactor. When you import, it comes with DefaultPack (InteractorIK) and you can convert between DefaultPack and FinalIKPack (Final IK integration) on the Interactor component at any time with just a button click. To do so, add the Interactor component on any hierarchy gameobject and you’ll see the integrations section on newly added Interactor. If you already have Interactor with effectors added, just reset it to see its front page (Integrations section only appear on the front page without any effectors added).
All of the interactions work mostly the same between InteractorIK and Final IK. But since Final IK is a whole different package with more capabilities, it’s a better solution for interactions. For example, some of the interactions need body parts to go beyond their boundaries, in that case, Final IK can pull or push the whole body hierarchy to adjust that. But InteractorIK is Two Bone IK system depending on Unity IK. It can only affect hands & feet and their two parents (Forearms & arms or Uplegs & legs). So for example picking objects from the ground is not possible with just those bones without affecting whole body. When InteractorIK needs to out of it’s IK part boundaries, it will just stay at the boundary at most where it’s two parent bones would allow.
But both IK solutions mostly do their jobs and works pretty same. Maybe in the future updates, I would replace InteractorIK with a Full Body IK solution.
InteractorIK & Final IK
What actually integration change buttons do?
Default and Final IK integration buttons unpack and imports necessary scripts. Some of them are replacements and some of them are exclusive to themselves.
Those files/folders get replaced by their respective package.
Those files are added from their respective package while deleting other package's files.
Also Final IK button checks for Final IK’s two interaction scripts and adds two overloaded methods (if not added before). Those methods do and change nothing for Final IK itself, so no need to worry about it.
CorePack & Examples Removal
Also, there is CorePack which has only core features without any example scripts. It’s for users who want only core Interactor features (Interactor, Spawner, SceneView menus, etc) without any interaction examples. So you’ll need to write your own interaction types by yourself. This will also remove the whole examples folder for you. Do not delete the Examples folder by yourself because it has example scripts tied with Interactor. If you don't need examples, use Interactor's Delete Examples button to convert to the Core version. You can delete everything in the example folder except the example scripts folder. Just move them inside the main scripts folder before deleting the examples folder if you wish to use interactions. Example scripts are not modular right now.
As a last reminder: DO NOT run these packs by yourself, use Interactor (add Interactor to any scene object and select at Integrations section). Because some files need to be deleted and Interactor handles that for you.
Unity Animation Rigging
Unity Animation Rigging package is also another IK solution for users. It has been in development for some time and still in development. It’s a great companion for Interactor. It has tools to animate bones and Interactor has tools to tell which bones needed for what kind of interactions. They complement each other, Animation Rigging package is a great replacement for InteractorIK. But since it’s still in the preview stage and in early development (which means it’s not ready for production), it will be wise to wait a bit longer. It also uses the Burst package (another preview package in development) which makes it not suitable for most users.
Tips will be here shortly.
Known issues will be here shortly.
Future ideas will be here shortly.
You can reach me with several options. All of them will be responded as soon as possible (mostly on the same day).
You can follow the official forum thread on Unity Forum and reply a post so others can read too.
You can start a private conversation with me on Unity Forum.
And you can send an email to me.