Table of Contents

Class MeshCollider

Namespace
Stride.BepuPhysics.Definitions.Colliders
Assembly
Stride.BepuPhysics.dll
[DataContract]
public sealed class MeshCollider : ICollider
Inheritance
MeshCollider
Implements

Properties

Closed

Physics assume that the mesh's surface doesn't have any holes. That all edges of the mesh are shared between two triangles.

public bool Closed { get; set; }

Property Value

bool

Mass

public float Mass { get; set; }

Property Value

float

Model

public required Model Model { get; set; }

Property Value

Model

Transforms

public int Transforms { get; }

Property Value

int

Methods

ComputeMeshScale(CollidableComponent)

public static Vector3 ComputeMeshScale(CollidableComponent collidable)

Parameters

collidable CollidableComponent

Returns

Vector3

GetLocalTransforms(CollidableComponent, Span<ShapeTransform>)

Fills in a span to transform AppendModel(List<BasicMeshBuffers>, ShapeCacheSystem, out object) from their neutral transform into the one specified by its collidable.

public void GetLocalTransforms(CollidableComponent collidable, Span<ShapeTransform> transforms)

Parameters

collidable CollidableComponent
transforms Span<ShapeTransform>

Remarks

You must still transform this further into worldspace by using the world position and rotation the collidable's entity.