BasSDK icon indicating copy to clipboard operation
BasSDK copied to clipboard

Custom NPC eye bones snap to neck joint

Open IanLiotta opened this issue 1 year ago • 5 comments

I am attempting to build a humanoid NPC based on TestChar. While I've been mostly successful, I have a persistent problem. At the moment of loading in, or if loaded without a working Brain, the NPC's model looks fine. The moment facial animation engages, the eyes snap to the base of the skull and stay there. The eye blinks continue to animate, they're just in the wrong location. I am wondering if this is a limitation of the facial animation system or a bug.

IanLiotta avatar Sep 07 '23 16:09 IanLiotta

Are there any errors in the console and how are the eyes set up? In terms of the model's rig, the eyes in the Creature object and eyes in the CreatureData.

loukylor avatar Sep 08 '23 08:09 loukylor

No console errors.

The rig I'm working from is the one in the Cut Guides provided in the SDK, just with the bones moved around a little (my test character is a goblin with a really big head)

To set up the eyes, I start by copying the Creature Eye components from TestChar's eye bones, pasting them on my rig's eye bones, and changing the transform for the upper and lower lids to refer to my rig. In the Creature component I have Auto Eye Clips Active turned on and under All Eyes I add the Creature Eye references I made. I've tried some variations on these settings but with no positive results.

IanLiotta avatar Sep 08 '23 09:09 IanLiotta

Hm, I'm not entirely sure. That all sounds ok. What brain are you using in the creature's data json?

loukylor avatar Sep 08 '23 09:09 loukylor

HumanMedium. It behaves as expected aside from this eye bug.

IanLiotta avatar Sep 08 '23 10:09 IanLiotta

Really hate to necro this, yet I managed to find a fix.

When you set up the rig and make it a humanoid rig, it will auto populate the bone values. If you go in to edit the avatar and look at the bones in the head, the Left/Right Eye values will default to LeftEye & RightEye (assuming you copied the cut guides skeleton).

If you look at the Test Char provided with the SDK, you can see that the values for the eyes should actually be Left/RightEyeGlobe. If you replace the bones with the Globe bones, the eyes will work as intended. image

Because this is how it's set up in the SDK, I do not think this is a bug.

PlasticTangerine avatar Jun 30 '24 08:06 PlasticTangerine