Facepunch / garrysmod-issues

Garry's Mod issue tracker
136 stars 56 forks source link

Scaling Bone matricies for procedural bones. #3502

Open PredatorCZ opened 6 years ago

PredatorCZ commented 6 years ago

Applying functions like Entity.SetModelScale, or VMatrix get >scale >set, will not affect procedural bone's additive matricies, resulting with unwanted results.

Proof: https://imgur.com/a/azk3O2W

Wings, and lower "tentacles" are procedural bones (jigglebones to be more specific)

thegrb93 commented 5 years ago

Also IK gets disabled.

robotboy655 commented 5 years ago

I was not able to reproduce this with VMatrix get >scale >set method (Used code from https://wiki.garrysmod.com/page/Entity/SetBoneMatrix) but I can confirm SetModelScale doing it, and it is sort of indented to be that way due to how it is set up in the engine. ManipulateBoneScale doesn't look affected either.

I wasn't able to find a quick solution that isn't causing side effects.

IK behavior most likely won't be changed, it is specifically disabled for scaled models and entities with render matrix override so the bones can be changed.

thegrb93 commented 5 years ago

Yeah, understandable. I just added that behavior to the wiki for EnableMatrix function