-
Notifications
You must be signed in to change notification settings - Fork 25
Using Aim IK in Unity 3D | version 3.0
Ehsan edited this page Aug 14, 2022
·
3 revisions
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 theAssets
folder, press right-click and then click onImport package > Custom Package...
. Then chooseAim-IK.unitypackage
and click onImport
button.
- If you downloaded
- Now, Aim-IK is ready to use!
- Select your model.
- Press
Add Component
. FollowScripts > 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 twoMin
andMax
variables. So if you want to limit the head rotation in the z-axis between twoMin
andMax
variables, you can use theHead > Limit Rotation > Z Axis
option (NOTE: If you want to limit the rotation, enableIs 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, enableIs Show
check-box).
- In the
- In the
Spine
property, you can add an array of spines. All the options are the same as theHead
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).