private void init(RigidbodyWarper warper)
            {
                Vector3    interactionPosition = warper.RigidbodyPosition;
                Quaternion interactionRotation = warper.RigidbodyRotation;

                _inverseTransformMatrix = Matrix4x4.TRS(interactionPosition, interactionRotation, Vector3.one).inverse;
            }
        protected override void OnRegistered()
        {
            base.OnRegistered();

            _controllers = new ControllerContainer(this, _material);

            _materialReplacer = new PhysicMaterialReplacer(transform, _material);
            _warper           = new RigidbodyWarper(_manager, transform, _rigidbody, _material.GraphicalReturnTime);

            _childrenArray = GetComponentsInChildren <Transform>(true);

            _contactMode = ContactMode.NORMAL;
            updateLayer();
        }
        protected override void OnUnregistered()
        {
            base.OnUnregistered();

            Assert.IsTrue(UntrackedHandCount == 0);

            // Ditch this object in the layer that doesn't collide with brushes in case they are still embedded.
            _contactMode = ContactMode.SOFT;
            updateLayer();

            _warper.Dispose();
            _warper = null;

            revertRigidbodyState();
        }
            public static HandPointCollection Create(RigidbodyWarper warper)
            {
                HandPointCollection collection;

                if (_handPointCollectionPool.Count != 0)
                {
                    collection = _handPointCollectionPool.Pop();
                }
                else
                {
                    collection = new HandPointCollection();
                }

                collection.init(warper);
                return(collection);
            }
    protected override void OnUnregistered() {
      base.OnUnregistered();

      Assert.IsTrue(UntrackedHandCount == 0);

      // Ditch this object in the layer that doesn't collide with brushes in case they are still embedded.
      _contactMode = ContactMode.SOFT;
      updateLayer();

      _warper.Dispose();
      _warper = null;

      revertRigidbodyState();
    }
    protected override void OnRegistered() {
      base.OnRegistered();

      _controllers = new ControllerContainer(this, _material);

      _materialReplacer = new PhysicMaterialReplacer(transform, _material);
      _warper = new RigidbodyWarper(_manager, transform, _rigidbody, _material.GraphicalReturnTime);

      _childrenArray = GetComponentsInChildren<Transform>(true);

      _contactMode = ContactMode.NORMAL;
      updateLayer();
    }
 private void init(RigidbodyWarper warper) {
   Vector3 interactionPosition = warper.RigidbodyPosition;
   Quaternion interactionRotation = warper.RigidbodyRotation;
   _inverseTransformMatrix = Matrix4x4.TRS(interactionPosition, interactionRotation, Vector3.one).inverse;
 }
      public static HandPointCollection Create(RigidbodyWarper warper) {
        HandPointCollection collection;
        if (_handPointCollectionPool.Count != 0) {
          collection = _handPointCollectionPool.Pop();
        } else {
          collection = new HandPointCollection();
        }

        collection.init(warper);
        return collection;
      }