Esempio n. 1
0
        public static glTF_VCAST_vci_PhysicMaterial GetglTFPhysicMaterial(PhysicMaterial material)
        {
            var result = new glTF_VCAST_vci_PhysicMaterial();

            result.dynamicFriction = material.dynamicFriction;
            result.staticFriction  = material.staticFriction;
            result.bounciness      = material.bounciness;
            result.frictionCombine = GetStringFromCombine(material.frictionCombine);
            result.bounceCombine   = GetStringFromCombine(material.bounceCombine);
            return(result);
        }
Esempio n. 2
0
        public static void AddPhysicMaterial(Collider collider, glTF_VCAST_vci_PhysicMaterial material)
        {
            var physicMaterial = new PhysicMaterial();

            physicMaterial.dynamicFriction = material.dynamicFriction;
            physicMaterial.staticFriction  = material.staticFriction;
            physicMaterial.bounciness      = material.bounciness;
            physicMaterial.frictionCombine = GetCombineFromString(material.frictionCombine);
            physicMaterial.bounceCombine   = GetCombineFromString(material.bounceCombine);
            collider.sharedMaterial        = physicMaterial;
        }