Table of Contents

, ,

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

ECBToggleVisibility

Behavior adding support to toggle visibility of element and to reposition it. Positions element in front of HMD, hand point-at or custom origin matrix at fixed distance facing the actor. Optionally the up axis can be locked.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix toggleVisibility..

lockUpAxis

Look-up axis to use or null. Aligns object up axis with look-up axis if not null. Used for example on VR mirrors.

pivot

Pivot position to use or null. Object is shown at the pivot position and rotated until in the desired position. Used for example on teleporting to show actor orientation if teleported.

rotation

Rotation in degrees to use or null.

distance

Distance to pivot position.

lockZRotation

Lock Z-rotation. Aligns Z-axis rotation of object with user camera tilting. Used for example on VR menu.

scaleWithActor

Scale with actor scale. Applies actor scaling to behavior parameters like pivot position and distance. Used for example on VR menu.

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 ECBToggleVisibility toggleVisibility
  func new()
    toggleVisibility = ECBToggleVisibility.new(this, component)
  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='ECBToggleVisibility'>
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <vector name='.lockUpAxis' x='0' y='1' z='0'/>
  </behavior>
</elementClass>

Live Examples