Drag[en]gine Script Module DragonScript
1.23
|
Impact material sound. More...
Public Member Functions | |
String | getID () |
Identifier. More... | |
float | getImpulsePower () |
Conversation factor from impulse to impact power. More... | |
MaterialSound | getSound () |
Impact sound. More... | |
ImpactMaterialSound | new (String id) |
Create material. More... | |
ImpactMaterialSound | new (String id, ImpactMaterialSound material) |
Create copy of material with new identifier. More... | |
void | playSound (GameWorld world, CollisionInfo collision, ImpactMaterialSound material) |
Play impact sound of this material hitting another. More... | |
void | playSound (GameWorld world, DVector position, float impulse) |
Play impact sound. More... | |
void | playSound (GameWorld world, DVector position, float impulse, ImpactMaterialSound material) |
Play impact sound of this material hitting another. More... | |
void | setImpulsePower (float factor) |
Set conversation factor from impulse to power. More... | |
void | setSound (MaterialSound sound) |
Set impact sound. More... | |
Impact material sound.
Material sounds used for objects hitting each other. Typically used for collisions between dynamic or kinematic colliders. Collider rig shapes are assigned the model texture they belong to. This can be used to figure out what skins are involved in the collision. Using SkinAnnotations the ImpactMaterialSound identifier for the skin file path can be looked up. Each ImpactMaterialSound involved in the collision plays back an impact sound. This allows to simulate a vaste amount of inter-material collisions without needing to record an explicit sound for each possible combination of materials. You only need to record a collision sound for each material.
String Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getID | ( | ) |
Identifier.
float Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getImpulsePower | ( | ) |
Conversation factor from impulse to impact power.
MaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.getSound | ( | ) |
Impact sound.
ImpactMaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.new | ( | String | id | ) |
Create material.
ImpactMaterialSound Dragengine.Audio.MaterialSounds.ImpactMaterialSound.new | ( | String | id, |
ImpactMaterialSound | material | ||
) |
Create copy of material with new identifier.
void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
CollisionInfo | collision, | ||
ImpactMaterialSound | material | ||
) |
Play impact sound of this material hitting another.
[in] | world | World to play sound in. |
[in] | collision | Collision information originating by owner this material. |
[in] | material | Hit material. If null default parameters are assumed. |
void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
DVector | position, | ||
float | impulse | ||
) |
Play impact sound.
[in] | world | World to play sound in. |
[in] | position | Impact position in world space. |
[in] | impulse | Impact impulse. |
void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.playSound | ( | GameWorld | world, |
DVector | position, | ||
float | impulse, | ||
ImpactMaterialSound | material | ||
) |
Play impact sound of this material hitting another.
[in] | world | World to play sound in. |
[in] | position | Impact position in world space. |
[in] | impulse | Impact impulse. |
[in] | material | Hit material. If null default parameters are assumed. |
void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.setImpulsePower | ( | float | factor | ) |
Set conversation factor from impulse to power.
void Dragengine.Audio.MaterialSounds.ImpactMaterialSound.setSound | ( | MaterialSound | sound | ) |
Set impact sound.