This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_colliderai [2025/05/09 14:09] – dragonlord | dragengine:modules:dragonscript:behavior_colliderai [2026/10/12 02:53] (current) – [State Machine Events] dragonlord | ||
|---|---|---|---|
| Line 24: | Line 24: | ||
| ====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
| Element class properties have the prefix '' | Element class properties have the prefix '' | ||
| + | |||
| + | ===== collisionFilter ===== | ||
| + | |||
| + | Set [[gamedev: | ||
| + | * Full name: '' | ||
| + | * Type: string. Format can be '' | ||
| + | * Default Value: '' | ||
| + | * Example (*.deeclass) <code xml>< | ||
| ====== Events ====== | ====== Events ====== | ||
| Line 50: | Line 58: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| + | |collisionFilter.filter.set|string|Set named [[gamedev: | ||
| + | |collisionFilter.filter.clear|string|Clear named [[gamedev: | ||
| |enabled|'' | |enabled|'' | ||
| |gravity|vector3|Set gravity| | |gravity|vector3|Set gravity| | ||
| - | |gravity.apply|float, | ||
| |shape|'' | |shape|'' | ||
| |shape.radius|float|Set radius in meters of humanoid shape| | |shape.radius|float|Set radius in meters of humanoid shape| | ||
| |shape.height|float|Set height in meters of humanoid shape| | |shape.height|float|Set height in meters of humanoid shape| | ||
| - | |geometryFromCollider| |Set element position and orientation from collider| | ||
| - | |stop.turning| |Clear angular velocity of collider| | ||
| - | |stop.moving| |Clear linear velocity of collider| | ||
| This is an example of using this action: | This is an example of using this action: | ||
| Line 66: | Line 72: | ||
| < | < | ||
| < | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== colliderAI.update ===== | ||
| + | |||
| + | Update collider ai. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |gravity.apply| |Apply gravity to linear velocity of collider| | ||
| + | |geometryFromCollider| |Set element position and orientation from collider| | ||
| + | |stop.turning| |Clear angular velocity of collider| | ||
| + | |stop.moving| |Clear linear velocity of collider| | ||
| + | |||
| + | This is an example of using this action: | ||
| + | <code xml> | ||
| + | <action name=' | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== colliderAI.collision ===== | ||
| + | |||
| + | Handle collisions. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |stop| |Stop collider from moving. Prevents any further collision in this frame update.| | ||
| + | |sliding| |Applies sliding collision response| | ||
| + | |||
| + | This is an example of using this action: | ||
| + | <code xml> | ||
| + | <action name=' | ||
| + | < | ||
| </ | </ | ||
| </ | </ | ||
| Line 75: | Line 113: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |enabled|'' | |enabled|'' | ||
| + | |hitElement| |Collider has been hit and it is owned by a BehaviorElement. Using [[behavior_statemachine# | ||
| |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | ||
| Line 97: | Line 136: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |colliderAI.enabled|'' | |colliderAI.enabled|'' | ||
| + | |colliderAI.hitElement| |Collider has been hit and it is owned by a BehaviorElement. Using [[behavior_statemachine# | ||
| This is an example of using this condition: | This is an example of using this condition: | ||
| Line 116: | Line 156: | ||
| ====== State Machine Events ====== | ====== State Machine Events ====== | ||
| - | This behavior | + | This behavior |
| + | |||
| + | BAAStateMachine and BAAVRHandStateMachine though does send '' | ||
| ====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
| Line 169: | Line 211: | ||
| | | ||
| < | < | ||
| - | <!-- optional: set collision filter. default value '3:0 1 2 3 4' which means | ||
| - | | ||
| - | | ||
| - | BaseGameApp.CollisionFilterBit.dynamic, | ||
| - | BaseGameApp.CollisionFilterBit.actorAI, | ||
| - | BaseGameApp.CollisionFilterBit.trigger. | ||
| - | | ||
| - | are a list of bits to set. --> | ||
| - | <string name=' | ||
| - | | ||
| <!-- optional: use behavior tree with id instead of empty string --> | <!-- optional: use behavior tree with id instead of empty string --> | ||
| <string name=' | <string name=' | ||