Resource
Physics
(NOTE) Describes material properties of a collider mainly used during collision resolution.
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
CreateRuntime | Density | dataresource | |
Constructor | Friction | ||
RuntimeClone | FrictionImportance | ||
UpdateAndNotifyIfModified | HighPriority | ||
Restitution | |||
RestitutionImportance |
Properties
Density : real
Density is used to determine the mass of an object. Mass is computed as density * volume. Density can be set to exactly 0 to produce a massless object, however this should only be done with children objects to add collision without affecting mass.
var Density : Real
Friction : real
How slippery or rough the object is. When friction is 0 the object will be slippery. As friction increases, sliding objects will stop quicker. The friction of two object's are combined with the formula sqrt(a * b).
var Friction : Real
FrictionImportance : real
Determines which object's friction should be used. If object A's friction importance value is larger than object B's then object A's friction will be used. If both importance values are the same then the default combination logic will be used (see the description of Friction for details).
var FrictionImportance : Real
HighPriority : boolean
Deprecated. Use RestitutionImportance instead.
var HighPriority : Boolean
Restitution : real
How much an object will bounce during a collision. Values should be in the range [0,1] where 0 is an inelastic collision and 1 is a fully elastic collision. Restitution is computed as the max of the two objects. Note: due to solving constraints with baumgarte, energy will not be perfectly conserved with a restitution 1.
var Restitution : Real
RestitutionImportance : real
Determines which object's restitution should be used. If object A's restitution importance value is larger than object B's then object A's restitution will be used. If both importance values are the same then the default combination logic will be used (see the description of Restitution for details).
var RestitutionImportance : Real
Methods
CreateRuntime : physicsmaterial
static
Creates a PhysicsMaterial for run-time modifications. |Name|Type|Description| |---|---|---|
function CreateRuntime() : PhysicsMaterial
PhysicsMaterial : Void
constructor
Name Type Description function PhysicsMaterial()
RuntimeClone : physicsmaterial
Creates a clone of this material for run-time modifications. |Name|Type|Description| |---|---|---|
function RuntimeClone() : PhysicsMaterial
UpdateAndNotifyIfModified : Void
After modifying this resource, notify anyone using it to update now instead of at the next physics update. |Name|Type|Description| |---|---|---|
function UpdateAndNotifyIfModified()