Author Topic: Causing an NPC to fall  (Read 12634 times)

Yoshiboy

  • Guest
Re: Causing an NPC to fall
« Reply #15 on: January 20, 2007, 11:43:16 am »
Actually I think you are right here, from my tests what i have realized is if an agent is pushing against the movement of a collision mesh he will pass through it and get stuck in the air where the collision mesh was. Its quite possible the agent can't fall. Still, I would try rotating the a plain mesh to see what happens.

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Causing an NPC to fall
« Reply #16 on: January 20, 2007, 12:38:24 pm »
Well, I haven't checked this on any other axes than the vertical, but from my tests it looks like the coupling between the agent and the scene prop is velocity-dependent (whether relative or absolute, I don't know), and the willingness to fall has a vertical-distance component as well as a velocity-coupling component.

If the velocity of the prop is very high, the agent moves only a tiny bit or not at all, as though the prop were only partly tangible.  If the velocity of the prop is low, the agent moves with it with only a slight lag as the engine calculates things.

Specifically, in my tests:
- Upward motion of 2m in 0.25s, and of 1.05m in 0.1s, works.  The agent goes with the prop.  (The extra 0.05m is just 'cause of a detail in how I set up the tests.)
- Upward motion of 4m in 0.25s sort of works - I ended up waist-deep in the prop, having moved about 3.5m or something.
- Upward motion of 2.05m in 0.1s, and of 8m in 0.25s, causes the prop to shoot through the agent and the agent to move little or not at all.

- Downward motion of 4m in 1s, or 2m in 0.25s, works without harm, the agent rides it down.
- Downward motion of 8m in 1s fails; the agent hangs in midair.  This was the result I saw in my original tests; I was moving it too fast or too far.
- Downward motion of 4m in 0.25s causes a fall with falling damage.  The fall is only about 3m of the 4m, curiously.  Yay!  I can work with this.

There also appear to be extremes of motion where there are large amounts of direct damage caused to the agent, without moving the agent a whole lot.  I'll definitely be investigating this - we could end up with a "kill_agent" script!  But I should probably work on my upcoming release first.

- Hellequin