Class MeshCollider
- Namespace
- Stride.BepuPhysics.Definitions.Colliders
- Assembly
- Stride.BepuPhysics.dll
[DataContract]
public sealed class MeshCollider : ICollider- Inheritance
- 
      objectMeshCollider
- 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
Mass
public float Mass { get; set; }Property Value
Model
public required Model Model { get; set; }Property Value
Transforms
public int Transforms { get; }Property Value
Methods
ComputeMeshScale(CollidableComponent)
public static Vector3 ComputeMeshScale(CollidableComponent collidable)Parameters
- collidableCollidableComponent
Returns
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
- collidableCollidableComponent
- transformsSpan<ShapeTransform>
Remarks
You must still transform this further into worldspace by using the world position and rotation the collidable's entity.