User Tools

Site Tools


dragengine:modules:dragonscript:behavior_lookat

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_lookat [2025/05/13 13:57] – dragonlorddragengine:modules:dragonscript:behavior_lookat [2026/10/09 16:31] (current) – dragonlord
Line 23: Line 23:
 Element class properties have the prefix ''lookAt.'' . Element class properties have the prefix ''lookAt.'' .
  
-===== range ===== +===== bone ===== 
-Set range in meters. Elements will only be detected this far. +Set bone from where the test ray is cast. 
-  * Full name: ''lookAt.range'' +  * Full name: ''lookAt.bone'' 
-  * Type: float +  * Type: string 
-  * Default Value: 2 +  * Default Value: empty string 
-  * Restriction: At least 0 +  * Example (*.deeclass) <code xml><string name='lookAt.bone'>head</string></code> 
-  * Example (*.deeclass) <code xml><float name='lookAt.range'>3</float></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: ''dynamic:geometry dynamic actorAI'' 
 +  * Example (*.deeclass) <code xml><string name='collider.collisionFilter'>dynamic:geometry dynamic actorAI trigger</string></code>
  
 ===== origin ===== ===== origin =====
Line 38: Line 45:
   * Example (*.deeclass) <code xml><vector name='lookAt.origin' x='0' y='1.6' z='0.2'/></code>   * Example (*.deeclass) <code xml><vector name='lookAt.origin' x='0' y='1.6' z='0.2'/></code>
  
-===== bone ===== +===== range ===== 
-Set bone from where the test ray is cast. +Set range in meters. Elements will only be detected this far. 
-  * Full name: ''lookAt.bone'' +  * Full name: ''lookAt.range'' 
-  * Type: string +  * Type: float 
-  * Default Value: empty string +  * Default Value: 2 
-  * Example (*.deeclass) <code xml><string name='lookAt.bone'>head</string></code>+  * Restriction: At least 0 
 +  * Example (*.deeclass) <code xml><float name='lookAt.range'>3</float></code>
  
 ====== Events ====== ====== Events ======
Line 218: Line 226:
      
   <behavior type='ECBehaviorLookAt'>   <behavior type='ECBehaviorLookAt'>
-    <!-- optional: set collision filter. default value '3:0 1 2 3' which means 
-                   category BaseGameApp.CollisionFilterBit.actorAI 
-                   filter BaseGameApp.CollisionFilterBit.geometry, 
-                          BaseGameApp.CollisionFilterBit.dynamic, 
-                          BaseGameApp.CollisionFilterBit.actorAI. 
-                   format is '', 'category' or 'category:filter' where category and filter 
-                   are a list of bits to set. --> 
-    <string name='collisionFilter'>3:0 1 2 3</string> 
-     
     <!-- optional: use component with id instead of empty string -->     <!-- optional: use component with id instead of empty string -->
     <string name='component'>second</string>     <string name='component'>second</string>
dragengine/modules/dragonscript/behavior_lookat.txt · Last modified: by dragonlord