public virtual float GetSumOfOtherObjectsMass(bool p_includeChildrens = true, bool p_multiplyByGravityScale = true) { float v_sumOfOtherObjectsMass = 0; List <GameObject> v_otherObjects = GetAllOtherAttachedObjectsInPluggedRopes(); foreach (GameObject v_object in v_otherObjects) { v_sumOfOtherObjectsMass += KiltUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale); } return(v_sumOfOtherObjectsMass); }
public float GetSumOfIndirectObjectsMass(bool p_includeOtherPluggedObjects = true, bool p_includeChildrens = true, bool p_multiplyByGravityScale = true) { List <GameObject> v_indirectOtherObjectsList = GetAllIndirectObjects(p_includeOtherPluggedObjects); float v_massSum = 0; foreach (GameObject v_object in v_indirectOtherObjectsList) { v_massSum += KiltUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale); } return(v_massSum); }
public float GetSelfMass(bool p_includeChildrens = true, bool p_multiplyByGravityScale = true) { return(KiltUtils.GetObjectMass(this.gameObject, p_includeChildrens, p_multiplyByGravityScale)); }