Skip to content

FractureComponent

FractureComponent

fracturable property writable

fracturable: bool

Whether this object can fracture at all, either from impacts or via fracture()/fracture_at_world_point()

generation property

generation: int

How many times this object (or its source ancestor) has already fractured

impulse_threshold property writable

impulse_threshold: float

Minimum collision impulse required to trigger an automatic fracture

max_fracture_generations property writable

max_fracture_generations: int

Maximum number of times a shard produced by this object (or its descendants) may itself fracture again. See the generation property.

min_fragment_area property writable

min_fragment_area: float

Fragments smaller than this area (in world units squared) are discarded rather than spawned as shards

owner property

owner: Object

The Object that owns this component

rest_density property writable

rest_density: float

Density used to compute mass for newly-created shards, based on their fragment area

shard_count property writable

shard_count: int

Target number of shards produced by a fracture

add_child

add_child(obj: Object) -> Object

Add obj as a child of this component's owning Object

add_component

add_component(component_class: Any) -> typing.Any

Attach a new component of the given type to this component's owning Object.

Example
render = self.add_component(RenderComponent)

add_object

add_object(obj: Object, parent: Object = None) -> Object

Add a newly created Object to the scene, optionally parented to another Object

fracture

fracture() -> None

Immediately fracture this object into shards at its own center.

Example
self.get_component(FractureComponent).fracture()

fracture_at_local_point

fracture_at_local_point(local_point: Vector3) -> None

Immediately fracture this object into shards, using localPoint (in this object's local/model space) as the impact point that seeds the fracture pattern.

Example
fc.fracture_at_local_point(Vector3(0.5, 0, 0))

fracture_at_world_point

fracture_at_world_point(world_point: Vector3) -> None

Immediately fracture this object into shards, using worldPoint (world-space) as the impact point that seeds the fracture pattern.

Example
fc.fracture_at_world_point(hit.point)

get_component

get_component(component_class: Any) -> typing.Any

Look up a component on this Object

get_owner

get_owner() -> Object

The Object that owns this component

has_component

has_component(component_class: Any) -> bool

Check whether this component's owning Object has a component of the given type

remove_component

remove_component(component_class: Any) -> None

Remove a component of the given type from this component's owning Object

remove_object

remove_object(obj: Object) -> None

Remove an object from the scene

set_fracturable

set_fracturable(fracturable: bool) -> None

Set fracturable. See the fracturable property.

set_impulse_threshold

set_impulse_threshold(impulse_threshold: SupportsFloat | SupportsIndex) -> None

Set impulse_threshold. See the impulse_threshold property.

set_max_fracture_generations

set_max_fracture_generations(max_fracture_generations: SupportsInt | SupportsIndex) -> None

Set max_fracture_generations. See the max_fracture_generations property.

set_min_fragment_area

set_min_fragment_area(min_fragment_area: SupportsFloat | SupportsIndex) -> None

Set min_fragment_area. See the min_fragment_area property.

set_rest_density

set_rest_density(rest_density: SupportsFloat | SupportsIndex) -> None

Set rest_density. See the rest_density property.

set_shard_count

set_shard_count(shard_count: SupportsInt | SupportsIndex) -> None

Set shard_count. See the shard_count property.