Exemplo n.º 1
0
 void ConfigSpringJoint2D(SpringJoint2D sp, SpringSetting setting)
 {
     sp.autoConfigureConnectedAnchor = setting._bAutoConfigAnchors;
     sp.autoConfigureDistance        = setting._bAutoConfigDist;
     if (!setting._bAutoConfigDist)
     {
         sp.distance = setting._Dist;
     }
     sp.frequency    = setting._Freq;
     sp.dampingRatio = setting._Damp;
 }
Exemplo n.º 2
0
        public static SpringSetting ToGltf(this SpringBone self, List <Node> nodes)
        {
            var setting = new SpringSetting
            {
                DragForce    = self.DragForce,
                GravityPower = self.GravityPower,
                Stiffness    = self.Stiffness,
                GravityDir   = self.GravityDir.ToFloat3(),
            };

            return(setting);
        }