0 votes
asked in AimIK by
edited

Hello,

Because the aim transform of my character is not under the head bone hierachy (from the doc : "All bones need to be direct ancestors of the Aim Transform and sorted in descending order.") i didn't assigned the head into the bone's AimIk component. And also because i want my character to lookAt without aim sometimes, i combined these two components.

My questions are :

1) Is it a proper way to do (combining and let LookAt calculate the head)?

2) if both components are enabled, are the spines bones (spine 1, 2, and 3 are assigned to both components, only the head to LookAtIk) calculations overided by one of the component or is it a "mix" ?

3) is there an overhead (compute time) having these two component enabled at same time (i guess it depends of the answer (2) ) ?

1 Answer

0 votes
answered by (18.1k points)
 
Best answer
Hey,

You should have it like this:

1. AimIK with the spine and arm bones for aiming

2. Another AimIK with the neck and head bones (just 2 bones, don't worry about the performance).

3. LookAtIK for looking around when not aiming at anything. Blend it's ik.solver.IKPositionWeight in if you need it to look or just use LookAtController.cs (see the "Look At Controller" demo).

Make sure LookAtIK is updated first, then AimIK with spine and arm, then the head AimIK last.

So the 2 AimIK's would give you 2 targets - 1 for aiming and 1 for looking, so you can look around while aiming.

LookAtIK should only be weighed in when hot aiming any weapons, blend out the AimIK components too during that time.

Best,

Pärtel
commented by
Perfectly clear, thanks for your answer !

just wonder how to Make sure components are updated first, second and third..

Best
commented by (18.1k points)
You could just add the IKExecutionOrder component or disable all IK components in Start and call ik.solver.Update(); on each in LateUpdate.

Best,

Pärtel

Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.

...