User Tools

Site Tools


democap:behavior_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.

  • Full name: sceneObject.name
  • Type: string
  • Default Value: empty string
  • Example (*.deeclass)
    <string name='sceneObject.name'>value</string>

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.

  • Full name: sceneObject.addActorOffset
  • Type: 3-component float vector
  • Default Value: null
  • Example (*.deeclass)
    <vector name='sceneObject.addActorOffset' x='0' y='1.5' z='0.5'/>

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.

  • Full name: sceneObject.canHide
  • Type: boolean
  • Default Value: false
  • Example (*.deeclass)
    <boolean name='sceneObject.canHide'>false</boolean>

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.

  • Full name: sceneObject.editPanelNoBehaviors
  • Type: boolean
  • Default Value: false
  • Example (*.deeclass)
    <boolean name='sceneObject.editPanelNoBehaviors'>false</boolean>

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.

  • Full name: sceneObject.editPanelNoPhysics
  • Type: boolean
  • Default Value: false
  • Example (*.deeclass)
    <boolean name='sceneObject.editPanelNoPhysics'>false</boolean>

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

  • Mandatory behavior.

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

You could leave a comment if you were logged in.
democap/behavior_ecbsceneobject.txt · Last modified: 2025/03/22 18:00 by dragonlord