- Home /
Question by
sonapax · Mar 06, 2013 at 11:28 AM ·
pivotpivot-point
temporarily change the pivot, scale, pivot back
this code in Update() с#:
Quaternion tmpPivotCalf;
Quaternion tmpPivotLeg;
tmpPivotLeg = legLeft.transform.rotation;
tmpPivotCalf = legCalfLeft.transform.rotation;
legCalfLeft.transform.rotation = tmpPivotCalf;
legCalfLeft.transform.rotation = legLeft.transform.rotation;
legCalfLeft.transform.localScale = new Vector3 (1/scaleHipVar,1/scaleHipVar,1);
legCalfRight.transform.localScale = new Vector3 (1/scaleHipVar,1/scaleHipVar,1);
legCalfLeft.transform.rotation = tmpPivotCalf;
// without this work perfect, with this not take effect legCalfLeft.transform.rotation = legLeft.transform.rotation;
Comment
I need to change the hip, but the calf child also scale. I scale calf inverse, but pivot points other angles (calf skew). I'm trying to bring to the same angle, scale, return the pivot point.
Answer by sonapax · Mar 06, 2013 at 02:59 PM
partly solved. I divided the hip bone in cinema4d, 2 part of hip size of 0.001. And after scaling hip, reverse scale hipDummy. leg not skewed because the same pivot coordinates
Your answer
Follow this Question
Related Questions
Get sprite pivot point in world space 0 Answers
How to make a turret focus on a point? 1 Answer
Changing Pivot of rotated RectTransform makes the Object jump to an incorrect Position 1 Answer
Problem with 3D pivot 0 Answers
OnPostprocessTexture TextureImporter.spritePivot doesn't seem to work. 1 Answer