Lumberyard
Legacy Reference

Using Look IK in Scenes

Lumberyard supports parametric-blending for automated LookIK that can be used to make characters look at targets at specific locations, even in different locomotion cycles. LookIK can be called using Flow Graph, Track View editor, the AI system, or from code. The Track View editor is mostly used for camera-controlled scenes, while Flow Graph is used in most player-controlled scenes.

The character with LookIK tries to look at the target as long as possible, then turns its head away. The spine, head, eyelids, and eyeballs are all animated to make the character look in the target direction.

To use LookIK in a scene

  1. In the Track View editor, right-click the applicable AnimObject character node, then click Add Track, LookAt.

  2. Double-click the timeline row for LookAt, then click the green marker.

  3. In Key Properties, do the following:

    • In Entity, select a target from the list.

    • In Target Smooth Time, enter a value. Good values for eyes are 0.1-0.2, for head 0.3-0.5, and for full body 0.7-0.9.

    • In Look Pose, select which part of the body aligns with the target.

To use LookIK in the Track View editor, the LookAt track is added to AnimObject node for the applicable character.

You can add multiple LookAt track keys. As soon as the timeline hits one key, the character aligns to the next key. If you want to reset LookIK, place an empty key in the timeline.

Using Flow Graph for Look IK in Scenes

You can also use the Animations:LookAt Flow Graph node to make a character look at a specific target or the player. Assign the character to the node and a target entity or set the Animations:LookAt node LookAtPlayer input to 1 and trigger the Start input to force LookIK on a character.