Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » 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.
This behavior can be used only once on an element.
Element class properties have the prefix toggleVisibility.
.
Look-up axis to use or null. Aligns object up axis with look-up axis if not null. Used for example on VR mirrors.
toggleVisibility.lockUpAxis
null
<vector name='toggleVisibility.lockUpAxis' x='0' y='1' z='0'/>
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.
toggleVisibility.pivot
null
<vector name='toggleVisibility.pivot' x='0' y='0.2' z='0'/>
Rotation in degrees to use or null.
toggleVisibility.rotation
(0, 0, 0)
<vector name='toggleVisibility.rotation' x='90' y='0' z='0'/>
Distance to pivot position.
toggleVisibility.distance
0.5
0
<float name='toggleVisibility.distance'>0.5</float>
Lock Z-rotation. Aligns Z-axis rotation of object with user camera tilting. Used for example on VR menu.
toggleVisibility.lockZRotation
false
<boolean name='toggleVisibility.lockZRotation'>false</boolean>
Scale with actor scale. Applies actor scaling to behavior parameters like pivot position and distance. Used for example on VR menu.
toggleVisibility.scaleWithActor
false
<boolean name='toggleVisibility.scaleWithActor'>false</boolean>
This behavior has no events.
This behavior adds no conversation commands.
This behavior adds no conversation conditions.
This behavior adds no behavior tree actions.
This behavior adds no behavior tree conditions.
This behavior requires no other behaviors.
This behavior does not support optional behaviors.
Since DEMoCap Version 1.3
class MyElement extends BehaviorElementClass public var ECBToggleVisibility toggleVisibility func new() toggleVisibility = ECBToggleVisibility.new(this, component) end end
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>