示例#1
0
 private static FlipperVelocityData GetVelocityData(FlipperStaticData d)
 {
     return(new FlipperVelocityData {
         AngularAcceleration = 0f,
         ContactTorque = 0f,
         CurrentTorque = 0f,
         Direction = d.AngleEnd >= d.AngleStart,
         IsInContact = false
     });
 }
示例#2
0
        private FlipperMovementData GetMovementData(FlipperStaticData d)
        {
            // store flipper base rotation without starting angle
            var baseRotation = math.normalize(math.mul(
                                                  math.normalize(transform.rotation),
                                                  quaternion.EulerXYZ(0, 0, -d.AngleStart)
                                                  ));

            return(new FlipperMovementData {
                Angle = d.AngleStart,
                AngleSpeed = 0f,
                AngularMomentum = 0f,
                EnableRotateEvent = 0,
                BaseRotation = baseRotation,
            });
        }