๐Ÿ”—Aligner

Overview

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.

How to Use it

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 so it plays the animation in the right direction/position:

To use it you need to call the function: Aligner.Align(Transform TargetToAlign).

Parameters

Position

Alings the Target to the Position of the Main Point.

(img)

If the Second Point is set, then it will align the Target to the closet point on the line made from both points

(img)

Rotation

Orient the target to the rotation of the Main Point.

Look At

Orients the Target to look at the Main Point Position.

(img)

Radius (Look At)

If Radius is greater than zero then the Target will be positioned also to the closest position on the radius created from the look-at.

(img)

Double Sided (Position - Rotation)

Allows the Target to Align correctly to a Double Side Position, and rotate correctly to the rotation of the aligner

(img)

Main Point

Main Transform to use as Position, Rotation and Look At values to make the Aligment

Second Point

Extra Transform to use as Position, Rotation .

Align Time

The time needed to make the alignment

(img)

Align Curve

Interpolation to make the aligmnent.

(img)

Angle Offset (Rotation - LookAt)

Adds an Rotation offset to the Rotation or Look At Aligment.

(img)

Last updated