Is it possible to edit a bones local axis via a C# script? I am using an external sensor strapped to my upper leg which is sending quaternion data to my unity application making the humanoid upper leg mimic my movement.
The issue is if the sensor is slightly off center on my leg the sensors axis and humanoids axis arent aligned. I need to send an offset to unity which offsets the bone local axis so my movement is accurate. This needs to be done via C# because it will constantly change everytime someone calibrates their sensors.
I have read loads of comments saying its not possible to alter a bones local axis but I was wondering if it was possible via a script. If its simply not possible doesnt anyone else have any suggestions on how I can fix my issue.
The sensor I use has fixed axis so if I rotate the x-axis on the sensor the humanoids leg will move forward and back but if I strap the sensor to my leg and its a little off center, the x-axis and z-axis are both being altered when I move my leg forward and back.
The simple fix would be changing the local axis of the bone like I mentioned above so the bones x-axis is facing the same way as the sensors x-axis.
Any help is really appreciated, I've been working on this problem for a week now.
question from:
https://stackoverflow.com/questions/65850654/alter-unity-humanoid-bone-local-axis 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…