CS::Animation::iSkeletonLookAtNodeFactory Struct Reference
Factory for the 'LookAt' animation node. More...
#include <imesh/animnode/lookat.h>
Detailed Description
Factory for the 'LookAt' animation node.
This node can control a bone of an animesh in order to make it look at a target. The direction to look at is defined by SetDirection().
There are three types of constraints that will modify the 'LookAt' control:
- Whether or not a CS::Animation::iBodyBoneJoint for the bone controlled has been defined (see SetBodySkeleton()).
- Whether or not SetAlwaysRotate() has been set.
- The maximum rotation speed allowed through SetMaximumSpeed().
This animation node can manage by itself the transitions while changing the current 'LookAt' targets, therefore it doesn't need to be blended in and out.
This animation node uses only the pitch and yaw (ie rotations around X and Y axis) in order to achieve the look at the target, the roll is not used.
Definition at line 71 of file lookat.h.
Member Function Documentation
Return the child animation node of this node.
Get the direction to look at, in bone space.
Set whether or not the LookAt must still be kept even if the target is not reachable.
The default value is 'false'.
Set the body skeleton that is used to specify the rotational constraints of the animated bone.
A CS::Animation::iBodyBone and a CS::Animation::iBodyBoneJoint must be defined for the bone animated by the 'LookAt' node. If skeleton is nullptr or if there is no CS::Animation::iBodyBoneJoint defined, then the animation won't have any rotational constraints.
The rotational constraints are specified relatively to the 'LookAt' direction defined through SetDirection().
Set the bone animated by this node.
Set the child animation node of this node.
The 'Lookat' animation node will add its control on top of the animation of the child node. The animation of the bone made by the child node may still be used, for example when the node is transitioning between targets, or when the target is not reachable.
It is valid to set a null reference as node.
Set the direction to look at, in bone space.
The Z axis should be aligned with the direction to look at, and the Y axis should be upward.
Set how many time delay must be waited before the listeners are called with the 'target lost' event.
This can be useful if the maximum rotation speed of the bone is slow regarding the target's movement. In this case it may prevent swapping continuously between 'target reached' and 'target lost' events.
- Parameters:
-
Set the maximum rotation speed while trying to look at the target (in radian per second).
A speed of 0.0 means that the movement is immediate.
- Parameters:
-
The documentation for this struct was generated from the following file:
Generated for Crystal Space 2.0 by doxygen 1.6.1