Match Transform Action

From Pummel Party Mod Documentation
Jump to navigation Jump to search
The Match Transform action. This example will Move a prop to a trigger. It will align the rotation on both the X and Y axes, but not the Z.

The Match Transform Action is an action that can move/rotate/scale one or more target Transform Components to match the values of another transform.

The benefit of using this Action over the Position Action, Rotation Action or Scale Action is its ability to target a transform, rather than specific prefilled values. If the values on the 'Transform To Match' change, such as the object getting larger or being moved, then this action will apply that same change to all 'Targets' the next time it is called.

Alternatively, this may be easier than using the position, rotation and scale actions if you simply need to move an object to a destination, as you don't need to know the exact position values of the destination. Instead, you can place an empty gameobject there, and match the object you want to move with the empty destination object using this action. This also gives you the ability to easily change the destination simply by moving the empty object.