struct
ColliderComponent
- Module
- Physics
- Header
#include "Physics/Components/ColliderComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
Shape | shape | Default Shape::Box. |
Vec3 | halfExtents | Box Default Vec3(0.5f, 0.5f, 0.5f). |
float | radius | Sphere/Capsule Default 0.5f. |
float | height | Capsule, Cylinder, tapered shapes: the full length including caps Default 1.0f. |
float | bottomRadius | Tapered shapes: Radius is the top end Default 0.5f. |
Vec3 | offset | Local offset Default Vec3(0.0f, 0.0f, 0.0f). |
bool | isTrigger | Default false. |
bool | staticBody | UE's default for a placed static mesh: collision on, simulation off. A collider with no RigidBody used to be shape-without-body — the prop had the right hull and nothing in the world could touch it — because PhysicsSystem only ever built a body for entities carrying both. The physics system now gives such a collider a static body of its own, and takes it away the moment a RigidBody arrives to own the entity instead. Turn this off for a collider that exists purely as authoring data (a shape a tool will cook later, a proxy a gameplay system spawns from). Default true. |
ECollisionPreset | collisionPreset | UE-style collision channels. The preset picks a whole response set; objectType and the response overrides below apply when preset == Custom. Everything maps down to a Jolt object layer plus a response table the contact filter consults, so the legacy layer/matrix path still works. Default ECollisionPreset::WorldDynamic. |
ECollisionChannel | objectType | Default ECollisionChannel::WorldDynamic. |
ECollisionResponse | responseToPawn | Default ECollisionResponse::Block. |
ECollisionResponse | responseToProjectile | Default ECollisionResponse::Block. |
ECollisionResponse | responseToVisibility | Default ECollisionResponse::Block. |
ECollisionResponse | responseToCamera | Default ECollisionResponse::Block. |
PhysicsMaterial | material | Physics material (per-collider friction/restitution). The three fields surfaced via MOWO_NESTED match the legacy mat_friction / mat_restitution / mat_density MDF keys exactly. |
std::string | materialPath | A shared .physmat asset. When set it replaces the inline material above wholesale at body creation, so "ice" is authored once and referenced everywhere instead of retyped per collider. |
ESurfaceType | surfaceType | What this collider is made of, for footsteps / impacts / decals / scans. Ignored when materialPath resolves — the asset owns the surface then. Default ESurfaceType::Default. |
std::string | collisionMeshPath | Where a Mesh / ConvexHull collider's geometry comes from. Empty means the entity's own MeshRenderer model, which is what "give this prop real collision" means 95% of the time; point it at another asset for a hand-authored low-poly proxy. Ignored when meshVertices is already filled (terrain and the geometry tools cook their own). |
bool | materialSurfaces | Whether an asset-cooked shape stamps each triangle with the surface of the material bound to the submesh it came from, and adopts that material's friction and restitution when this collider names no .physmat of its own. Turn it off for a proxy that is deliberately made of one thing regardless of what the render mesh is painted with. Default true. |
bool | autoConvexCollision | Automatic convex decomposition for a ConvexHull collider whose mesh has no authored simple collision and no UCX_ pieces. Off falls back to the single hull over the whole silhouette, which is a solid block wherever the mesh has a hole in it. Default true. |
std::vector<ColliderShape> | compoundShapes | |
ECompoundMode | compoundMode | Default ECompoundMode::Static. |
std::vector<ColliderShape> | additionalShapes | |
std::vector<Vec3> | meshVertices | Mesh collider data (only used when shape == Mesh). Filled by whoever cooks the geometry — terrain, the geometry tools, or the mesh-asset resolver — and RELEASED once the shape is cooked and cached, because a shared shape makes a per-collider copy of the triangle soup dead weight. |
std::vector<uint32_t> | meshIndices | |
std::string | cookedShapeKey | Identity of the cooked shape in FCollisionShapeCache. Set by the resolver; empty means this collider's geometry is one-off and must not be shared with anything else. |
bool | assetGeometryFailureReported | Body creation retries every tick while a mesh collider's source asset is not resident — which is what lets a proxy that streams in later still cook. Without this latch the same two failure lines are written every frame for the whole time it is missing, which buries everything else in the log and reads as a hang. Default false. |
std::vector<ESurfaceType> | meshTriangleSurfaces | One entry per triangle (meshIndices.size() / 3). Empty means the whole mesh takes the material's surface. A wall whose lower band is stone and whose upper band is wood is one mesh collider with two values here, and a hit on it resolves to whichever triangle was actually struck. |
std::vector<float> | heightfieldSamples | Height field data (only used when shape == HeightField). An n×n grid of heights: world position of sample (i, j) is heightfieldOffset + (i * scale.x, samples[j*n+i] * scale.y, j * scale.z). Far more compact than an equivalent Mesh collider (terrain uses this). |
int32_t | heightfieldSampleCount | Default 0. |
Vec3 | heightfieldOffset | Default Vec3(0.0f, 0.0f, 0.0f). |
Vec3 | heightfieldScale | Default Vec3(1.0f, 1.0f, 1.0f). |
std::vector<ESurfaceType> | heightfieldSurfaces | One entry per heightfield square, row-major over (n-1)x(n-1). Empty means the whole field takes the material's surface. Terrain fills this from the dominant painted layer so grass, rock and sand on one terrain report as themselves. |
Generated from Physics/Components/ColliderComponent.h via physics.json · Nov 4, 2026Version 1.0.0