View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002283 | The Dark Mod | Design/Coding | public | 25.06.2010 16:52 | 27.10.2011 05:17 |
Reporter | grayman | Assigned To | grayman | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Win32 | OS | Windows | OS Version | XP |
Product Version | TDM 1.02 | ||||
Target Version | TDM 1.05 | Fixed in Version | TDM 1.05 | ||
Summary | 0002283: Playing cards have invalid mass | ||||
Description | If a card game is being played, TDM complains that a new card has an invalid mass. | ||||
Steps To Reproduce | Drop the card-playing prefab in an otherwise empty room. Build the map and run it. Look at the console messages. | ||||
Additional Information | Though this is invisible to the player, it's eating up cycles to print these warnings, and--more importantly--they get in the way of any debugging messages coming out of our scripts. | ||||
Tags | No tags attached. | ||||
The playing card’s volume is calculated from its polygons. Since it only has two, and has no depth, the volume became a very small number, which led to an invalid mass. By treating a very small number as zero, the mass defaults to 1, which is valid. rev. 4659: tracemodel.cpp clip.cpp (added comment only) anim_blend.cpp (commented console msgs because they were intrusive) |
|
But shouldn't a set mass (via spawnargs) on the entity override the computation of the mass from the volume? | |
I thought it should also, but there are numerous places in the code where mass is determined from the volume of the trace model, as well as numerous places where the spawnarg is used. I wasn't about to override the trace model version with the spawnarg value because as far as I can tell, physics is working the way it's supposed to. I decided that any mass-related problems could be handled as they're reported. The single card is one such instance, because it's a 2-dimensional object, which the trace model volume-calculating algorithm doesn't appear to handle correctly, resulting in a very very small number. Volumes calculated as zero result in an assigned mass of 1, so all I'm doing is checking for near-zero results and treating them like zero if found. |
|
Hm, yeah, still good find! Some day we need to either add a real physics engine, or rip out that mess of half-finished code and replace it with something working. (For instance, the volume of a trace model can differ considerable from the visual model (due to the "only use at max 32 faces for a CM" crap), the engine cannot handle non-uniform density (think "light candle attached to a heavy metal holder") and and and ... The "mass is invalid" has plagued us for some time already, esp with masses under "1" unit (which is in TDM 1 kg, but was some fantasy unit in D3.) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
25.06.2010 16:52 | grayman | New Issue | |
04.08.2010 06:01 | tels | Status | new => assigned |
04.08.2010 06:01 | tels | Assigned To | => tels |
04.03.2011 17:10 | tels | Assigned To | tels => grayman |
07.03.2011 01:06 | grayman | Note Added: 0003708 | |
07.03.2011 01:06 | grayman | Status | assigned => resolved |
07.03.2011 01:06 | grayman | Resolution | open => fixed |
07.03.2011 01:06 | grayman | Fixed in Version | => TDM 1.05 |
07.03.2011 01:06 | grayman | Target Version | => TDM 1.05 |
07.03.2011 07:53 | tels | Note Added: 0003714 | |
07.03.2011 15:43 | grayman | Note Added: 0003715 | |
07.03.2011 16:25 | tels | Note Added: 0003716 | |
27.10.2011 05:17 | greebo | Status | resolved => closed |