View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001160 | The Dark Mod | AI | public | 22.09.2008 08:16 | 29.06.2009 08:06 |
| Reporter | Ishtvan | Assigned To | Ishtvan | ||
| Priority | high | Severity | normal | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0001160: AF bodies for attached entities misplaced (world vs AI orientation issue?) | ||||
| Description | I tried spawning builder guards. When I spawned them facing a certain way (presumably parallel to the world), the AF body for their hammers was correctly placed upon KO. However, at other orientations, the AF body was not correctly placed on KO. This will cause problems with the ragdoll, tactile feedback, etc. | ||||
| Tags | No tags attached. | ||||
|
They also seem to get misplaced upon calling ReAttach. I have a hunch that stuff is getting bound a second time when the AI goes into ragdoll, based on looking at it with g_showcollisionmodels. |
|
|
I noticed the positions all get corrected when attachments are re-initialized after a save/restore. Weird, save/restores usually break things, not fix them. :) That probably means that it has to do with the T-pose on spawn or something. |
|
|
This issue is harder to fix than expected. It seems that the AF body starts out in the right place, and gets sucked into the wrong place (the place it would be if the AI was in the T-pose and facing at 0,0,0 degrees) when going into ragdoll mode. This obviously doesn't happen to the AI's usual AF bodies, and it also doesn't happen after going ragdoll, because you can shoot in arrows and their clipmodels are in the right place. Recommended action is to check all the difference between how dynamically added bodies are treaed and how regular AF bodies are treated in the physics. It is NOT the JointMods variable that is wrong, I tried setting that to something ridiculous and, while starting out there, it got sucked back to the same erroneous place. This tells us JointMods is actually correct and something else (af physics?) is sucking it back to the wrong place. |
|
|
Problem seems to lie in the fixed constraint between the added body and the body it gets added to. This defines how the added body wants to be placed and oriented relative to the body it's attached to. For some reason, def_attached objects are being "glued" in place when they're in the T-pose, but then not updating the constraint when it rotates out of the T-pose. Maybe something in idPhysics_AF::AddConstraint assumes that the AI is oriented at 0,0,0 angles when this is called, and uses the position the attach-ee AF body would have if the AI was rotate to 0,0,0? There could be an additional problem, because the hammer clipmodel in the hand seems to be wrong when reattached, and that is controlled by the animation, not yet effected by constraints, because that doesn't happen until the AI goes ragdoll (although it's not 100% certain it's a separate problem). |
|
|
fixed in src by rotating AF back to 0,0,0 angles before doing the attachments Reattach AF body misplacement is a separate issue apparently, will open it as such. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 22.09.2008 08:16 | Ishtvan | New Issue | |
| 22.09.2008 08:16 | Ishtvan | Status | new => assigned |
| 22.09.2008 08:16 | Ishtvan | Assigned To | => Ishtvan |
| 23.09.2008 08:58 | Ishtvan | Note Added: 0001628 | |
| 27.09.2008 03:47 | Ishtvan | Note Added: 0001650 | |
| 27.09.2008 03:47 | Ishtvan | Note Edited: 0001650 | |
| 05.10.2008 03:29 | Ishtvan | Note Added: 0001775 | |
| 05.10.2008 04:09 | Ishtvan | Note Added: 0001776 | |
| 05.10.2008 07:35 | Ishtvan | Note Added: 0001777 | |
| 05.10.2008 07:35 | Ishtvan | Status | assigned => resolved |
| 05.10.2008 07:35 | Ishtvan | Resolution | open => fixed |
| 29.06.2009 08:06 | greebo | Status | resolved => closed |