This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_vrhandaction [2022/03/02 20:57] – created dragonlord | dragengine:modules:dragonscript:behavior_vrhandaction [2025/03/13 17:17] (current) – dragonlord | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{tag> | {{tag> | ||
| <WRAP youarehere> | <WRAP youarehere> | ||
| - | [[: | + | [[: |
| </ | </ | ||
| Line 11: | Line 11: | ||
| Behavior adding Action support to VR hands. | Behavior adding Action support to VR hands. | ||
| - | Allows instance of [[https:// | + | Allows instance of # |
| - | Actions allow actors to perform a specific, well defined and enclosed action like interacting with an object for each hand separately. These actions run after the main actor action as provided by [[https:// | + | Actions allow actors to perform a specific, well defined and enclosed action like interacting with an object for each hand separately. These actions run after the main actor action as provided by # |
| ====== Instance Counts ====== | ====== Instance Counts ====== | ||
| Line 21: | Line 21: | ||
| ====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
| - | Element class properties have the prefix | + | Element class properties have the prefix |
| Thie behavior adds no element class properties. | Thie behavior adds no element class properties. | ||
| - | Using this behavior in code you should call ECBehaviorVRHandAction.setActionFactory() to set the factory creating the initial action for the hand to use. By default an instance of [[https:// | + | Using this behavior in code you should call ECBehaviorVRHandAction.setActionFactory() to set the factory creating the initial action for the hand to use. By default an instance of # |
| + | |||
| + | ====== Events ====== | ||
| + | |||
| + | This behavior has no events. | ||
| ====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
| Line 37: | Line 41: | ||
| ====== Persistency ====== | ====== Persistency ====== | ||
| - | Saves these parameters: | + | This behavior does support element class to be persistable (setPersistable). |
| - | * Active Action | + | |
| ====== API Documentation ====== | ====== API Documentation ====== | ||
| - | [[https:// | + | # |
| - | Since DragonScript Module Version | + | Since DragonScript Module Version |
| ====== Use Cases ====== | ====== Use Cases ====== | ||
| Line 52: | Line 55: | ||
| ====== Element Class Example ====== | ====== Element Class Example ====== | ||
| - | The [[https:// | + | The # |
| The following example creates an element class adding the action elements manually. | The following example creates an element class adding the action elements manually. | ||
| Line 134: | Line 137: | ||
| end | end | ||
| end | end | ||
| + | </ | ||
| + | |||
| + | ====== Behavior Factory ====== | ||
| + | |||
| + | Using element class supporting adding behaviors the behavior can be added like this: | ||
| + | <code xml> | ||
| + | <?xml version=' | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <string name=' | ||
| + | </ | ||
| + | < | ||
| + | <string name=' | ||
| + | </ | ||
| + | | ||
| + | < | ||
| + | <!-- required: use vr hand with id. --> | ||
| + | <string name=' | ||
| + | | ||
| + | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
| + | <string name=' | ||
| + | </ | ||
| + | | ||
| + | < | ||
| + | ... | ||
| + | </ | ||
| + | </ | ||
| </ | </ | ||