mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 17:43:51 +00:00
feat(woc): add WMO collision meshes to exported zone collision
WoweeCollision previously only contained terrain triangles; placed WMO buildings had no collision in the exported zone, so players could walk through walls. Added WoweeCollisionBuilder::addMesh() that transforms a local-space mesh into world space with slope-based walkability flags, and the editor's exportZone now walks every placed WMO and feeds each group's geometry through it. Indoor vs outdoor groups are tagged via the WMO group flag.
This commit is contained in:
parent
fdd527b373
commit
eadb6a5886
3 changed files with 83 additions and 1 deletions
|
|
@ -40,6 +40,16 @@ public:
|
|||
static WoweeCollision fromTerrain(const ADTTerrain& terrain,
|
||||
float steepAngle = 50.0f);
|
||||
|
||||
// Append a transformed mesh to an existing collision (for WMO/M2 instances).
|
||||
// `vertices` are local-space; `transform` puts them into world space.
|
||||
// Triangles are classified by slope using `steepAngle`.
|
||||
static void addMesh(WoweeCollision& collision,
|
||||
const std::vector<glm::vec3>& vertices,
|
||||
const std::vector<uint32_t>& indices,
|
||||
const glm::mat4& transform,
|
||||
uint8_t extraFlags = 0,
|
||||
float steepAngle = 50.0f);
|
||||
|
||||
// Save collision mesh to binary file
|
||||
static bool save(const WoweeCollision& collision, const std::string& path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue