{{tag>motioncapture democap behavior}}
[[:start|Start Page]] >> [[main|DEMoCap: Drag[en]gine Motion Capture]] >> [[democap:elementclasses|XML Element Classes]] >> ** ECBRecordAnimation **
====== ECBRecordAnimation ======
Behavior adding support to record animations. This behavior is requird to capture objects during motion capture.
====== Instance Counts ======
This behavior can be used only once on an element.
====== Element Class Properties ======
Element class properties have the prefix ''recordAnimation.''.
====== Events ======
===== prepareRecording =====
Motion capture is preparing to begin. The user is shown the prepare countdown.
===== startRecording =====
Motion capture recording started.
===== stopRecording =====
Motion capture recording stopped.
====== Conversation Commands ======
This behavior adds no conversation commands.
====== Conversation Conditions ======
This behavior adds no conversation conditions.
====== Behavior Tree Actions ======
This behavior adds no behavior tree actions.
====== Behavior Tree Conditions ======
This behavior adds no behavior tree conditions.
====== Required Behaviors ======
* [[dragengine:modules:dragonscript:behavior_component|ECBehaviorComponent]]
* [[behavior_ecbcapturedanimations|ECBCapturedAnimations]]
====== Optional Behaviors ======
This behavior does not support optional behaviors.
====== API Documentation ======
Since DEMoCap Version ''1.3''
====== Use Cases ======
* Capture object animations during motion capture.
====== Element Class Example ======
class MyElement extends BehaviorElementClass
public var ECBehaviorComponent component
public var ECBehaviorCollider collider
public var ECBBehaviorGuiPanels guiPanels
public var ECBCapturedAnimations capturedAnimations
public var ECBRecordAnimation recordAnimation
func new()
component = ECBehaviorComponent.new(this, null)
collider = ECBehaviorCollider.new(this, component)
guiPanels = ECBBehaviorGuiPanels.new(this)
capturedAnimations = ECBCapturedAnimations.new(this, guiPanels, component, collider)
recordAnimation = ECBRecordAnimation.new(this, capturedAnimations)
end
end
====== Behavior Factory ======
Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):
====== Live Examples ======