After searching for a while at the unity answer forums and by looking at the head turning script provided in the asset store, it seems that Unity has a second update function called LateUpdate.
The update function used by the programmer in almost every situation is being called every frame. However, after the update function, unity takes over and applies some additional steps (preprocessing, shading, etc.). These steps include animation. So when we adjust a bone in the Update() function, unity will later override it. Enter the LateUpdate() function. This function is called after unity has had the opportunity to interfere. It is in this LateUpdate() function that the programmer has the opportunity to override decisions made by Unity. As a result adjusting animation and armature bones should be done in this function.
Geen opmerkingen:
Een reactie posten