Table of Contents

, ,

Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » ECBSceneObject

ECBSceneObject

Behavior for scene object elements. Scene objects have an optional name and are shown to the user in the project panel. Scene objects are persistable except the active motion capture actor which is not saved.

It is mandatory to add this behavior otherwise the user can not add an instance of this object to the scene.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix sceneObject..

name

Name to use for newly created objects.

addActorOffset

Offset relative to actor position to add new object to. Depending on what kind of object is added it is useful to place it on the ground in front of the actor or in front of the actor head. Value can be null to let DEMoCap decide what offset to use.

canHide

Object can be hidden. Set this property only to true if there exists one or more other behaviors able to show the object again. Otherwise the user can not show the element anymore.

editPanelNoBehaviors

Do not show behavior panels for editing. Only for use by MoCapActorClass. Do not set this to true unless you know what you are doing.

editPanelNoPhysics

Do not show behavior panels for physics. Only for use by MoCapActorClass. Do not set this to true unless you know what you are doing.

Events

This behavior has no events.

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

This behavior requires no other behaviors.

Optional Behaviors

This behavior does not support optional behaviors.

API Documentation

Since DEMoCap Version 1.3

Use Cases

Element Class Example

class MyElement extends BehaviorElementClass
  public var ECBSceneObject sceneObject
  func new()
    sceneObject = ECBSceneObject.new(this)
  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):

<?xml version='1.0' encoding='UTF-8'?>
<elementClass name='MyClass' class='GenericBehaviorElement'>
  <behavior type='ECBSceneObject'>
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <vector name='.addActorOffset' x='0' y='1.5' z='0.5'/>
  </behavior>
</elementClass>

Live Examples