Skip to content

Using Aim IK in Unity 3D | version 3.0

Ehsan edited this page Aug 14, 2022 · 3 revisions

Aim-IK Wiki

How to use Aim-IK in Unity-3D?

Here are the following steps to using Aim-IK in Unity-3D:

  • At first, create a new project in Unity.
  • Add your Rigged model.
  • Download Aim-IK from the Package Manager or Aim-IK.unitypackage file.
    • If you downloaded Aim-IK.unitypackage file, go to Unity. In the Assets folder, press right-click and then click on Import package > Custom Package.... Then choose Aim-IK.unitypackage and click on Import button.
  • Now, Aim-IK is ready to use!
  • Select your model.
  • Press Add Component. Follow Scripts > AimIK.Behaviour > Aim IK Behaviour 3D.
  • In the Aim IK Behaviour 3D script, you see some properties.
  • In the Target property, select the target object.
  • In the Head property, you see these options:
    • In the Bone option, select the head rig (NOTE: Be aware to don't add the head model! You must add the head rig).
    • Another option is Position Offset. You can use it to set the eye position offset to the character's head.
    • The next option is Rotation Offset. You can use it to set the rotation offset to the head.
    • By using the Limit Rotation option, you can set a limitation on the head rotation in each axis between two Min and Max variables. So if you want to limit the head rotation in the z-axis between two Min and Max variables, you can use the Head > Limit Rotation > Z Axis option (NOTE: If you want to limit the rotation, enable Is Limit Rotation check-box).
    • The last option is Gizmos. It draws an eye-line in the editor menu to the target in order to show the aim direction (NOTE: If you want to draw gizmos, enable Is Show check-box).
  • In the Spine property, you can add an array of spines. All the options are the same as the Head property.
  • And the last property is Smooth Look At. By enabling it, the character looks at the target smoothly (The standard value of Smooth Time is between [0, 1]. By increasing it, the character looks at the target faster).