A control method, device, electronic device and storage medium for a virtual model

By detecting the control mode and dwell time of the sliding operation and switching the control mode, the problem of incoherent virtual model control is solved, operation efficiency and continuity are improved, and a more natural interactive experience is provided.

CN114816148BActive Publication Date: 2024-10-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202210405202.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2024-10-18
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

In the existing virtual model control method, the movement, rotation and scaling operations are incoherent, causing the user to have a sense of interruption and stagnation during the process of placing the virtual model, which reduces the operation efficiency.

Method used

By detecting the control mode and dwell time of the sliding operation, switching the control mode, and using the sliding operation to achieve different control effects such as movement, rotation, and scaling, the control continuity and efficiency of the virtual model are improved.

Benefits of technology

It improves the control continuity and operation efficiency of the virtual model, reduces the number of interface controls, and provides a more natural interactive experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816148B_ABST
    Figure CN114816148B_ABST
Patent Text Reader

Abstract

The present application provides a control method, device, electronic device and storage medium for a virtual model. The method includes determining a control mode of the target virtual model when a sliding operation is received, and controlling the target virtual model based on the sliding operation and the control mode. When it is determined that the dwell time of the sliding operation is greater than a first preset time, switching the control mode, and controlling the target virtual model based on the sliding operation and the switched control mode, thereby switching the control mode by judging the dwell time of the sliding operation, and achieving different control effects through the same sliding operation under different control models, thereby improving the continuity of the virtual model control operation and improving the control efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of skill control technology, and in particular to a control method, device, electronic device and storage medium for a virtual model. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] With the improvement of electronic hardware performance, the three-dimensional models and scene environments in many systems are becoming more and more in line with the real environment in real life. In these systems, users can control the virtual models in the system through operations such as moving, rotating, and scaling. Nowadays, the widely used operations of moving, rotating, and scaling virtual models in most systems with virtual models are achieved by dragging and clicking the rotation control and the scaling control, respectively. This operation method causes users to feel interrupted and stagnant in the process of placing virtual models. At the same time, since each operation is not smoothly connected, the operation efficiency is also reduced. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a control method, device, electronic device and storage medium of a virtual model.

[0005] Based on the above purpose, the present application provides a control method of a virtual model, comprising:

[0006] In response to receiving a sliding operation on a target virtual model, determining a control mode of the target virtual model, and controlling the target virtual model based on the sliding operation and the control mode;

[0007] In response to determining that the dwell time of the sliding operation is greater than a first preset time, the control mode is switched, and the target virtual model is controlled based on the sliding operation and the switched control mode.

[0008] In some embodiments, the control mode includes a movement control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0009] In response to determining that the control mode of the target virtual model is the movement control mode, the target virtual model is moved based on the sliding operation.

[0010] In some embodiments, the control mode includes a rotation control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0011] In response to determining that the control mode of the target virtual model is the rotation control mode, the target virtual model is rotated based on the slide operation.

[0012] In some embodiments, the control mode includes a zoom control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0013] In response to determining that the control mode of the target virtual model is the zoom control mode, the target virtual model is zoomed based on the sliding operation.

[0014] In some embodiments, scaling the target virtual model based on the sliding operation specifically includes:

[0015] Determining a sliding direction of the sliding operation;

[0016] Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin;

[0017] In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, enlarging the target virtual model;

[0018] In response to determining that an angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is reduced.

[0019] In some embodiments, rotating the target virtual model based on the sliding operation specifically includes:

[0020] Determining a sliding direction of the sliding operation;

[0021] The rotation direction of the target virtual model is controlled based on the sliding direction.

[0022] In some embodiments, controlling the rotation direction of the target virtual model based on the sliding direction specifically includes:

[0023] Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin;

[0024] In response to determining that the included angle between the sliding direction of the sliding operation and the positive semi-axis of the X-axis of the coordinate system is less than a first preset angle, controlling the target virtual model to rotate clockwise;

[0025] In response to determining that an included angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is controlled to rotate counterclockwise.

[0026] In some embodiments, controlling the rotation direction of the target virtual model based on the sliding direction specifically includes:

[0027] Determine a target point of the target virtual model, and establish a coordinate system with the target point as the coordinate origin;

[0028] In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, and the sliding operation is located on a first side of a Y-axis of the coordinate system, controlling the target virtual model to rotate clockwise;

[0029] In response to determining that the included angle between the sliding direction of the sliding operation and the negative half axis of the X-axis is less than a first preset angle, and the sliding operation is located on the second side of the Y-axis, the target virtual model is controlled to rotate counterclockwise.

[0030] In some embodiments, rotating the target virtual model based on the sliding operation specifically includes:

[0031] Recording the displacement length of the sliding operation starting from the sliding starting point;

[0032] The rotation angle of the target virtual model is controlled based on the displacement length.

[0033] In some embodiments, the sliding track of the sliding operation is a straight line; rotating the target virtual model based on the sliding operation specifically includes:

[0034] Recording the number of slides of the slide operation;

[0035] controlling a rotation angle of the target virtual model based on the number of slides;

[0036] Wherein, each time the sliding operation is performed, the target virtual model rotates by a second preset angle.

[0037] In some embodiments, the sliding track of the sliding operation is a straight line, and rotating the target virtual model based on the sliding operation specifically includes:

[0038] Recording the number of sliding operations in the continuous sliding; wherein the continuous sliding includes at least two sliding operations, and the time interval between two adjacent sliding operations is less than a second preset time length;

[0039] controlling a rotation angle of the target virtual model based on the number of the sliding operations;

[0040] The target virtual model does not receive the sliding operation within a second preset time period and no longer responds to the rotation control corresponding to the sliding operation.

[0041] In some embodiments, in response to determining that the dwell time of the sliding operation is greater than a preset time, switching the control mode specifically includes:

[0042] In response to the sliding operation remaining stationary, recording the duration of the sliding operation and displaying a mode switching animation; wherein the mode switching animation is used to indicate the switching progress of the control mode;

[0043] In response to determining that the stay duration is greater than a preset duration, the control mode is switched.

[0044] In some embodiments, in response to determining that the dwell time of the sliding operation is greater than a first preset time, switching the control mode specifically includes:

[0045] In response to determining that the duration of the sliding operation on the target virtual model is greater than a first preset duration, the control mode is switched.

[0046] Based on the same inventive concept, the exemplary embodiment of the present application further provides a control device for a virtual model, including:

[0047] a first control module, in response to receiving a sliding operation on a target virtual model, determining a control mode of the target virtual model, and controlling the target virtual model based on the sliding operation and the control mode;

[0048] The second control module switches the control mode in response to determining that the dwell time of the sliding operation is greater than a first preset time, and controls the target virtual model based on the sliding operation and the switched control mode.

[0049] Based on the same inventive concept, an exemplary embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the control method of the virtual model as described above when executing the program.

[0050] Based on the same inventive concept, an exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium, which stores computer instructions for causing a computer to execute the control method of the virtual model as described above.

[0051] From the above, it can be seen that the control method of the virtual model provided by the present application, when receiving a sliding operation on the target virtual model, determines the control mode of the target virtual model, and controls the target virtual model based on the sliding operation and the control mode, and when it is determined that the dwell time of the sliding operation is greater than the first preset time, switches the control mode, and controls the target virtual model based on the sliding operation and the switched control mode, thereby switching the control mode by judging the dwell time of the sliding operation, and achieving different control effects through the same sliding operation under different control models, thereby improving the continuity of the virtual model control operation and improving the control efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A schematic diagram of a flow chart of a control method of a virtual model in the prior art;

[0054] Figure 2 A schematic diagram of rotating a target virtual model through a sliding operation according to an embodiment of the present application;

[0055] Figure 3 A schematic diagram of a control mode switching animation according to an embodiment of the present application;

[0056] Figure 4 A schematic diagram of the structure of a device for controlling skill release according to an embodiment of the present application;

[0057] Figure 5 A schematic diagram of the structure of a specific electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0058] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0059] According to the implementation manner of the present application, a control method, device, electronic device and storage medium of a virtual model are proposed.

[0060] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0061] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application. SUMMARY OF THE INVENTION

[0063] In the prior art, the virtual model is moved by dragging it from the list to the desired position, while the rotation of the virtual model is divided into two types according to whether it is a fixed rotation angle: one is to rotate the furniture clockwise / counterclockwise at a fixed angle by clicking the rotation button control provided by the system; the other is to click the rotation control, slide clockwise / counterclockwise around the virtual model, and then freely rotate it at any angle according to the sliding angle to adjust the direction of the virtual model. In addition, virtual models often need to be scaled, and the disadvantage of these operation methods is that the movement, scaling and rotation operations are not continuous. After the user drags the virtual model out of the list, if he wants to rotate the virtual model, he can generally only end the dragging operation first, such as lifting his finger to release the virtual model, and then clicking the corresponding control to rotate or scale. The switching of these three operations is not smooth, which causes the player to feel interrupted and stagnant in the process of placing the virtual model. At the same time, since the two operations are not smoothly connected, the operation efficiency is also reduced. In addition, it is easy to accidentally touch when there are many virtual models in the same space.

[0064] In order to solve the above problems, the present application provides a virtual model control method, which specifically includes: when a sliding operation is received for a target virtual model, determining the control mode of the target virtual model, and controlling the target virtual model based on the sliding operation and the control mode; when it is determined that the dwell time of the sliding operation is greater than a first preset time, switching the control mode, and controlling the target virtual model based on the sliding operation and the switched control mode, thereby switching the control mode by judging the dwell time of the sliding operation, and achieving different control effects through the same sliding operation under different control models, thereby improving the continuity of the virtual model control operation and improving the control efficiency.

[0065] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.

[0066] Application Scenario Overview

[0067] In some specific application scenarios, the virtual model control method of the present application can be applied to various systems including virtual models. The system can be controlled by a touch screen or by other control components such as a handle and a mouse, without limitation.

[0068] In some specific application scenarios, the virtual model control method of the present application can be applied to other systems involving the movement and rotation of virtual models. The virtual model may include various virtual models involving movement and rotation. Optionally, the virtual model may be a virtual building, virtual furniture, virtual icon, etc.

[0069] In some specific application scenarios, the control method of the virtual model of the present application can be directly applied to run locally, or it can be run in a cloud server. When running on a cloud server, the acquired data to be processed is sent to the cloud server through the network, and the server processes the data to be processed through the control method of the virtual model of the present application, and sends the processing results to the local through the network.

[0070] The following describes the control method of the virtual model according to the exemplary embodiment of the present application in conjunction with a specific application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this regard. On the contrary, the implementation of the present application can be applied to any applicable scenario.

[0071] Exemplary Methods

[0072] refer to Figure 1 , the embodiment of the present application provides a control method for a virtual model, comprising the following steps:

[0073] S101 : In response to receiving a sliding operation on a target virtual model, determining a control mode of the target virtual model, and controlling the target virtual model based on the sliding operation and the control mode.

[0074] In specific implementation, when a sliding operation is received for a target virtual model, the control mode of the current target virtual model is first determined. The target virtual model is the virtual model that the user is currently controlling. Optionally, each virtual model can be controlled to start operation before being controlled. Only when the virtual model turns on the controlled function can the user control it through a sliding operation. Optionally, the virtual model can also be controlled directly through a sliding operation, that is, each virtual model can directly re-determine its position through a sliding operation.

[0075] It should be noted that the sliding operation in this embodiment can be implemented by touching the screen with a finger or by dragging the virtual model with a mouse, which is not limited here. Each virtual model can include multiple control modes, and optionally, each virtual model includes at least a rotation control mode and a movement control mode. When the virtual model is in different control modes, different action instructions may be executed even if the same sliding operation is received.

[0076] S102: In response to determining that the dwell time of the sliding operation is greater than a first preset time, switching the control mode, and controlling the target virtual model based on the sliding operation and the switched control mode.

[0077] In a specific implementation, when the duration of the sliding operation on the target virtual model is greater than a first preset duration, the control mode of the target virtual model is switched. Optionally, the first preset duration can be set as needed and is not limited here. For example, the first preset duration can be set to 1 second. Optionally, the switching mode can be switched from a rotation control mode to a movement control mode, or from a movement control mode to a rotation control mode. After the control mode switching is completed, when a sliding operation on the target virtual model is received again, the target virtual model will be controlled according to the current sliding operation and the switched control mode.

[0078] In some embodiments, the current control mode of the target virtual model can be a mobile control mode. The user can first move the target virtual model to a specified position through a sliding operation. When the user wants to continue to control the target virtual model through rotation, the user only needs to keep the previous sliding operation in place for a first preset time period to switch the mobile control mode to the rotation control mode, and continue to achieve rotation control of the virtual model through the sliding operation. Then, when the user wants to continue to control the target virtual model through zooming, the user only needs to keep the previous sliding operation in place for a first preset time period to switch the rotation control mode to the zoom control mode, and continue to achieve zoom control of the virtual model through the sliding operation.

[0079] In some embodiments, the control mode includes a movement control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0080] In response to determining that the control mode of the target virtual model is the movement control mode, the target virtual model is moved based on the sliding operation.

[0081] In a specific implementation, when the control mode of the target virtual model is the moving control mode, the target virtual model is moved according to the sliding operation. Optionally, the moving direction and distance of the target virtual model are consistent with the sliding direction and distance of the sliding operation.

[0082] In some embodiments, the control mode includes a zoom control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0083] In response to determining that the control mode of the target virtual model is the zoom control mode, the target virtual model is zoomed based on the sliding operation.

[0084] In some embodiments, scaling the target virtual model based on the sliding operation specifically includes:

[0085] Determining a sliding direction of the sliding operation;

[0086] Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin;

[0087] In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, enlarging the target virtual model;

[0088] In response to determining that an angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is reduced.

[0089] In specific implementation, when it is determined that the control mode of the target virtual model is the zoom control mode, the target virtual model is zoomed based on the sliding operation. In specific control, the sliding direction of the sliding operation is first determined; a coordinate system is established with the starting point of the sliding operation as the coordinate origin; when it is determined that the angle between the sliding direction of the sliding operation and the positive half axis of the X-axis of the coordinate system is less than a first preset angle, the target virtual model is enlarged; when it is determined that the angle between the sliding direction of the sliding operation and the negative half axis of the X-axis is less than the first preset angle, the target virtual model is reduced.

[0090] In some embodiments, scaling the target virtual model based on the sliding operation specifically includes:

[0091] Recording the displacement length of the sliding operation starting from the sliding starting point;

[0092] A scaling ratio of the target virtual model is controlled based on the displacement length.

[0093] In a specific implementation, the longer the recorded displacement length is, the higher the scaling ratio of the target virtual model is.

[0094] In some embodiments, the control mode includes a rotation control mode, and controlling the target virtual model based on the sliding operation and the control mode specifically includes:

[0095] In response to determining that the control mode of the target virtual model is the rotation control mode, the target virtual model is rotated based on the slide operation.

[0096] In a specific implementation, when the control mode of the target virtual model is the movement control mode, the target virtual model is rotated according to the sliding operation. Optionally, the sliding operation can be performed in an instantaneous clockwise or counterclockwise direction, and then the target virtual model is rotated following the sliding operation.

[0097] In some embodiments, rotating the target virtual model based on the sliding operation specifically includes:

[0098] Determining a sliding direction of the sliding operation;

[0099] The rotation direction of the target virtual model is controlled based on the sliding direction.

[0100] In some embodiments, controlling the rotation direction of the target virtual model based on the sliding direction specifically includes:

[0101] Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin;

[0102] In response to determining that the included angle between the sliding direction of the sliding operation and the positive semi-axis of the X-axis of the coordinate system is less than a first preset angle, controlling the target virtual model to rotate clockwise;

[0103] In response to determining that an included angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is controlled to rotate counterclockwise.

[0104] In specific implementation, the rotation direction of the target virtual model is generally divided into clockwise and counterclockwise directions. In the rotation control mode, the rotation direction of the virtual model can be controlled by sliding operation. Specifically, a coordinate system can be established with the starting point of the sliding operation as the coordinate origin. When the angle between the sliding direction of the sliding operation and the positive semi-axis of the X-axis of the coordinate system is less than a first preset angle, the target virtual model is controlled to rotate clockwise. The first preset angle can be set as needed and is not limited here. Optionally, the first preset angle can be set to 90°. When the angle between the sliding direction of the sliding operation and the negative semi-axis of the X-axis is less than the first preset angle, the target virtual model is controlled to rotate counterclockwise.

[0105] In some embodiments, controlling the rotation direction of the target virtual model based on the sliding direction specifically includes:

[0106] Determine a target point of the target virtual model, and establish a coordinate system with the target point as the coordinate origin;

[0107] In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, and the sliding operation is located on a first side of a Y-axis of the coordinate system, controlling the target virtual model to rotate clockwise;

[0108] In response to determining that the included angle between the sliding direction of the sliding operation and the negative half axis of the X-axis is less than a first preset angle, and the sliding operation is located on the second side of the Y-axis, the target virtual model is controlled to rotate counterclockwise.

[0109] In specific implementation, in order to better control the rotation direction of the virtual model through the sliding operation and prevent accidental touches, when controlling the rotation direction of the target virtual model according to the sliding direction of the sliding operation, first determine the target point of the target virtual model, and establish a coordinate system with the target point as the coordinate origin; optionally, the target point can be the center point of the target virtual model or other points set on the target virtual model, which is not limited here. Figure 2 After the coordinate system is established with the target point as the coordinate source, the sliding operation is performed on the first side (left side) of the Y axis of the coordinate system along the direction of the arrow, and the angle between the direction of the sliding operation and the positive semi-axis of the X axis of the coordinate system is less than the first preset angle, so the target virtual model is controlled to rotate in the clockwise direction. When the angle between the sliding direction of the sliding operation and the negative semi-axis of the X axis is less than the first preset angle, and the sliding operation is located on the second side of the Y axis, the target virtual model is controlled to rotate counterclockwise.

[0110] In some embodiments, rotating the target virtual model based on the sliding operation specifically includes:

[0111] Recording the displacement length of the sliding operation starting from the sliding starting point;

[0112] The rotation angle of the target virtual model is controlled based on the displacement length.

[0113] In a specific implementation, after the rotation angle of the target virtual model is determined, the rotation angle of the target virtual model can be controlled by the displacement length of the sliding operation from the sliding starting point. Optionally, the longer the displacement length, the larger the rotation angle of the target virtual model. Optionally, when recording the displacement length of the sliding operation from the sliding starting point, the numerical value of the rotation angle of the target virtual model can be displayed, so that the rotation angle can be controlled more accurately.

[0114] In some embodiments, the sliding track of the sliding operation is a straight line; rotating the target virtual model based on the sliding operation specifically includes:

[0115] Recording the number of slides of the slide operation;

[0116] controlling a rotation angle of the target virtual model based on the number of slides;

[0117] Wherein, each time the sliding operation is performed, the target virtual model rotates by a second preset angle.

[0118] In a specific implementation, the rotation angle of the target virtual model can be set to a preset fixed angle, and each time the sliding operation (linear sliding) is performed, the target virtual model rotates to a second preset angle. Optionally, the second preset angle can be set as needed, and the specific value is not limited here. For example, the second preset angle can be set to 10°, 20°, 30°...

[0119] In some embodiments, the sliding track of the sliding operation is a straight line, and rotating the target virtual model based on the sliding operation specifically includes:

[0120] Recording the number of sliding operations in the continuous sliding; wherein the continuous sliding includes at least two sliding operations, and the time interval between two adjacent sliding operations is less than a second preset time length;

[0121] controlling a rotation angle of the target virtual model based on the number of the sliding operations;

[0122] The target virtual model does not receive the sliding operation within a second preset time period and no longer responds to the rotation control corresponding to the sliding operation.

[0123] In a specific implementation, in order to facilitate the control of the rotation angle of the target virtual model through multiple sliding operations without accidental touches, the number of sliding operations in the continuous sliding is recorded. The continuous sliding here includes at least two sliding operations, and the time interval between two adjacent sliding operations is less than the second preset time length. The second preset time length here can be set as needed. Optionally, the second preset time length can be set to 1 second. After determining the number of sliding operations in the continuous sliding, the rotation angle of the target virtual model can be controlled according to the number of sliding operations in the continuous sliding. Optionally, each time the sliding operation is performed, the target virtual model rotates by the second preset angle.

[0124] It should be noted that when the target virtual model is rotated, in order to prevent accidental touches with other virtual models, only one target virtual model will be controlled at the same time. At this time, the target virtual model is in a selected state. When the target virtual model does not receive a sliding operation for it within a second preset time, it will exit the selected state, that is, it will no longer respond to the rotation control corresponding to the sliding operation. When the target virtual model needs to be controlled again next time, it needs to re-enter the selected state.

[0125] In some embodiments, in response to determining that the dwell time of the sliding operation is greater than a preset time, switching the control mode specifically includes:

[0126] In response to the sliding operation remaining stationary, recording the duration of the sliding operation and displaying a mode switching animation; wherein the mode switching animation is used to indicate the switching progress of the control mode;

[0127] In response to determining that the stay duration is greater than a preset duration, the control mode is switched.

[0128] In the specific implementation, in order to facilitate user operation, the user can know the switching progress when switching the control mode, and interrupt the switching process in time when they do not want to switch the control mode. When switching the control mode, the mode switching animation will be displayed according to the time when the sliding operation remains stationary. Figure 3 , where the black part in the left ring is not fully filled, indicating that the mode switching animation has been played more than half, and the black part in the right ring is fully filled, indicating that the mode switching animation has been played, that is, the control mode is switched successfully at this time.

[0129] In some embodiments, in response to determining that the dwell time of the sliding operation is greater than a first preset time, switching the control mode specifically includes:

[0130] In response to determining that the duration of the sliding operation on the target virtual model is greater than a first preset duration, the control mode is switched.

[0131] In a specific implementation, in order to switch the control mode more accurately, the duration of the sliding operation is recorded only when the sliding operation stays on the target virtual model, and the control mode is switched when the duration is greater than a first preset duration.

[0132] The control method of a virtual model provided by the present application determines the control mode of the target virtual model when a sliding operation on a target virtual model is received, and controls the target virtual model based on the sliding operation and the control mode; when it is determined that the dwell time of the sliding operation is greater than a first preset time, switches the control mode, and controls the target virtual model based on the sliding operation and the switched control mode, thereby switching the control mode by judging the dwell time of the sliding operation, and achieving different control effects through the same sliding operation under different control models, thereby improving the inertia of the virtual model control operation and improving the control efficiency; in addition, since the method of the present application is used to control the virtual model, there is no need to set an additional rotation control key, so the number of interface controls can be reduced, making the interface information more concise and clear; and since the operating space of the sliding operation is larger than that of the rotation control key, and the rotation control of the virtual model can be achieved as long as the sliding operation is detected, it is more in line with the natural interactive experience.

[0133] Exemplary Devices

[0134] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a control device for a virtual model.

[0135] refer to Figure 4 , the control device of the virtual model comprises:

[0136] The first control module 201, in response to receiving a sliding operation on a target virtual model, determines a control mode of the target virtual model, and controls the target virtual model based on the sliding operation and the control mode;

[0137] The second control module 202 switches the control mode in response to determining that the dwell time of the sliding operation is greater than a first preset time, and controls the target virtual model based on the sliding operation and the switched control mode.

[0138] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0139] The device of the above embodiment is used to implement the control method of the corresponding virtual model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0140] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the control method of the virtual model described in any of the above embodiments is implemented.

[0141] Figure 5 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0142] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0143] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0144] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0145] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0146] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0147] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0148] The electronic device of the above embodiment is used to implement the control method of the corresponding virtual model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0149] Exemplary Program Products

[0150] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the control method of the virtual model described in any of the above embodiments.

[0151] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0152] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the control method of the virtual model as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0153] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; based on the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0154] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0155] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0156] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A control method for a virtual model, It is characterized in that include: In response to receiving a sliding operation on a target virtual model, determining a control mode of the target virtual model, and controlling the target virtual model based on the sliding operation and the control mode; wherein each virtual model includes a plurality of control modes; In response to determining that the dwell time of the sliding operation is greater than a first preset time, switching the control mode, and controlling the target virtual model based on the sliding operation and the switched control mode; Wherein, controlling the target virtual model based on the sliding operation and the control mode specifically includes: In response to determining that the control mode of the target virtual model is the moving control mode, moving the target virtual model based on the sliding operation; or, In response to determining that the control mode of the target virtual model is the zoom control mode, zooming the target virtual model based on the sliding operation; or, In response to determining that the control mode of the target virtual model is the rotation control mode, the target virtual model is rotated based on the slide operation.

2. The method according to claim 1, It is characterized in that Scaling the target virtual model based on the sliding operation specifically includes: Determining a sliding direction of the sliding operation; Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin; In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, enlarging the target virtual model; In response to determining that an angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is reduced.

3. The method according to claim 1, It is characterized in that Rotating the target virtual model based on the sliding operation specifically includes: Determining a sliding direction of the sliding operation; The rotation direction of the target virtual model is controlled based on the sliding direction.

4. The method according to claim 3, It is characterized in that Controlling the rotation direction of the target virtual model based on the sliding direction specifically includes: Establishing a coordinate system with the starting point of the sliding operation as the coordinate origin; In response to determining that the included angle between the sliding direction of the sliding operation and the positive semi-axis of the X-axis of the coordinate system is less than a first preset angle, controlling the target virtual model to rotate clockwise; In response to determining that an included angle between a sliding direction of the sliding operation and a negative semi-axis of the X-axis is smaller than a first preset angle, the target virtual model is controlled to rotate counterclockwise.

5. The method according to claim 3, It is characterized in that Controlling the rotation direction of the target virtual model based on the sliding direction specifically includes: Determine a target point of the target virtual model, and establish a coordinate system with the target point as the coordinate origin; In response to determining that an angle between a sliding direction of the sliding operation and a positive semi-axis of an X-axis of the coordinate system is less than a first preset angle, and the sliding operation is located on a first side of a Y-axis of the coordinate system, controlling the target virtual model to rotate clockwise; In response to determining that the included angle between the sliding direction of the sliding operation and the negative half axis of the X-axis is less than a first preset angle, and the sliding operation is located on the second side of the Y-axis, the target virtual model is controlled to rotate counterclockwise.

6. The method according to claim 1, It is characterized in that Rotating the target virtual model based on the sliding operation specifically includes: Recording the displacement length of the sliding operation starting from the sliding starting point; The rotation angle of the target virtual model is controlled based on the displacement length.

7. The method according to claim 1, It is characterized in that The sliding track of the sliding operation is a straight line; and rotating the target virtual model based on the sliding operation specifically includes: Recording the number of slides of the slide operation; controlling a rotation angle of the target virtual model based on the number of slides; Wherein, each time the sliding operation is performed, the target virtual model rotates by a second preset angle.

8. The method according to claim 1, It is characterized in that The sliding track of the sliding operation is a straight line, and rotating the target virtual model based on the sliding operation specifically includes: Recording the number of sliding operations in the continuous sliding; wherein the continuous sliding includes at least two sliding operations, and the time interval between two adjacent sliding operations is less than a second preset time length; controlling a rotation angle of the target virtual model based on the number of the sliding operations; The target virtual model does not receive the sliding operation within a second preset time period and no longer responds to the rotation control corresponding to the sliding operation.

9. The method according to claim 1, It is characterized in that In response to determining that the dwell time of the sliding operation is greater than a preset time, switching the control mode specifically includes: In response to the sliding operation remaining stationary, recording the duration of the sliding operation and displaying a mode switching animation; wherein the mode switching animation is used to indicate the switching progress of the control mode; In response to determining that the stay duration is greater than a preset duration, the control mode is switched.

10. The method according to claim 1, It is characterized in that In response to determining that the dwell time of the sliding operation is greater than a first preset time, switching the control mode specifically includes: In response to determining that the duration of the sliding operation on the target virtual model is greater than a first preset duration, the control mode is switched.

11. A control device for a virtual model, It is characterized in that include: A first control module, in response to receiving a sliding operation on a target virtual model, determines a control mode of the target virtual model, and controls the target virtual model based on the sliding operation and the control mode; wherein each virtual model includes a plurality of control modes; A second control module, in response to determining that the dwell time of the sliding operation is greater than a first preset time, switches the control mode, and controls the target virtual model based on the sliding operation and the switched control mode; Wherein, the second control module is specifically used for: In response to determining that the control mode of the target virtual model is the moving control mode, moving the target virtual model based on the sliding operation; or, In response to determining that the control mode of the target virtual model is the zoom control mode, zooming the target virtual model based on the sliding operation; or, In response to determining that the control mode of the target virtual model is the rotation control mode, the target virtual model is rotated based on the slide operation.

12. An electronic device, It is characterized in that The method comprises a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 10 when executing the program.

13. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and device for processing virtual model in game

    CN111167120A

  • Virtual prop display method and device in game, terminal and storage medium

    CN111494934A

  • Virtual scene coordinate control method and device, electronic equipment and storage medium

    CN111973984A

  • Virtual object control method and device, electronic equipment and storage medium

    CN112121419A

  • Method and device for controlling three-dimensional model in game editor and storage medium

    CN113926190A