DinoFracture 2.11.1
A Dynamic Fracture Library
Loading...
Searching...
No Matches

DinoFracture.FractureOnCollision Class Reference

This component will cause a fracture to happen at the point of impact. More...

Inherits MonoBehaviour.

Public Attributes

float ForceThreshold
 The minimum amount of force required to fracture this object. Set to 0 to have any amount of force cause the fracture.
 
float ForceFalloffRadius = 1.0f
 Falloff radius for transferring the force of the impact to the resulting pieces. Any piece outside of this falloff from the point of impact will have no additional impulse set on it.
 
bool AdjustForKinematic = true
 If true and this is a kinematic body, an impulse will be applied to the colliding body to counter the effects of hitting a kinematic body. If false and this is a kinematic body, the colliding body will bounce off as if this were an unmovable wall.
 
bool ConsistentImpactForce = false
 If true, the force calculations will become more consistent with all incoming collisions. The force will be the same given the same incoming rigid body properties instead of changing as this mass changes.
 
LayerMask CollidableLayers = (LayerMask)(-1)
 The collision layers that are allowed to cause a fracture.
 
bool OutputDebugCollisionInfo = false
 If true, collision energies will be output in the editor to help tune required force thresholds.
 

Detailed Description

This component will cause a fracture to happen at the point of impact.

Member Data Documentation

◆ ConsistentImpactForce

bool DinoFracture.FractureOnCollision.ConsistentImpactForce = false

If true, the force calculations will become more consistent with all incoming collisions. The force will be the same given the same incoming rigid body properties instead of changing as this mass changes.

Recommended to set to true for consistency. Set to false for backwards compatibility.

The incoming force calculations will change, requiring re-tweaking of the ForceThreshold value.