Menu
Lumberyard
Legacy Reference

Testing and Debugging Aim IK

You can verify that aim poses are working properly by viewing them in Geppetto with animation layers.

To view aim IK through animation layers

  1. In Lumberyard Editor, choose Tools, Geppetto.

  2. Click File, Open Character to load your character.

  3. In the Assets panel, under Animations, select an animation to assign to the base animation layer. For best results, choose an animation that the aim poses were built from.

  4. In the Scene Parameters panel, click the menu to the right of Animation Layers and choose Add. The new animation layer becomes your active layer.

  5. In the Assets panel, under Animations, select the aim pose animation to assign to the new animation layer. This layers the aim pose animation on top of the base animation.

  6. In the viewport, move the camera around and observe the character aiming towards the camera.

  7. Under the aim pose animation layer, you can adjust the Direction, X Offset, Y Offset, and Smooth Time.

You can adjust the following parameters for your aim IK animation layer.

Direction

Select the direction to snap the aim IK:

Camera – Provides navigation in the Geppetto viewport. The aim IK follows your camera's movements.

Forward – Points the aim IK forward. You do not have direct control of the aim IK.

Target – Exposes the Target Position parameter fields to set a location for the aim IK to point at.

X Offset

Applies an offset on the x-axis for the aim IK.

Y Offset

Applies an offset on the y-axis for the aim IK.

Smooth Time

Adjusts the time for the smoothness of the blend for the aim IK. The smaller the value, the more responsive the aim IK. The larger the value, the more delayed the aim IK.

Default value: 0.1.

Valid values: 0–1.

Target Position

Sets a location in xyz in the Geppetto viewport for the aim IK to point at. This parameter is only available if the Direction is set to Target.

Using the Aim IK Console Variables

You can use the following console variables for debugging aim IK.

  • ca_DrawAimIKVEGrid – To display the grid for your aim poses, set this console variable to 1. The green rectangle shows your individual aim pose frame extremes. As you move the camera around in the Geppetto viewport, you see a pink cube move around the grid to indicate which blend of the aim poses is being used. If you don't see a green rectangle or if you experience other issues, check the setup for the aim poses and the orientation of the joints in the skeleton in the .chrparams file.

  • ca_DrawAimPoses – To display the aim IK's raycast and post the debug information for the coordinates on the aim IK grid, set the ca_DrawAimPoses console variable to 1.

  • ca_UseAimIK – Enables or disables aim poses on a global level for debugging.

  • es_debugAnim EntityName – Displays the current state of a character in the animation system during gameplay debugging. This console variable contains information on all the animations that are being played, including the aim poses that are played with the base animations. The combination of the aim pose with the base animation might explain why certain aim poses are broken, for example if the combination doesn't match.

    The base layer also displays information about the blend weights and final influences of the aim IK and look IK, and whether or not the game is requesting this information.