Last updated
Was this helpful?
Last updated
Was this helpful?
Align the position and rotation of a Target Object to a gameObject with this component. Usually, this component is used by the Zones to align the Animal that uses it.
This only works when the animal is grounded.
Let's take the Chest Sample on the Demo scene: 1 - PlayGround Human (1 - Holsters) as an example. In this scene, when you approach the central chest, Steve will be aligned (Re-position and oriented_ so it plays the animation in the right direction/position:
To use it, you need to call the function: Aligner.Align(Transform TargetToAlign).
In the chest example. Whenever an Animal enters the Zone, it will tell the aligner to align the entering character to the correct position.
Align the Target to the Position of the Main Point.
If the Second Point is set, then it will align the Target to the closest point on the line made from both points.
Orient the target to the rotation of the Main Point.
Orient the Target to look at the Main Point Position.
If the Radius is greater than zero, then the Target will be positioned also to the closest position on the radius created from the look-at.
Allows the Target to align correctly to a Double Side Position and rotate correctly to the rotation of the aligner. This is useful when you want 2 different positions and rotations, when facing an aligner in a 180 direction.
Main Transform to use as Position, Rotation and Look At values to make the Aligment
Extra Transform to use as Position, Rotation.
The time needed to make the alignment
Interpolation to make the alignment.
Adds a Rotation offset to the Rotation or Look At alignment.
1.4.9