This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_collider [2025/03/10 23:33] – created dragonlord | dragengine:modules:dragonscript:behavior_collider [2025/04/30 14:40] (current) – [Instance Counts] dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
Line 25: | Line 25: | ||
Hence these two use cases are possible depending on the order the behaviors are added: Shape Collision, Component Collision. See [[# | Hence these two use cases are possible depending on the order the behaviors are added: Shape Collision, Component Collision. See [[# | ||
+ | See also: | ||
+ | * [[gamedev: | ||
====== Instance Counts ====== | ====== Instance Counts ====== | ||
- | This behavior can only be addec once on an element. | + | This behavior can only be added once on an element. |
====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
Line 33: | Line 35: | ||
===== physicsType ===== | ===== physicsType ===== | ||
Set physics type. | Set physics type. | ||
- | * Full name: '' | + | * Full name: '' |
* Type: enumeration | * Type: enumeration | ||
* < | * < | ||
Line 42: | Line 44: | ||
</ | </ | ||
* Default Value: '' | * Default Value: '' | ||
- | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
===== localGravity ===== | ===== localGravity ===== | ||
Set local gravity or '' | Set local gravity or '' | ||
- | * Full name: '' | + | * Full name: '' |
* Type: 3-component float vector | * Type: 3-component float vector | ||
* Default Value: '' | * Default Value: '' | ||
- | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
===== weight ===== | ===== weight ===== | ||
Set weight in kg. | Set weight in kg. | ||
- | * Full name: '' | + | * Full name: '' |
* Type: float | * Type: float | ||
* Default Value: 1 | * Default Value: 1 | ||
* Restriction: | * Restriction: | ||
- | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
===== enabled ===== | ===== enabled ===== | ||
Set enable collider. | Set enable collider. | ||
- | * Full name: '' | + | * Full name: '' |
* Type: boolean | * Type: boolean | ||
* Default Value: true | * Default Value: true | ||
- | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
===== shape ===== | ===== shape ===== | ||
Set shape if no component is used. | Set shape if no component is used. | ||
- | * Full name: '' | + | * Full name: '' |
* Type: string (shape format). See "Shape List Encoding" | * Type: string (shape format). See "Shape List Encoding" | ||
* Default Value: empty string | * Default Value: empty string | ||
- | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
- | ===== Events ===== | + | ====== Events |
This behavior has no events. | This behavior has no events. | ||
Line 83: | Line 85: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior supports these optional behaviors: | + | |
- | | + | |
====== Persistency ====== | ====== Persistency ====== | ||
Line 150: | Line 151: | ||
< | < | ||
<!-- no behavior has been added before so no component behavior will be used --> | <!-- no behavior has been added before so no component behavior will be used --> | ||
- | | + | |
+ | <!-- optional: set collision filter. default value '0:1 2 3 5' which means | ||
+ | | ||
+ | | ||
+ | BaseGameApp.CollisionFilterBit.actor, | ||
+ | BaseGameApp.CollisionFilterBit.actorAI, | ||
+ | BaseGameApp.CollisionFilterBit.particle. | ||
+ | | ||
+ | are a list of bits to set. --> | ||
+ | <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=' | ||
Line 173: | Line 184: | ||
use the id here --> | use the id here --> | ||
<string name=' | <string name=' | ||
+ | |||
+ | <!-- optional: set collision filter. default value '0:1 2 3 5' which means | ||
+ | | ||
+ | | ||
+ | BaseGameApp.CollisionFilterBit.actor, | ||
+ | BaseGameApp.CollisionFilterBit.actorAI, | ||
+ | BaseGameApp.CollisionFilterBit.particle. | ||
+ | | ||
+ | are a list of bits to set. --> | ||
+ | <string name=' | ||
| | ||
<!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> |