Animation Offset bug

Hi people!
I’m developing a scrolly time animation as a web portfolio, the problem I am having at the moment is that there seem to be a weird offset for the animations whenever they are playing in the browser. It seems like the offset is affecting most of all the camera movement, the changes in the field of view and the positions of the lights. Is there any option or best practice to avoid this kind of weird offsets?

Hi Alvaro,

For the animation offset issue you are experiencing, it’s important to ensure that clip offsets and transformations are correctly set. Here are some recommendations based on the provided files:

  1. Check Track Offsets: Ensure that the positions and rotations of your clips are treated as Vector3 and Quaternion, respectively. Use the ensureTrackOffsets method to confirm this during evaluations (see the documentation) (see the documentation).

  2. Clip Data: When evaluating animations, track the total offsets applied to both position and rotation. It might be useful to log these values during updates to understand how they change over time (see the documentation).

  3. Animation Blend Weights: Make sure that the animation blend weights are managed properly. If different animations are influencing the same object, their weights must be balanced to avoid unexpected shifts (see the documentation).

  4. Debugging Values: Use debug logging to track the position and rotation values before and after applying these animations. This will help you pinpoint where the offsets are being introduced (see the documentation) (see the documentation).

  5. Camera and Light Configuration: If there are transformations tied to your camera or lights, confirm that their positions are set in accordance with the animated object’s transformations. Also, check if their initial states are reset or adjusted during animation playback (see the documentation).

  6. Testing with Simplified Animation: Temporarily disable other animations and test with a simplified version to isolate the issue. This will help determine whether the problem lies within a specific clip or a conflict with other animations (see the documentation).

Follow these best practices, and you should be able to mitigate the offset issues in your animations. If you continue facing difficulties, please provide more specific details about your setup or any error messages.

You can also refer to the Needle Engine Documentation for more guidance on animation handling.

Feel free to ask if you need further assistance!

3 replies left
thread_rhAb7O6L4hQzio3edIwOZu4y
Reply to this message to continue the conversation

Hi, can you share screenshots and a video of what you experience? Thank you

Sure, hope you don’t mind temporal links:
This is how it looks in the editor: Watch Website02 | Streamable
this is how it is looking in a browser: Watch Animation Bug | Streamable

Can you check if:

  • you have any extra components on the camera like OrbitControls?
  • there are any errors in Unity on export?
  • or any error in the browser console?

the camera has no other components attatched to it.
Unity throws no errors
the browser has the following error:
THREE.PropertyBinding: Trying to update property for track: .cameras.Main_Camera.m_FocalLength but it wasn’t found.

also while testing I realized that it doesn’t matter if I deactivate some of the animations, they keep playing while on the browser… is it possible that the animation I’m working on isn’t being exported but rather an old version of it? I’ve checked and there’s no other Timeline Asset in my scene. I changed the background color as well and no changes are reflected anymore.