Class FlexalonRigidBodyAnimator
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.
Inheritance
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
FlexalonRigidBodyAnimator
Syntax
[AddComponentMenu("Flexalon/Flexalon Rigid Body Animator")]
[HelpURL("https://www.flexalon.com/docs/animators")]
public class FlexalonRigidBodyAnimator : MonoBehaviour, TransformUpdater
Properties
PositionForce
How much force should be applied each frame to move the object to the layout position.
Declaration
public float PositionForce { get; set; }
Property Value
RotationForce
How much force should be applied each frame to rotation the object to the layout rotation.
Declaration
public float RotationForce { get; set; }
Property Value
ScaleInterpolationSpeed
Amount the object's scale should be interpolated towards the layout size at each frame.
This value is multiplied by Time.deltaTime.
Declaration
public float ScaleInterpolationSpeed { get; set; }
Property Value
Methods
PreUpdate(FlexalonNode)
Declaration
public void PreUpdate(FlexalonNode node)
Parameters
UpdatePosition(FlexalonNode, Vector3)
Declaration
public bool UpdatePosition(FlexalonNode node, Vector3 position)
Parameters
Type |
Name |
Description |
FlexalonNode |
node |
|
UnityEngine.Vector3 |
position |
|
Returns
UpdateRectSize(FlexalonNode, Vector2)
Declaration
public bool UpdateRectSize(FlexalonNode node, Vector2 size)
Parameters
Type |
Name |
Description |
FlexalonNode |
node |
|
UnityEngine.Vector2 |
size |
|
Returns
UpdateRotation(FlexalonNode, Quaternion)
Declaration
public bool UpdateRotation(FlexalonNode node, Quaternion rotation)
Parameters
Type |
Name |
Description |
FlexalonNode |
node |
|
UnityEngine.Quaternion |
rotation |
|
Returns
UpdateScale(FlexalonNode, Vector3)
Declaration
public bool UpdateScale(FlexalonNode node, Vector3 scale)
Parameters
Type |
Name |
Description |
FlexalonNode |
node |
|
UnityEngine.Vector3 |
scale |
|
Returns
Implements