This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_vrhandpointedat [2025/03/13 17:18] – dragonlord | dragengine:modules:dragonscript:behavior_vrhandpointedat [2025/05/04 13:48] (current) – [vrHandPointedAt.check] dragonlord | ||
---|---|---|---|
Line 30: | Line 30: | ||
===== handStopsPointingAt ===== | ===== handStopsPointingAt ===== | ||
+ | |||
+ | Hand stops pointing at element. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. | ||
+ | |||
+ | ===== vrHandPointedAt.check ===== | ||
+ | |||
+ | Check one or more vr hand pointed-at parameters. Action succeeds if all parameter value matches their respective vr hand pointed-at parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a vr hand pointed-at parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |count|integer|Count of vr hands pointing at element equals integer value| | ||
+ | |count.not|integer|Count of vr hands pointing at element does not equal integer value| | ||
+ | |count.less|integer|Count of vr hands pointing at element is less than integer value| | ||
+ | |count.greater|integer|Count of vr hands pointing at element is greater than integer value| | ||
+ | |player|'' | ||
+ | |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | < | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | <!-- actions here run only if player is pointing at element --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== vrHandPointedAt.check ===== | ||
+ | |||
+ | Check one or more vr hand pointed-at parameters. Conditions returns true if all parameter value match their respective vr hand pointed-at parameter. This condition is typically used to run an action or sequence of actions as long as vr hand pointed-at conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |vrHandPointedAt.count|integer|Count of vr hands pointing at element equals integer value| | ||
+ | |vrHandPointedAt.count.not|integer|Count of vr hands pointing at element does not equal integer value| | ||
+ | |vrHandPointedAt.count.less|integer|Count of vr hands pointing at element is less than integer value| | ||
+ | |vrHandPointedAt.count.greater|integer|Count of vr hands pointing at element is greater than integer value| | ||
+ | |vrHandPointedAt.player|'' | ||
+ | |||
+ | This is an example of using this condition: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== State Machine Actions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Conditions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Events ====== | ||
+ | |||
+ | This behavior sends these state machine events. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== vrHandPointedAt.start ===== | ||
+ | |||
+ | Hand starts pointing at element. | ||
+ | |||
+ | ===== vrHandPointedAt.stop ===== | ||
Hand stops pointing at element. | Hand stops pointing at element. | ||
Line 39: | Line 108: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior | + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: |
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 46: | Line 116: | ||
====== API Documentation ====== | ====== API Documentation ====== | ||
+ | |||
# | # | ||
Line 78: | Line 149: | ||
< | < | ||
< | < | ||
+ | <!-- optional: use behavior tree with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
+ | <!-- optional: use state machine with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
<!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
<string name=' | <string name=' |