MovePartWith() публичный статический Метод

public static MovePartWith ( Part rootPart, List moveWithParts, Vector3 position, Quaternion rotation ) : void
rootPart Part
moveWithParts List
position Vector3
rotation Quaternion
Результат void
Пример #1
0
 public static void MoveAlignLight(Part fromPart, Transform fromTransform, Part toPart,
                                   Transform toTransform, List<Part> partToMoveWith = null) {
   Quaternion rot = Quaternion.FromToRotation(
       fromTransform.forward, -toTransform.forward) * fromPart.transform.rotation;
   Vector3 pos = (fromPart.transform.position - (fromTransform.position - toTransform.position));
   if (partToMoveWith == null) {
     fromPart.transform.rotation = rot;
     fromPart.transform.position = pos;
   } else {
     KAS_Shared.MovePartWith(fromPart, partToMoveWith, pos, rot);
   }
 }