Access to collision geometry information (physics faces) for models and the map
Howdy!
Been messing around with modding NS2, and I was wondering if there's a way to access the world and model collision geometry.
It seems the only way to do this is via traces, but that's impractical for what I want to do.
Are there any functions to access this information? If not, can we get some?
It doesn't have to be based off the live environment.
Simply: given a model (or the map), get a list of the collision faces and their position (at a given time, if an animated model).
If there's an issue with accessing the PhysX thread, perhaps it could be a request with a callback (or a pollable object).
My use-case is a HUD that estimates enemy locations (and hence needs to compute visibility), but it's not the only one: local bot navigation, bullet penetration, map layout analyses, etc
Even better would be the ability to insert, remove and modify faces in the map (for both rendering and physics), but that's a long shot...
(Imagine generating a new NS2 map each round using an L-System. Analysing balance and playability would be interesting!)
Been messing around with modding NS2, and I was wondering if there's a way to access the world and model collision geometry.
It seems the only way to do this is via traces, but that's impractical for what I want to do.
Are there any functions to access this information? If not, can we get some?
It doesn't have to be based off the live environment.
Simply: given a model (or the map), get a list of the collision faces and their position (at a given time, if an animated model).
If there's an issue with accessing the PhysX thread, perhaps it could be a request with a callback (or a pollable object).
My use-case is a HUD that estimates enemy locations (and hence needs to compute visibility), but it's not the only one: local bot navigation, bullet penetration, map layout analyses, etc
Even better would be the ability to insert, remove and modify faces in the map (for both rendering and physics), but that's a long shot...
(Imagine generating a new NS2 map each round using an L-System. Analysing balance and playability would be interesting!)
Comments
Maybe look at the code of the "aura" alien upgrade, close enemies are visible even behind walls with this upgrade.
That just draws sprites over the location of enemy players.
I've made a prototype in LÖVE2D that creates probability fields based on last known enemy position, velocity, etc.
At the moment it's just a test, but it could become interesting.
In order to do it, I need to find the edges of walls and other obstacles.
To do that, I could either trace (a lot) or work with a list of collidable/renderable faces.
It'd be really nice to have some input from an engine dev, even if it's "this will never happen."
For extra credits, adaptive cube sizes :-)
That's how it used to be done back in UT - and those games had some of the finest deathmatch-style AIs out there.