public void StartManipulation(MyManipulationTool.MyState state, MyEntity otherEntity, Vector3D hitPosition, ref MatrixD ownerWorldHeadMatrix)
        {
            StartManipulationMsg msg = new StartManipulationMsg();
            msg.EntityId = m_entityId;
            msg.ToolState = state;
            msg.OtherEntity = otherEntity.EntityId;
            msg.HitPosition = hitPosition;
            msg.OwnerWorldHeadMatrix = ownerWorldHeadMatrix;

            MySession.Static.SyncLayer.SendMessageToAllAndSelf(ref msg);
        }
        public void StartManipulation(MyManipulationTool.MyState state, MyEntity otherEntity, Vector3D hitPosition, ref MatrixD ownerWorldHeadMatrix)
        {
            StartManipulationMsg msg = new StartManipulationMsg();
            msg.EntityId = m_entityId;
            msg.ToolState = state;
            msg.OtherEntity = otherEntity.EntityId;
            msg.HitPosition = hitPosition;
            msg.OwnerWorldHeadMatrix = ownerWorldHeadMatrix;

            MyManipulationTool manipulationTool;
            if (MyEntities.TryGetEntityById(msg.EntityId, out manipulationTool))
            {
                manipulationTool.StartManipulation(state, otherEntity, hitPosition, ref ownerWorldHeadMatrix);
                if (!Sync.IsServer && manipulationTool.IsHoldingItem)
                    MySession.Static.SyncLayer.SendMessageToServer(ref msg);
            }
        }