Strange Animation Behaviour

So, when making animations for an enemy in my game, I found that strange behaviour was occurring.

When in the animation editor, and if the HumanoidRootPart was anchored, the animation would be played back correctly.

https://a.pomf.cat/oiphke.webm

However, in-game, when the HumanoidRootPart was unanchored, the behaviour would be quite strange indeed.

https://a.pomf.cat/xuuqrz.webm

The HRP is highlighted as neon red. The HRP moves, but the torso seems to remain mostly static? It’s also rotated strangely.

Some help in remedying this would be appreciated.

@AbstractAlex

1 Like

Questions:

  1. Do you have a part named HumanoidRootPart? Torso?

  2. If so, what are their sizes?

Often when I see these issues it is because the HumanoidRootPart does not become the assembly root because it does not have enough mass.

5 Likes

Ah, thanks.

I resized the HRP up slightly and that appeared to fix it.

Is there anything that could be fixed here on your end, or is it easier to just allow players to work it out :?

Can you try making your HumanoidRootPart larger than the torso and seeing if the issue persists? Just to rule out one possible reason it wouldn’t work.

Edit: (Ninja’d) Glad that works!

On our end, the way the physics engine works is by taking the larger part as the root of the geometry. There are special “mass multipliers” that apply to Torso, hrp and Seats to ensure they usually get to be assigned as an assembly root. I believe this is still how we do it.

To answer your question, I do not believe this will change on our end. A way of detecting this in the editor would be fantastic though. I’ll look into implementing something like this.

2 Likes

Hmm, alright.

Thanks for the help, though!

What’s curious is that earlier I tried setting Torso density to 0.01 (in run-time, i believe), and that didn’t actually fix it.

I don’t believe density plays any role in determining an assembly (what we call a chain of connected parts) root.

I could be wrong though, @Khanovich would know for sure!

Sorry for probably asking the wrong person here, but do you reckon that’s intended behaviour?

This arbitrary behavior needs to stop. Part0 should be the root and Part1 should be the subpart. @CodeWriter @Silent137 here’s another reason to add onto the ones you responded to in these threads:

2 Likes

Could you post the original sizes of your Torso and hrp? Before you fixed it?

“hrp is 2, 2, 2
torso is 2.765, 3.134, 4.8”

and then I resized HRP to 3,3,3, which fixed the issue

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