Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » ECBHighlightPointedAt
Behavior adding support to highlight element if pointed at by the user. Uses ECBehaviorOutline to do the highlighting in response to ECBehaviorVRHandPointedAt events.
This behavior can be used only once on an element.
Element class properties have the prefix highlightPointedAt.
.
Set properties of ECBehaviorOutline behavior added by this behavior. use property prefix myBehavior.outline(highlightPointedAt).
for these properties.
Sets these default values:
myBehavior.outline(highlightPointedAt).skin
= /content/materials/outline/outlinePointAt.deskin
'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 does not support optional behaviors.
Since DEMoCap Version 1.3
class MyElement extends BehaviorElementClass public var ECBehaviorComponent component public var ECBehaviorCollider collider public var ECBehaviorVRHandPointedAt vrHandPointedAt public var ECBHighlightPointedAt highlightPointedAt func new() component = ECBehaviorComponent.new(this, null) collider = ECBehaviorCollider.new(this, component) vrHandPointedAt = ECBehaviorVRHandPointedAt.new(this) highlightPointedAt = ECBHighlightPointedAt.new(this, component, collider, vrHandPointedAt) 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='ECBehaviorComponent'/> <behavior type='ECBehaviorCollider'/> <behavior type='ECBehaviorVRHandPointedAt'/> <behavior type='ECBHighlightPointedAt'> <!-- optional: use component with id instead of empty string --> <string name='component'>second</string> <!-- set element properties. omit property prefix if used inside behavior tag --> <string name='.outline(highlightPointedAt).skin'>/content/materials/outline/outlinePointAt.deskin</string> </behavior> </elementClass>