The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:PhysicalMaterial (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> PhysicalMaterial
Package: 
Engine
This class in other games:
UT3


Properties[edit]

Property group 'Advanced'[edit]

AnisoFrictionDir[edit]

Type: Object.Vector

Direction (in physics object local space) for FrictionV to be applied.

bEnableAnisotropicFriction[edit]

Type: bool

Enable support for different friction in different directions.

FrictionV[edit]

Type: float

Friction to be applied in AnisoFrictionDir - Friction will be used for the other direction.

Property group 'Fracture'[edit]

FractureSoundExplosion[edit]

Type: SoundCue

Sound cue to play when multiple fracture parts are dislodged from a mesh

FractureSoundSingle[edit]

Type: SoundCue

Sound cue to play when a single piece is removed from mesh.

Property group 'Impact'[edit]

ImpactEffect[edit]

Type: ParticleSystem

Particle effect to play at impact location

ImpactReFireDelay[edit]

Type: float

Min time between effect/sound being triggered

ImpactSound[edit]

Type: SoundCue

Sound to play

ImpactThreshold[edit]

Type: float

How hard an impact must be to trigger effect/sound

Property group 'Parent'[edit]

Parent[edit]

Type: PhysicalMaterial

The PhysicalMaterial objects now have a parent reference / pointer. This allows you to make single inheritance hierarchies of PhysicalMaterials. Specifically this allows one to set default data and then have subclasses over ride that data. (e.g. For all materials in the game we are going to say the default Impact Sound is SoundA. Now for a Tin Shed we can make a Metal Physical Material and set its parent pointer to the Default Material. And then for our Metal PhysicalMaterial we say: Play SoundB for Pistols and Rifles. Leaving everything else blank, our code can now traverse up the tree to the Default PhysicalMaterial and read the values out of that.

This allows for very specific and interesting behavior that is for the most part completely in the hands of your content creators.

A programmer is needed only to create the orig set of parameters and then it is all data driven parameterization!

Property group 'PhysicalMaterial'[edit]

AngularDamping[edit]

Type: float


bForceConeFriction[edit]

Type: bool


Density[edit]

Type: float


Default value: 1.0

Friction[edit]

Type: float


Default value: 0.7

LinearDamping[edit]

Type: float


Default value: 0.01

MagneticResponse[edit]

Type: float


Restitution[edit]

Type: float


Default value: 0.3

WindResponse[edit]

Type: float


Property group 'PhysicalProperties'[edit]

PhysicalMaterialProperty[edit]

Type: PhysicalMaterialPropertyBase

Modifiers: export, editinline


Property group 'Slide'[edit]

SlideEffect[edit]

Type: ParticleSystem

Effect to place at contact position and enable while sliding

SlideReFireDelay[edit]

Type: float

How long since last slide before sound/effect can be re-triggered

SlideSound[edit]

Type: SoundCue

Looping sound to play while objects are sliding

SlideThreshold[edit]

Type: float

How fast an object must slide to trigger effect/sound

Internal variables[edit]

MaterialIndex[edit]

Type: int

Modifiers: transient


Enums[edit]

EPhysEffectType[edit]

Enum to differentiate between impact and slide effects.

EPMET_Impact 
EPMET_Slide 

Functions[edit]

Native functions[edit]

FindPhysEffectInfo[edit]

function native Actor.PhysEffectInfo FindPhysEffectInfo (EPhysEffectType Type)

Walk up the PhysMat heirarchy to fill in the supplied PhysEffectInfo struct.

Other instance functions[edit]

FindFractureSounds[edit]

simulated function FindFractureSounds (out SoundCue OutSoundExplosion, out SoundCue OutSoundSingle)

Look up PhysicalMaterial heriarchy to find fracture sounds

GetPhysicalMaterialProperty[edit]

simulated function PhysicalMaterialPropertyBase GetPhysicalMaterialProperty (class<PhysicalMaterialPropertyBaseDesiredClass)

finds a physical material property of the desired class, querying the parent if this material doesn't have it

Parameters:

  • DesiredClass - the class of physical material property to search for

Returns:

a PhysicalMaterialPropertyBase matching the desired class, or none if there isn't one