» Tue Jun 19, 2012 1:31 pm
From what I've seen so far, the main issue with TCLing actors that are moving is that after a few seconds if their elevation changes, they start walking up into the air or down into the ground. I tried a lot of stuff ingame on actors, and right now the best workaround to me seems to be TCLing actors, but every 1 out of 10 frames you toggle TCL back for one frame, and you do a check if they are starting to fall (could simply be an animation state check, or a certain Z position change) and if they do keep TCL on for a while. The moment they change their animation state from falling to something else (landing anim or 2 frames with the same z position) you TCL them back off.
Another method to check if their feet reaches collision, is putting an invisible Activator object a very short distance under their feet and then call a LOS check on the Actor towards the Activator. If the feet reach collision, the LOS will be negative. If the feet don't reach collision, the LOS is positive. It's a pretty fail-safe system, but costs some performance (LOS checks are relatively heavy). Shouldn't be done every frame, but every half a second or so.
I'm sure there will be other problems, but I'm going to try anyway.