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
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
collidable
CollidableComponent
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
collidable
CollidableComponenttransforms
Span<ShapeTransform>
Remarks
You must still transform this further into worldspace by using the world position and rotation the collidable's entity.