Hi,
I've been adding some dynamic joints to my Adventure Creator player character that use physics (Unity's Character Joints/Rigidbodies) to flop around and provide some secondary motion. I'm using them for a ponytail, pouches that I want to bounce around, things like that.
So far so good but it seems that when my player characters walks/runs in the game the translation position of these dynamic joints lags behind the character. When they stop moving it catches them up.
I've checked 'animate physics' checkbox on the character's Animator component but it doesn't seem to improve things much. I've been digging around online and read that anything that utilizes physics are best updated using FixedUpdate( ) rather than Update( ). Does anyone know which update function Adventure Creator uses to move/translate the player character? I thought if this was being done in Update (with the dynamic joints using FixedUpdate) it might be the reason for the lag.
I've been looking at it for a little while so thought I'd post up and see if anyone had any suggestions.
Thanks in advance,
Alex
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
As this is a very visual problem, seeing some screenshots of the issue would help to understand it.
The physics system was updated in v1.57 - are you using that? Rigidbody-based characters will now move (by default) by having forces applied to them in FixedUpdate(). This is the "best practice" way of doing things, and smooth motion can be enabled by adding Interpolation to the Rigidbody.
If you prefer, you can bypass Rigidbody-based movement altogether, and just rely on transform position changes in Update(), by unchecking Move with Rigidbody? in the character's Inspector.
Are any custom scripts involved? It may be that the Script Execution Order needs to be changed relative to AC's StateHandler script (which handles all of AC's Update calls).