User Tools

Site Tools


dragengine:modules:dragonscript:behavior_grabber

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
dragengine:modules:dragonscript:behavior_grabber [2025/05/13 14:05] – dragonlorddragengine:modules:dragonscript:behavior_grabber [2026/10/09 16:35] (current) – dragonlord
Line 24: Line 24:
 Element class properties have the prefix ''grabber.'' or ''grabber(id).'' if id is not empty. Element class properties have the prefix ''grabber.'' or ''grabber(id).'' if id is not empty.
  
-===== shape ===== +===== bone ===== 
-Shape of collider used to detect grab spots. +Name of bone to attach to or empty string to attach to the parent element. 
-  * Full name: ''grabber.shape'' or ''grabber(id).shape'' +  * Full name: ''grabber.bone'' or ''grabber(id).bone'' 
-  * Type: string (shape format). See "Shape List Encoding" in CodecPropertyString.+  * Type: string
   * Default Value: empty string   * Default Value: empty string
-  * Example (*.deeclass): <code xml><string name='grabber(right).shape'>box:extends,0.1,0.1,0.1</string></code>+  * Example (*.deeclass): <code xml><string name='grabber(right).bone'>attach hand.r</string></code> 
 + 
 +===== collisionFilter ===== 
 + 
 +Set [[gamedev:collisionfiltering|collision filter]]. Filter bits are defined using a list of names mapped to collision filter bit indices using BaseGameApp.getCollisionFilterMap().  
 +  * Full name: ''collider.collisionFilter'' 
 +  * Type: string. Format can be ''category:filter'' or ''category'' where category and filter can be ''bit1 bit2 ... bitN'' with bit names looked up using the collision filter map. If only category is used filter is the same. 
 +  * Default Value: ''trigger:dynamic'' 
 +  * Example (*.deeclass) <code xml><string name='collider.collisionFilter'>trigger:dynamic particle</string></code>
  
 ===== position ===== ===== position =====
Line 45: Line 53:
   * Example (*.deeclass): <code xml><vector name='grabber(right).rotation' x='-45' y='0' z='0'/></code>   * Example (*.deeclass): <code xml><vector name='grabber(right).rotation' x='-45' y='0' z='0'/></code>
  
-===== bone ===== +===== shape ===== 
-Name of bone to attach to or empty string to attach to the parent element. +Shape of collider used to detect grab spots. 
-  * Full name: ''grabber.bone'' or ''grabber(id).bone'' +  * Full name: ''grabber.shape'' or ''grabber(id).shape'' 
-  * Type: string+  * Type: string (shape format). See "Shape List Encoding" in CodecPropertyString.
   * Default Value: empty string   * Default Value: empty string
-  * Example (*.deeclass): <code xml><string name='grabber(right).bone'>attach hand.r</string></code>+  * Example (*.deeclass): <code xml><string name='grabber(right).shape'>box:extends,0.1,0.1,0.1</string></code>
  
 ====== Events ====== ====== Events ======
Line 264: Line 272:
     <!-- optional: use vr hand with id instead of empty string -->     <!-- optional: use vr hand with id instead of empty string -->
     <string name='vrHand'>right</string>     <string name='vrHand'>right</string>
-     
-    <!-- optional: set collision filter. default value '4:1' which means 
-                   category BaseGameApp.CollisionFilterBit.trigger 
-                   filter BaseGameApp.CollisionFilterBit.dynamic. 
-                   format is '', 'category' or 'category:filter' where category and filter 
-                   are a list of bits to set. --> 
-    <string name='collisionFilter'>4:1 2</string> 
          
     <!-- optional: use behavior tree with id instead of empty string -->     <!-- optional: use behavior tree with id instead of empty string -->
dragengine/modules/dragonscript/behavior_grabber.1747145150.txt.gz · Last modified: by dragonlord