Character disappears with an Animator component

Hi!

I have a character in my scene with an Animator components that performs a walk animation.

The animator is quite simple. It consist in the “Entry” node that is linked to the walk animation.

But, for some reason that I don’t understand, the character disappear in runtime

One thing that I noted is that if I remove the value of Avatar in Animator component, the character no longer disappears but it doesn’t perform the walk animation.

Is this an error related to Needle?

  • Unity version: 2022.3.1f1
  • Node version: 20.17.0
  • NPM version: 10.8.3
  • NE: 3.47.8
  • Version: 3.41.0-exp

Hi alexdvdsm,

The issue you’re experiencing with the character disappearing during runtime could be related to several factors involving the Animator component. Here’s a checklist to help you identify the problem:

  1. Avatar Configuration: Make sure the Avatar assigned to your Animator component is correctly set up. If the character disappears when you remove the avatar, it suggests that the animator is not referencing the model correctly.

  2. Animation Compatibility: Ensure that the animation clip you’re using is compatible with the avatar. If there are discrepancies in skeletal structure or animation data, it may lead to unexpected results.

  3. Scene Initialization: Sometimes, animations may not play if the scene’s initialization order does not load components in the expected sequence. Double-check to ensure that any dependencies are initialized before your animator tries to play.

  4. Scale and Visibility: Verify that the character’s scale is set correctly and that there are no scripts or parameters hiding the character or setting its scale to zero during initialization.

  5. Debugging: Use the debugging capabilities in your development environment to monitor the execution flow and check if any errors occur that could lead to the character’s disappearance.

Regarding your Needle Engine version (3.47.8 and also 3.41.0-exp), consider checking the changelog or upgrade notes for any related fixes or changes that might impact how animations are processed.

If the issue persists, it would be beneficial to narrow down the exact point of failure by checking logs for any relevant errors. You may also want to inspect the character’s hierarchy in the scene graph during runtime to see if any unexpected transformations are being applied.

Feel free to reach out if you have further questions or need additional assistance!

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

Hi @alexdvdsm

  • does this also happen for this character with an empty scene?
  • does it happen if you disable AutoCompression

Are you sure you have Version: 3.41.0-exp and 3.47.8 installed? If so please make sure to upgrade 3.41 to a non experimental version

Hi @marcel

I updated to the latest (and non experimental :sweat_smile:) version and it keeps happening the same. So I tried your suggestions:

  • Test it in an empty scene: in an empty scene the character didn’t disappear!
  • Disable AutoCompression: the character kept disappearing :(.

Then, after a few more tests, I realised that the character was not, in fact, disappearing. What truly happened is that for some reason it was moving to the position 0, 0, 0. (There is no script or something else that modifies its position)

I managed to solve this by creating an empty GameObject, placing it in the character’s position and then making the character a children of that GameObject, so the 0,0,0 position is be the same as its parent position.

I read on a forum that some models have animations that lock them at a specific location, so I think this issue was related to the model itself and not to any Needle Engine weird behaviour.

Thanks!

Thanks for the update. The character animator controller has a walk animation so that probably modifies the position of the gameobject in which case it would override whatever position you put it in the scene yes (same in Unity playmode)

What you could have also tried in this case to avoid the extra nesting is enabling root motion on the animator (the toggle). But if you dont intent your character to walk through the scene driven by animations then your solution is the best one (adding it as a child and moving the parent)

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.