Transform Spring Component Breakdown
This is probably the main component you'll be using, and the one that will yield the most noticeable game polish results. Therefore, we recommend getting very familiar with this component. Also, getting familiar with this component will make using the other SpringComponents much easier, as this is the most complex one.
The spring will always need a FollowerTransform. By default, the current Transform will be assigned as the FollowerTransform. This component will take this FollowerTransform towards the different targets of the component using three different springs:
Position Spring: This spring animates the position of the FollowerTransform, allowing it to move towards the target position with a spring-like motion. It utilizes the Spring Vector3 type to handle the three-dimensional position.
Scale Spring: This spring animates the scale of the FollowerTransform, enabling it to interpolate smoothly between different scale values using a spring-like behavior. It utilizes the Spring Vector3 type to handle the three-dimensional scale.
Rotation Spring: This spring animates the rotation of the FollowerTransform, allowing it to rotate towards the target rotation with a spring-like motion. It utilizes the Spring Rotation type, which can handle complex rotational behavior.
Like all the Springs of the toolkit, these three springs in the TransformSpringComponent will have Force, Drag, Clamping, and all the expected features this document describes.
The target of this TransformSpringComponent can either be set by code if Use Transform As Target is false or managed automatically by the component if Use Transform As Target is true and a Target Transform is assigned in the Inspector.
Last updated