{{tag>motioncapture democap behavior}} [[:start|Start Page]] >> [[main|DEMoCap: Drag[en]gine Motion Capture]] >> [[democap:elementclasses|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. * Full name: ''toggleVisibility.lockUpAxis'' * Type: 3-component float vector * Default Value: ''null'' * Example (*.deeclass) ===== 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. * Full name: ''toggleVisibility.pivot'' * Type: 3-component float vector * Default Value: ''null'' * Example (*.deeclass) ===== rotation ===== Rotation in degrees to use or null. * Full name: ''toggleVisibility.rotation'' * Type: 3-component float vector * Default Value: ''(0, 0, 0)'' * Example (*.deeclass) ===== distance ===== Distance to pivot position. * Full name: ''toggleVisibility.distance'' * Type: float * Default Value: ''0.5'' * Restriction: At least ''0'' * Example (*.deeclass) 0.5 ===== lockZRotation ===== Lock Z-rotation. Aligns Z-axis rotation of object with user camera tilting. Used for example on VR menu. * Full name: ''toggleVisibility.lockZRotation'' * Type: boolean * Default Value: ''false'' * Example (*.deeclass) false ===== scaleWithActor ===== Scale with actor scale. Applies actor scaling to behavior parameters like pivot position and distance. Used for example on VR menu. * Full name: ''toggleVisibility.scaleWithActor'' * Type: boolean * Default Value: ''false'' * Example (*.deeclass) false ====== 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 ====== * Allow user to show object in front of actor. ====== 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): ====== Live Examples ======