Exemple #1
0
        public static void CreateKinematicData(this MonoEx monoex, out KinematicData data)
        {
            data.velocity        = monoex.cachedRigidbody.velocity;
            data.angularVelocity = monoex.cachedRigidbody.angularVelocity;

            data.position    = monoex.cachedTransform.position;
            data.orientation = monoex.cachedTransform.eulerAngles;
        }
Exemple #2
0
 public static void ApplyPositionAndRotation(this MonoEx monoex, ref KinematicData kinematic_data)
 {
     monoex.cachedTransform.position = kinematic_data.position;
     monoex.cachedTransform.rotation = Quaternion.Euler(kinematic_data.orientation);
 }
Exemple #3
0
 public static void ApplyKinematicVelocity(this MonoEx monoex, ref KinematicData kinimatic_data)
 {
     monoex.cachedRigidbody.velocity        = kinimatic_data.velocity;
     monoex.cachedRigidbody.angularVelocity = kinimatic_data.angularVelocity;
 }