Class FBXConstraintBehavior
Implements
Constructors
constructor
-
new FBXConstraintBehavior(
constraint: FBXConstraintData,
_options: FBXConstraintBehaviorOptions,
): FBXConstraintBehaviorCreates the behavior.
Parameters
- constraint: FBXConstraintData
Constraint data extracted from the file
- _options: FBXConstraintBehaviorOptions
Resolved targets and scene information
Returns FBXConstraintBehavior
- constraint: FBXConstraintData
Properties
attached Node
Node the behavior is attached to
Readonlyconstraint
Constraint data extracted from the file
enabled
Set to false to pause the constraint without detaching it
Readonlyname
Behavior name (fbxConstraint: followed by the constraint name)
Methods
attach
-
Registers the behavior with the scene's solver, takes the node's current transform as the unconstrained value and solves the constraint once.
Parameters
- target: TransformNode
Node to constrain
Returns void
- target: TransformNode
capture Base
-
Takes the node's current transform as the unconstrained value the next solve blends from. The solver calls this after the scene's animations ran; call it yourself after writing a transform by hand.
Returns void
dependency Nodes
-
Nodes whose world transform the solve reads: the targets, the up node and the constrained node's parent.
Returns Nullable<Node>[]
The nodes, used by the solver to order constraints
detach
-
Unregisters the behavior; the node keeps its last solved transform.
Returns void
evaluate
-
Solves the constraint from the captured unconstrained transform and writes the node's local transform. Blends are relative to the value captured by
captureBase, not to whatever the node holds now.Returns void
init
-
Nothing to initialize
Returns void
restore Base
-
Writes the unconstrained transform back to the node. The solver calls this before the scene's animations run, so a node nothing animates keeps its unconstrained value between frames instead of the solved one.
Returns void
Babylon behavior evaluating an FBX aim, parent, position, rotation or scale constraint.