unreal.GeometryScript_Collision

class unreal.GeometryScript_Collision(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Geometry Script Library Collision Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: CollisionFunctions.h

classmethod approximate_convex_hulls_with_simpler_collision_shapes(simple_collision, approximate_options, debug=None) -> (simple_collision=GeometryScriptSimpleCollision, has_approximated=bool)

Attempt to approximate any convex hulls in the given simple collision representation. Updates the passed-in Simple Collision. Convex hulls that aren’t well approximated (to tolerances set in ApproximateOptions) will remain as convex hulls.

Parameters:
Returns:

simple_collision (GeometryScriptSimpleCollision): The collision in which to attempt to approximate the convex hulls

has_approximated (bool): Indicates whether any convex hulls were replaced with simpler approximations

Return type:

tuple

classmethod combine_simple_collision(collision_to_update, append_collision, debug=None) GeometryScriptSimpleCollision
  • Add simple collision shapes from AppendCollision to CollisionToUpdate

Parameters:
Returns:

collision_to_update (GeometryScriptSimpleCollision):

Return type:

GeometryScriptSimpleCollision

classmethod compute_negative_space(mesh_bvh, negative_space_options, debug=None) GeometryScriptSphereCovering

Compute the negative space of an input mesh surface that should be protected when merging simple collision shapes

Parameters:
Returns:

A set of spheres that cover the negative space of the input shape

Return type:

GeometryScriptSphereCovering

classmethod conv_geometry_script_sphere_covering_to_sphere_array(sphere_covering) Array[Sphere]
Parameters:

sphere_covering (GeometryScriptSphereCovering) –

Returns:

An array of the spheres in the given Sphere Covering

Return type:

Array[Sphere]

classmethod conv_sphere_array_to_geometry_script_sphere_covering(spheres) GeometryScriptSphereCovering
Parameters:

spheres (Array[Sphere]) –

Returns:

A sphere covering containing the spheres in the given Spheres array

Return type:

GeometryScriptSphereCovering

classmethod get_simple_collision_from_component(component, debug=None) GeometryScriptSimpleCollision
  • Get the simple collision from a Primitive Component

Parameters:
Return type:

GeometryScriptSimpleCollision

classmethod get_simple_collision_from_static_mesh(static_mesh, debug=None) GeometryScriptSimpleCollision
  • Get the simple collision from a Static Mesh

Parameters:
Return type:

GeometryScriptSimpleCollision

classmethod get_simple_collision_shape_count(simple_collision) int32
  • Count of number of simple collision shapes

Parameters:

simple_collision (GeometryScriptSimpleCollision) –

Return type:

int32

classmethod merge_simple_collision_shapes(simple_collision, merge_options, debug=None) -> (GeometryScriptSimpleCollision, has_merged=bool)

Attempt to merge collision shapes to create a representation with fewer overall shapes.

Parameters:
Returns:

Simple Collision with collision shapes merged, as allowed by settings

has_merged (bool): Indicates whether any shapes have been merged

Return type:

bool

classmethod reset_dynamic_mesh_collision(component, emit_transaction=False, debug=None) None

Clears Simple Collisions from the Dynamic Mesh Component.

Parameters:
classmethod set_dynamic_mesh_collision_from_mesh(from_dynamic_mesh, to_dynamic_mesh_component, options, debug=None) DynamicMesh

Generate Simple Collision shapes for a Dynamic Mesh Component based on the input Dynamic Mesh.

Parameters:
Return type:

DynamicMesh

classmethod set_simple_collision_of_dynamic_mesh_component(simple_collision, dynamic_mesh_component, options, debug=None) None
  • Set the simple collision on a Dynamic Mesh Component

Parameters:
classmethod set_simple_collision_of_static_mesh(simple_collision, static_mesh, options, static_mesh_collision_options=[True], debug=None) None
  • Set the simple collision on a Static Mesh

Parameters:
classmethod set_static_mesh_collision_from_component(static_mesh_asset, source_component, options=[True], static_mesh_collision_options=[True], debug=None) None

Copy the Simple Collision Geometry from the Source Component to the Static Mesh Asset.

Parameters:
classmethod set_static_mesh_collision_from_mesh(from_dynamic_mesh, to_static_mesh_asset, options, static_mesh_collision_options=[True], debug=None) DynamicMesh

Generates Simple Collision shapes for a Static Mesh Asset based on the input Dynamic Mesh.

Parameters:
Return type:

DynamicMesh

classmethod simplify_convex_hulls(simple_collision, simplify_options, debug=None) -> (simple_collision=GeometryScriptSimpleCollision, has_simplified=bool)

Simplify any convex hulls in the given simple collision representation. Updates the passed-in Simple Collision.

Parameters:
Returns:

simple_collision (GeometryScriptSimpleCollision): The collision in which to attempt to simplify the convex hulls

has_simplified (bool): Indicates whether any convex hulls were modified

Return type:

tuple

classmethod static_mesh_has_customized_collision(static_mesh_asset) bool
Parameters:

static_mesh_asset (StaticMesh) –

Returns:

true if the static mesh has customized collision. If no editor data is available, returns false.

Return type:

bool

classmethod transform_simple_collision_shapes(simple_collision, transform, transform_options, debug=None) -> (GeometryScriptSimpleCollision, success=bool)
  • Transform simple collision shapes

Parameters:
Returns:

success (bool): Indicates whether all collision shapes were accurately transformed. On failure, shapes will still be copied over and a best-effort transform will still be applied.

Return type:

bool