Table of Contents

Class Primitive2DCreationOptions

Namespace
Stride.CommunityToolkit.Bepu
Assembly
Stride.CommunityToolkit.Bepu.dll

Provides options for creating a 2D primitive entity, such as a square or rectangle. Inherits common entity creation options from PrimitiveCreationOptions and adds specific settings for 2D primitive models.

public class Primitive2DCreationOptions : PrimitiveCreationOptions
Inheritance
Primitive2DCreationOptions
Inherited Members

Properties

Component

Gets or sets the physics component to be added to the entity.

public CollidableComponent Component { get; set; }

Property Value

CollidableComponent

Depth

Gets or sets the depth of the 2D primitive. Defaults to 1. The depth adds a third dimension (Z-axis) to the 2D object, making it slightly thicker than a flat object. This is useful for the physics engine, which may be optimized for 3D physics calculations. Even when handling 2D objects, the physics system often operates in 3D space with constraints applied to specific axes.

public float Depth { get; set; }

Property Value

float

Size

Gets or sets the size of the primitive model. If null, default dimensions are used.

public Vector2? Size { get; set; }

Property Value

Vector2?