Table of Contents

Class FlexalonRigidBodyAnimator

Namespace
Flexalon
Assembly
Flexalon.dll

If you add a Rigid Body or Rigid Body 2D component a gameObject which is managed by Flexalon, then the physics system will fight with Flexalon over the object's position and rotation. Adding a Rigid Body animator will resolve this by applying forces to the the rigid body component instead of changing the transform directly.

public class FlexalonRigidBodyAnimator : MonoBehaviour, TransformUpdater
Inheritance
object
FlexalonRigidBodyAnimator
Implements

Properties

PositionForce

How much force should be applied each frame to move the object to the layout position.

public float PositionForce { get; set; }

Property Value

float

RotationForce

How much force should be applied each frame to rotation the object to the layout rotation.

public float RotationForce { get; set; }

Property Value

float

ScaleInterpolationSpeed

Amount the object's scale should be interpolated towards the layout size at each frame. This value is multiplied by Time.deltaTime.

public float ScaleInterpolationSpeed { get; set; }

Property Value

float

Methods

PreUpdate(FlexalonNode)

Called before the layout system starts updating any transforms. Use this to capture the transform position.

public void PreUpdate(FlexalonNode node)

Parameters

node FlexalonNode

The node being updated.

UpdatePosition(FlexalonNode, Vector3)

Called to update the position of the object.

public bool UpdatePosition(FlexalonNode node, Vector3 position)

Parameters

node FlexalonNode

The node being updated.

position Vector3

The computed local position of the object.

Returns

bool

UpdateRectSize(FlexalonNode, Vector2)

Called to update the rect of the object.

public bool UpdateRectSize(FlexalonNode node, Vector2 size)

Parameters

node FlexalonNode

The node being updated.

size Vector2

Returns

bool

UpdateRotation(FlexalonNode, Quaternion)

Called to update the rotation of the object.

public bool UpdateRotation(FlexalonNode node, Quaternion rotation)

Parameters

node FlexalonNode

The node being updated.

rotation Quaternion

The computed local rotation of the object.

Returns

bool

UpdateScale(FlexalonNode, Vector3)

Called to update the scale of the object.

public bool UpdateScale(FlexalonNode node, Vector3 scale)

Parameters

node FlexalonNode

The node being updated.

scale Vector3

The computed local scale of the object.

Returns

bool