Skip to content

SubShape.UpdateDefinition(ShapeDefinition) Method

Definition

Namespace: Brine2D.ECS.Components

Updates the geometry of this sub-shape. When the body is live and the new definition is the same shape type as the current one, the change is applied via a lightweight B2.ShapeSet* call. When the shape type changes, a full body rebuild is triggered. Chain shapes are not supported.

public void UpdateDefinition(Brine2D.Physics.ShapeDefinition newDefinition);

Parameters

newDefinition ShapeDefinition

Exceptions

System.ArgumentException
Thrown when newDefinition is a ChainShape.