User Tools

Site Tools


democap:behavior_ecbshowinteracthandles

ECBShowInteractHandles

Behavior showing interaction handles.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix showInteractHandles..

handles

List of element classes to use as handles. Allowed are only element classes subclassing from InteractHandleMoveClass.

  • Full name: showInteractHandles.handles
  • Type: string
  • Default Value: empty list
  • Example (*.deeclass)
    <list name='showInteractHandles.handles'>
      <string>InteractHandleMoveX</string>
      <string>InteractHandleMoveY</string>
      <string>InteractHandleMoveZ</string>
    </list>

handleSize

Size in meters of interact handles.

  • Full name: showInteractHandles.handleSize
  • Type: float
  • Default Value: 0.2
  • Restriction: At least 0
  • Example (*.deeclass)
    <float name='showInteractHandles.handleSize'>0.2</float>

Events

startInteract

Actor begins interacting with an interaction handle.

stopInteract

Actor stops interacting with an interaction handle.

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

Optional Behaviors

This behavior does not support optional behaviors.

API Documentation

Since DEMoCap Version 1.3

Use Cases

  • Show interaction handlers if object is selected.

Element Class Example

class MyElement extends BehaviorElementClass
  public var ECBBehaviorGuiPanels guiPanels
  public var ECBSelectable selectable
  public var ECBShowInteractHandles showInteractHandles
  func new()
    guiPanels = ECBBehaviorGuiPanels.new(this)
    selectable = ECBSelectable.new(this)
    showInteractHandles = ECBShowInteractHandles.new(this, guiPanels, selectable)
  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='ECBBehaviorGuiPanels'/>
  <behavior type='ECBSelectable'/>
 
  <behavior type='ECBShowInteractHandles'>
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <float name='.handleSize'>0.2</float>
    <list name='.handles'>
      <string>InteractHandleMoveX</string> <!-- only InteractHandle* classes allowed -->
    </list>
 
    <!-- in addition to '.handles' supports also this: -->
    <list name='handleSets'>
      <string>move</string>
      <string>rotate</string>
      <string>movehmd</string>
    </list>
  </behavior>
</elementClass>

Live Examples

You could leave a comment if you were logged in.
democap/behavior_ecbshowinteracthandles.txt · Last modified: 2025/03/22 19:29 by dragonlord