Virtual object control method and device, computer equipment and storage medium
By displaying the operation area indicator of the three-dimensional coordinate system on the graphical user interface and using dual touch to lock the target coordinate axis, the problem of cumbersome traditional virtual object control operations is solved, and more efficient and accurate virtual object movement is achieved.
Patent Information
- Application Number
- CN202510913025.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-24
AI Technical Summary
In three-dimensional virtual scenes, the movement control of traditional virtual objects is cumbersome and requires frequent switching of X, Y, and Z axis sliders or rotation modes, which affects the player's operating efficiency and accuracy.
By displaying the operation area indicator of the three-dimensional coordinate system on the graphical user interface, locking the target coordinate axis through double-touch operation, and combining the sliding operation to realize the movement control of the virtual object.
It simplifies the control operation of three-dimensional virtual objects, improves efficiency and accuracy, reduces the possibility of accidental touch across axes, and improves operational smoothness and precision.
Smart Images

Figure CN120832066A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, in particular to a virtual object control method and device, computer equipment and a storage medium. BACKGROUND
[0002] In a scenario where a virtual object in a three-dimensional virtual scene needs to be controlled to move, for example, in a game containing UGC (User Generated Content) gameplay or function, a player can freely edit a map in a game map editor, and when the player places a virtual item (i.e., a virtual object) into the map to be edited, the three-dimensional spatial position of the virtual item needs to be adjusted. The traditional operation mode requires the player to sequentially drag the X, Y, and Z axis sliders set for the virtual item to gradually position to the target spatial coordinates, and the operation process is relatively cumbersome. In addition, the frequent switching steps of the zoom and rotation modes are also relatively cumbersome, which affects the player's experience of efficiently adjusting the virtual item. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a virtual object control method and device, computer equipment and a storage medium to simplify the control operation of the virtual object and improve the efficiency and accuracy of the virtual object control.
[0004] In a first aspect, an embodiment of the present application provides a virtual object control method applied to a touch terminal, a three-dimensional virtual scene is displayed on a graphical user interface of the touch terminal, and the three-dimensional virtual scene contains a virtual object. The control method comprises the following steps:
[0005] In response to a trigger operation of entering an editing mode of the three-dimensional virtual scene, a position indication mark of three operation regions, i.e., a first operation region, a second operation region, and a third operation region, is displayed on the graphical user interface, and the three operation regions correspond to three coordinate planes of a three-dimensional coordinate system with a specified position on the virtual object as the origin, respectively;
[0006] In response to a first touch operation and a second touch operation occurring simultaneously on the first operation region and the second operation region, a movement dimension of the virtual object is locked on a target coordinate axis corresponding to an intersection line of coordinate planes where the first operation region and the second operation region are located;
[0007] In response to a first sliding operation, the virtual object is controlled to move along the direction of the target coordinate axis according to the first sliding operation.
[0008] In a second aspect, an embodiment of the present application provides a device for controlling a virtual object, the device being disposed in a touch terminal, wherein a three-dimensional virtual scene is displayed on a graphical user interface of the touch terminal, the three-dimensional virtual scene including a virtual object, the control device comprising:
[0009] an indicator display module, configured to respond to a trigger operation for the three-dimensional virtual scene to enter an editing mode and display position indicators of three operation areas, namely, a first operation area, a second operation area, and a third operation area, on the graphical user interface, wherein the three operation areas respectively correspond to three coordinate planes of a three-dimensional coordinate system with a designated position on the virtual object as an origin;
[0010] a movement dimension locking module, configured to lock the movement dimension of the virtual object to a target coordinate axis corresponding to a boundary line of a coordinate plane where the first operation area and the second operation area are located, in response to a first touch operation and a second touch operation occurring simultaneously on the first operation area and the second operation area;
[0011] The virtual object control module is configured to respond to a first sliding operation and control the virtual object to move along the direction of the target coordinate axis according to the first sliding operation.
[0012] In a third aspect, an embodiment of the present application provides a computer device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the virtual object control method described in any optional implementation method of the first aspect are performed.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes the steps of the method for controlling a virtual object described in any optional implementation of the first aspect above.
[0014] The technical solutions provided by this application include but are not limited to the following beneficial effects:
[0015] When the three-dimensional virtual scene enters the editing mode, the graphical user interface displays the position indicators of the operation areas corresponding to the three coordinate planes of the three-dimensional coordinate system, allowing users to intuitively identify the mapping relationship between each operation area and the virtual object coordinate plane, helping users to quickly locate the operation range, and laying a clear visual foundation for subsequent axis locking and movement operations. Then, by simultaneously touching the first and second operation areas to trigger the target coordinate axis lock, the movement dimension of the virtual object is precisely limited to the direction of the intersection of the coordinate planes to which the two operation areas belong. Compared with the cumbersome process of traditional multi-axis independent adjustment that requires manual switching of dimensions, dual-touch locking can quickly determine the target axis directly through the physical operation contact position, avoiding accidental cross-axis touches while reducing the intermediate steps of selecting the axis-calibrating the dimension, making the axial positioning operation in three-dimensional space more direct and efficient. After locking the target axis, the virtual object can be controlled to move along the locked axis direction by sliding with one or more fingers. The system converts the sliding direction and distance into the spatial displacement of the virtual object in real time. This instant touch-feedback mapping mechanism replaces the traditional step-by-step operation of dragging multi-axis sliders. Users can accurately adjust the movement distance through intuitive gesture sliding, and the continuity of the sliding operation facilitates subtle adjustments, significantly improving the accuracy of virtual object positioning in three-dimensional space and the smoothness of operation.
[0016] The above control method simplifies the user's understanding of three-dimensional coordinates through visual operation area identification, reduces the operation steps of dimensional adjustment with the help of dual-touch locking axis direction, and realizes intuitive displacement control with sliding gestures. From the three levels of visual guidance, operation logic and interaction method, it systematically simplifies the control operation of virtual objects, while improving the efficiency and accuracy of virtual object control.
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flowchart of a method for controlling a virtual object provided by an embodiment of the present invention is shown;
[0020] Figure 2 A schematic diagram of a position indicator provided by an embodiment of the present invention is shown;
[0021] Figure 3A schematic diagram of a touch operation triggering movement dimension locking is shown according to an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a double-finger first sliding operation is shown according to an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a single-finger first sliding operation is shown according to an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a line segment identification is shown according to an embodiment of the present application;
[0025] Figure 7 A schematic diagram of a plane identification is shown according to an embodiment of the present application;
[0026] Figure 8 A schematic diagram of another plane identification is shown according to an embodiment of the present application;
[0027] Figure 9 A schematic diagram of a selected state visual feedback is shown according to an embodiment of the present application;
[0028] Figure 10 A schematic diagram of a locked state visual feedback is shown according to an embodiment of the present application;
[0029] Figure 11 A schematic diagram of a second sliding operation is shown according to an embodiment of the present application;
[0030] Figure 12 A schematic diagram of a third touch operation is shown according to an embodiment of the present application;
[0031] Figure 13 A schematic diagram of a third sliding operation driving virtual object rotation is shown according to an embodiment of the present application;
[0032] Figure 14 A schematic diagram of a third sliding operation driving virtual object zooming is shown according to an embodiment of the present application;
[0033] Figure 15 A structural schematic diagram of a virtual object control device is shown according to an embodiment of the present application;
[0034] Figure 16 A structural schematic diagram of a computer device is shown according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application generally described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0036] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application generally described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0037] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application generally described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0038] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features following the term, but does not exclude the addition of other features.
[0039] Currently, some UGC mobile games on the market have adopted various solutions to optimize three-dimensional space movement operation: adjusting the interface layout, enlarging or rearranging the three-axis slide bar, introducing a virtual joystick to simplify operation, or switching between zoom and rotation modes through a side menu. However, these solutions still have significant drawbacks: in terms of operation logic, neither the slide bar layout optimization nor the virtual joystick control breaks the inherent mode of adjusting each axis, resulting in the need for multiple operations to complete three-dimensional positioning; in terms of operation precision, small-size models are prone to touch point recognition failure, and virtual joysticks also cannot meet the high-precision operation demand; in terms of interaction efficiency, when switching modes through a side menu, players need to frequently shift their gaze and operation touch points, resulting in a significant decline in interaction efficiency in high-frequency operation scenarios.
[0040] Based on this, the embodiments of the present application provide a virtual object control method, device, computer equipment and storage medium to simplify the control operation of the virtual object and improve the efficiency and accuracy of virtual object control.
[0041] To facilitate understanding of the embodiments, the virtual object control method, device, computer equipment and storage medium provided by the embodiments of the present application are described in detail below in combination with UCG games. It should be noted that the application scenarios in the embodiments of the present application are not limited to UCG games, and can also be applied to other games and applications that require movement control of virtual objects in a three-dimensional virtual scene through a touch display screen.
[0042] The game information display method in the embodiments of the present application can run on a touch terminal or a server. The touch terminal can be a local touch terminal device. When the game information display method runs on the server, it can be a cloud game.
[0043] In an optional embodiment, cloud gaming refers to a game mode based on cloud computing. In the running mode of cloud gaming, the running subject of the game program and the presentation subject of the game picture are separated, and the storage and running of the configuration method of the game equipment are completed on the cloud game server. The cloud game client is used for receiving and sending data and presenting game pictures. For example, the cloud game client can be a display device close to the user side with data transmission function, such as a mobile terminal, a television, a computer, a palm computer, etc. However, the terminal device for configuring the game equipment is the cloud game server in the cloud. When playing the game, the user operates the cloud game client to send operation instructions to the cloud game server, the cloud game server runs the game according to the operation instructions, encodes and compresses the game picture data, returns them to the cloud game client through the network, and finally decodes and outputs the game picture through the cloud game client.
[0044] In another optional embodiment, the touch terminal can be a local terminal device. The local terminal device stores the game program and is used to present the game screen. The local terminal device is used to interact with the user through a graphical user interface, that is, the game program is downloaded and installed and run by the conventional electronic device. The local terminal device can provide the graphical user interface to the user in a variety of ways, for example, it can be rendered and displayed on the display screen of the local terminal device, or provided to the user through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the graphical user interface, the graphical user interface includes the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.
[0045] The control method of a virtual object provided in the embodiment of the present application can be run in the local terminal device mentioned above, or in the cloud game client mentioned above. The following is an example of the control method of the virtual object running on a local touch terminal device (hereinafter referred to as the touch terminal).
[0046] See also Figure 1 As shown, Figure 1 A flowchart of a method for controlling a virtual object provided by an embodiment of the present invention is shown. The method is applied to a touch terminal, wherein a three-dimensional virtual scene is displayed on a graphical user interface of the touch terminal, and the three-dimensional virtual scene includes a virtual object. The control method includes steps S101 to S103:
[0047] S101: In response to a trigger operation for the three-dimensional virtual scene to enter an editing mode, position indication marks of three operation areas, namely, a first operation area, a second operation area, and a third operation area, are displayed on the graphical user interface. The three operation areas respectively correspond to three coordinate planes of a three-dimensional coordinate system with a specified position on the virtual object as the origin.
[0048] Specifically, when a user triggers a 3D virtual scene to enter edit mode, this triggering operation can take many forms. In common game scenarios, the user can click the gear icon button marked with the word "Edit" on the interface to enter edit mode; or drag a virtual object in the sidebar of the interface and enter edit mode after stopping dragging; or long press the virtual object, and the system will recognize the long press operation and determine that it has entered edit mode. These operation methods provide users with a convenient way to enter edit mode through different interactive actions, meeting the operational needs of different games and application scenarios.
[0049] Once the system responds to the trigger operation, the graphical user interface displays position indication marks of the three operation areas, each mark corresponding to three coordinate planes of a three-dimensional coordinate system with the specified position of the virtual object as the origin (usually the geometric center, or a pre-set anchor point such as the waist of a humanoid virtual object), and each mark is used to distinguish different operation areas, which can be in the form selected according to actual needs. These marks can be three coordinate axis marks, plane geometry marks on the coordinate planes, or both, or other forms that allow users to identify the three operation areas.
[0050] Referring to Figure 2 as shown, Figure 2 A schematic diagram of a position indication mark provided by an embodiment of the present application is shown, where, when the position indication mark is a coordinate mark, the specified position of the virtual object is taken as the origin, and a three-dimensional coordinate is used to present the different coordinate axes (X-axis, Y-axis, Z-axis) and the marks of the coordinate axes. The three-dimensional coordinate intuitively displays the spatial orientation, allowing users to quickly and clearly identify the directions of the axes and the coordinate planes formed by the three coordinate axes, so as to identify the positions of the three operation areas corresponding to the three coordinate planes (i.e. the areas formed between the X-axis, Y-axis, and Z-axis), thereby providing a reference for subsequent operations.
[0051] S102: In response to a first touch operation and a second touch operation occurring simultaneously in the first operation area and the second operation area, the movement dimension of the virtual object is locked to a target coordinate axis corresponding to the intersection line of the coordinate planes where the first operation area and the second operation area are located.
[0052] Specifically, when the user performs a touch operation on the first operation area and the second operation area, there are two triggering situations: one is to touch the two operation areas at the same time, and the other is to touch them in sequence but with overlapping in time (i.e. the second touch is triggered before the first touch ends). Regardless of which situation, the system will calculate the intersection axis of the coordinate planes corresponding to the two operation areas and lock it as the target coordinate axis, thereby realizing the movement control of the virtual object in the direction of the axis.
[0053] Referring to Figure 3 as shown, Figure 3 A schematic diagram of a touch operation triggering movement dimension locking provided by an embodiment of the present application is shown, where it is assumed that the first operation area corresponds to the XZ plane (the area between the X-axis and the Z-axis), and the second operation area corresponds to the YZ plane (the area between the Y-axis and the Z-axis). According to the knowledge of plane intersection, the intersection line of the two planes is the Z-axis (as the target coordinate axis), and at this time the movement dimension of the virtual object is locked to the Z-axis direction. During the locking process, the system will give a clear prompt to avoid user misoperation.
[0054] S103: In response to a first sliding operation, controlling the virtual object to move along the direction of the target coordinate axis according to the first sliding operation.
[0055] Specifically, after the target coordinate axis is locked, the user can perform a first sliding operation on the screen with one finger or multiple fingers. The first sliding operation and the first touch operation and the second touch operation can be continuous touch operations; or they can be discontinuous operations. Within the preset duration of triggering the axis lock, the first sliding operation can be used to control the movement of the virtual object in the direction of the coordinate axis. The touch starting point of the first sliding operation can be the first operation area, the second operation area, the virtual object itself, or an area outside the first operation area and the second operation area (because the movement dimension of the virtual object has been locked to the target coordinate axis).
[0056] See also Figure 4 As shown, Figure 4 A schematic diagram of a two-finger first sliding operation provided by an embodiment of the present invention is shown, wherein the first sliding operation is performed by a user using two index fingers to drag up and down along the vertical direction of the screen (of course, the user does not need to be completely vertical in actual operation, as long as the sliding operation has a vertical component). Figure 4 The target axis shown is the Z axis). See Figure 5 As shown, Figure 5 A schematic diagram of a single-finger first sliding operation provided by an embodiment of the present invention is shown, wherein the first sliding operation is performed by a user using an index finger to drag up and down along the vertical direction of the screen (similarly, the user does not need to be completely vertical in actual operation, as long as the sliding operation has a vertical component). Figure 5 The target coordinate axis shown is the Z axis. The system continuously tracks the direction and distance of the swipe. When the user swipes upward, the system, based on a pre-set algorithm, converts the swipe distance and other information into the virtual object's movement distance in the positive direction of the target coordinate axis (Z axis), controlling the virtual object's movement along the positive Z axis. If the user swipes downward, the virtual object moves along the negative Z axis. When operating with a single finger, the user can flexibly adjust the swipe speed and amplitude, and the system still accurately identifies and converts these into movement parameters along the corresponding axis, adapting to different users' operating habits.
[0057] Compared with the movement of the traditional virtual object, the user needs to frequently switch the operation between different axis sliders, now only need to lock the target axis by simple double touch, and then carry out single finger or double finger sliding operation, a large number of cumbersome operation steps are reduced, and the efficiency of positioning the virtual object in the three-dimensional space is greatly improved. For example, when building a virtual building scene, if a virtual brick is to be accurately placed at a specific height position, using the method, the user can quickly lock the vertical coordinate axis, and accurately adjust the height of the brick by single finger sliding, without repeatedly switching and adjusting in the control options of multiple axes as in the traditional way.
[0058] In a feasible embodiment, the position indication identifier comprises a line segment identifier located at three coordinate axes of the three-dimensional coordinate system and / or a plane identifier located at three coordinate planes of the three-dimensional coordinate system.
[0059] The position indication identifier is only an identifier for indicating the position of the three operation regions to the user, and is not the operation region itself. The position of the operation region can be indicated by a line segment identifier located at three coordinate axes of the three-dimensional coordinate system (that is, the region between two of the three coordinate axes), or can be indicated by a plane identifier located at three coordinate planes of the three-dimensional coordinate system. Specifically, the line segment identifier can be a coordinate identifier as shown in Figure 2 The coordinate identifier takes the specified position of the virtual object as the origin, and presents in the form of three-dimensional coordinates, clearly showing different coordinate axes (X axis, Y axis, Z axis) and coordinate planes between the coordinate axes. The three-dimensional coordinates directly show the spatial orientation, so that the user can quickly and clearly determine the three axis directions and three coordinate planes of the virtual object, and provide a reference for subsequent operations.
[0060] Referring to Figure 6 , it is shown that Figure 6 A schematic diagram of a line segment identifier provided by an embodiment of the application is shown, wherein the line segment identifier uses line segments of different colors, thicknesses or solid and dashed lines to represent the coordinate axis directions. For example, a red line segment represents the X axis, a green line segment represents the Y axis, and a blue line segment represents the Z axis, and the line segment extends from the specified position of the virtual object to the corresponding direction. This way of distinguishing dimensions by visual differences enables the user to quickly identify the axes and the coordinate planes between the axes through the line segment features.
[0061] Referring to Figure 7 , it is shown that Figure 7A schematic diagram of a plane mark provided by an embodiment of the present application is shown, wherein the line segment A is along the X-axis direction, the line segment B is along the Z-axis direction, the line segment C is along the Y-axis direction, the sector formed by the line segment A, the line segment B and the circular arc therebetween, the sector formed by the line segment A, the line segment C and the circular arc therebetween, and the sector formed by the line segment C, the line segment B and the circular arc therebetween are respectively the position indication marks of three operation regions. The operation region can correspond to the three sectors or a region slightly larger than the sector.
[0062] Referring to Figure 8 shown, Figure 8 A schematic diagram of another plane mark provided by an embodiment of the present application is shown, wherein the plane mark is a region plane filled with different colors, such as light blue representing the XY plane, light yellow representing the YZ plane and light green representing the XZ plane, which are respectively expanded around the center of the virtual object position and correspond to the three operation regions on the three coordinate planes of the three-dimensional coordinate system, so that the movement of the virtual object in different spatial directions can be accurately controlled during operation.
[0063] In a feasible implementation, the position indication mark includes both the line segment mark located on the three coordinate axes of the three-dimensional coordinate system and the plane mark located on the three coordinate planes of the three-dimensional coordinate system. Referring to Figure 4 shown, the three coordinate axes are the line segment marks of the three operation regions, and the two rectangles and the other rectangle not shown are the plane marks of the three operation regions.
[0064] In a feasible implementation, the method further includes: displaying a selected state in the operation region in response to a touch operation on the operation region.
[0065] Specifically, when the user touches the operation region, the region presents a selected state through a color highlighting mechanism, which specifically means that the color or brightness of the region itself dynamically changes, so as to enhance the visual recognition. For example, if the default color of the operation region is light blue, when it is touched, the brightness is increased to 200%, or the color is changed to red, so that the player can clearly perceive that the region has been selected. Referring to Figure 9 shown, Figure 9 A schematic diagram of a selected state visual feedback provided by an embodiment of the present application is shown, wherein the original color of the first operation region is transparent, and when the user performs a touch operation on the first operation region, the first operation region becomes orange, indicating that it is in a selected state.
[0066] In addition, the visual feedback of the selected state can also adopt a dynamic animation effect mechanism. Specifically, when the operation region is touched, a micro animation feedback is triggered. For example, the position indication mark corresponding to the operation region is slightly scaled (such as enlarged by 1.1 times and then restored to the original state), and the duration is 0.3 seconds.
[0067] In an implementation, the method further comprises: displaying a lock state on the target coordinate axis when the movement dimension of the virtual object is locked on the target coordinate axis.
[0068] Specifically, referring to Figure 10 shown, Figure 10 A schematic diagram of lock state visual feedback is shown, in which the lock state can be visualized by color and shape changes. Specifically, the line segment of the target coordinate axis will change from the default color to the high-light warning color, accompanied by line thickening. For example, the Z axis is originally black, and when the Z axis is locked, the Z axis turns bright yellow, and the line width increases from 2px to 4px. In addition, if the coordinate axis is initially in a hidden state (for example, the embodiment shown in Figure 8 The embodiment shown only identifies the position of the operation area by a plane identifier), it can also be represented by displaying the locked target coordinate axis to indicate that the axis has been locked.
[0069] In addition, dynamic feedback animation can also be used to visualize the lock state. Specifically, when the lock state is triggered, the target axis line segment will produce a continuous micro-animation effect, such as flashing once every 0.5 seconds, or slightly vibrating along the axis (with an amplitude of 5% of the line segment length); The arrow-shaped particle flow at both ends of the line segment points to the direction of movement after locking, for example, when the Y axis is locked to move upwards, the particle flow flows from the bottom to the top of the line segment in a cycle.
[0070] In an implementation, the method further comprises: canceling the lock of the movement dimension of the virtual object on the target coordinate axis in response to one of the following events:
[0071] Event one: the first touch operation and the second touch operation are terminated and no first sliding operation continuous with the first touch operation or the first touch operation occurs.
[0072] After the user triggers the lock of the movement dimension of the virtual object on the target coordinate axis by the first touch operation and the second touch operation, the first touch operation and the second touch operation are terminated without continuous first sliding operation, which will cancel the lock of the movement dimension of the virtual object on the target coordinate axis. In this mode, the user must control the virtual object to move on the target locked axis dimension through the first sliding operation continuous with the first touch or second touch operation, and if the first sliding operation continuous with the first touch operation or the second touch operation is not performed, the lock of the movement dimension on the target coordinate axis will be canceled.
[0073] Accordingly, the user controls the virtual object to move on the target coordinate axis through the first sliding operation continuous with the first touch operation or the second touch operation, and when the first sliding operation is terminated, the locking of the moving dimension is also cancelled. Specifically, when the first sliding operation (e.g., dragging upwards along the Y axis) performed by the user after locking the target coordinate axis is stopped (the finger is removed from the screen or the touch is interrupted), the system automatically cancels the locking state of the axis. For example, when the user drags the virtual furniture to move along the Z axis, the finger is released halfway, and the Z axis locking is immediately cancelled, and the subsequent touch operation is restored to the default control mode.
[0074] Event two: after the first touch operation and the second touch operation are terminated, more than a preset time length elapses and the first sliding operation does not occur.
[0075] Specifically, the system presets a locking time length, and if the first sliding operation does not occur within the time length when the virtual object is in the target coordinate axis locking state, the locking is automatically cancelled. For example, the time is counted from the time when the locking is completed, and if the user does not perform the sliding operation within 5 seconds, the locking state is automatically cancelled. In this mode, the user's control of the virtual object to move on the target coordinate axis can not be the sliding operation continuous with the first touch operation or the second touch operation, but only needs to be the first sliding operation within the preset time length.
[0076] Accordingly, the user controls the virtual object to move on the target coordinate axis through the first sliding operation continuous with the first touch operation or the second touch operation, and when the first sliding operation is terminated, the locking of the moving dimension can be set to be immediately cancelled, or can be set to be cancelled after a second preset time length (e.g., the user performs the sliding operation again within the second preset time length, and can continue to control the virtual object to move on the target coordinate axis, and the second preset time length can be the same as or different from the above-mentioned preset time length).
[0077] In one possible implementation, the method further includes: in response to a second sliding operation starting from a first target operation region, controlling the virtual object to move on a coordinate plane corresponding to the first target operation region according to the second sliding operation; and wherein the first target operation region is one of the three operation regions.
[0078] Specifically, referring to Figure 11 , the system can further include a third target operation region, and the three target operation regions are arranged in a three-dimensional space. Figure 11A diagram of a second sliding operation provided by an embodiment of the present application is shown, in which a user touches any one of the three operation regions (such as the first target operation region being the XY plane) and slides a finger from the region. The system controls the virtual object to move in the coordinate plane corresponding to the first target operation region according to the direction and distance of the sliding, and the virtual object does not move in the dimension of the coordinate axis perpendicular to the coordinate plane. For example: sliding starting from the XY plane operation region → the virtual object moves in the XY plane (horizontal plane) and does not move in the Z axis direction, i.e. the height does not change.
[0079] In a feasible implementation, the method further comprises: in response to a third touch operation for a second target operation region, controlling the virtual object to enter a to-be-scaled state or a to-be-rotated state; the third touch operation is different from the operation mode of the first touch operation and the second touch operation; wherein the second target operation region is one of the three operation regions.
[0080] Specifically, referring to Figure 12 shown, Figure 12 A diagram of a third touch operation provided by an embodiment of the present application is shown, in which when a third touch operation (such as long pressing, double clicking, double finger pressing) for a second target operation region is detected, the interface generates a selection control (such as the annular control shown) Figure 12 with function buttons for scaling and rotating. Since the third touch operation is different from the first / second touch operation (such as single clicking, single finger sliding) that triggers the movement dimension of the virtual object in the target coordinate axis in operation mode, through this differentiated interaction, the function triggering boundary can be clearly defined, so that the user can accurately trigger the scaling / rotation preparation state. The user can click the function buttons for scaling or rotating, or can slide the third touch operation to the corresponding function button, and then control the virtual object to enter the to-be-scaled or to-be-rotated state.
[0081] In response to the third sliding operation, the system controls the virtual object to scale or rotate in the coordinate plane in which the second target operation region is located.
[0082] Specifically, if the user triggers the to-be-scaled / rotated state and then performs a third sliding operation starting from the second target operation region (the sliding starting point can also be a region other than the second target operation region, because the virtual object is scaled or rotated in the coordinate plane in which the second target operation region is located), the system drives the virtual object to perform scaling or rotation in the coordinate plane corresponding to the operation region. For example, if the second target operation region corresponds to the XY plane, the virtual object only scales or rotates in the XY plane dimension when sliding, so as to avoid mis-touching by locking the operation dimension.
[0083] For example, referring to Figure 13As shown in the figure, Figure 13 A third sliding operation driving virtual object rotation schematic diagram provided by the embodiment of the application is shown, wherein when the user long-presses the second target operation region for more than 2 seconds to lock the virtual object rotation operation on the coordinate plane (such as the XY plane) corresponding to the second target operation region, the rotation function button is selected to trigger the to-be-rotated state, and the operation mode is switched to the rotation function, at this time, the rotation operation can be performed in the locked plane, for example, the virtual object is rotated around the Z axis in the XY plane, the system converts the user's touch operation into the rotation action around the axis, the in-plane angle adjustment is realized, the cross-dimension misoperation is avoided, and the rotation operation is more intuitive and efficient.
[0084] Referring to Figure 14 As shown in the figure, Figure 14 A third sliding operation driving virtual object rotation schematic diagram provided by the embodiment of the application is shown, wherein when the user long-presses the second target operation region for more than 2 seconds to lock the virtual object rotation operation on the coordinate plane (such as the XY plane) corresponding to the second target operation region, the rotation function button is selected to trigger the to-be-rotated state, and the operation mode is switched to the rotation function, at this time, the rotation operation can be performed in the locked plane, for example, the virtual object is rotated around the Z axis in the XY plane, the system converts the user's touch operation into the rotation action around the axis, the in-plane angle adjustment is realized, the cross-dimension misoperation is avoided, and the rotation operation is more intuitive and efficient.
[0085] Referring to Figure 15 As shown in the figure, Figure 15 A third sliding operation driving virtual object rotation schematic diagram provided by the embodiment of the application is shown, wherein when the user long-presses the second target operation region for more than 2 seconds to lock the virtual object rotation operation on the coordinate plane (such as the XY plane) corresponding to the second target operation region, the rotation function button is selected to trigger the to-be-rotated state, and the operation mode is switched to the rotation function, at this time, the rotation operation can be performed in the locked plane, for example, the virtual object is rotated around the Z axis in the XY plane, the system converts the user's touch operation into the rotation action around the axis, the in-plane angle adjustment is realized, the cross-dimension misoperation is avoided, and the rotation operation is more intuitive and efficient.
[0086] The indication display module 1501 is configured to display position indication marks of three operation regions, i.e., a first operation region, a second operation region, and a third operation region, on the graphical user interface in response to a trigger operation of entering an editing mode of the three-dimensional virtual scene, wherein the three operation regions correspond to three coordinate planes of a three-dimensional coordinate system with a specified position on the virtual object as an origin;
[0087] The movement dimension locking module 1502 is configured to lock the movement dimension of the virtual object on a target coordinate axis corresponding to an intersection line of coordinate planes in which the first operation region and the second operation region are located in response to a first touch operation and a second touch operation occurring simultaneously on the first operation region and the second operation region;
[0088] The virtual object control module 1503 is configured to control the virtual object to move along a direction of the target coordinate axis according to the first sliding operation in response to the first sliding operation.
[0089] In an implementation, the position indication identifier comprises a line segment identifier of three coordinate axes of the three-dimensional coordinate system and / or a plane identifier of three coordinate planes of the three-dimensional coordinate system.
[0090] In an implementation, the device further comprises a selection state display module configured to display a selection state on the operation region in response to a touch operation on the operation region.
[0091] In an implementation, the device further comprises a lock state display module configured to display a lock state on the target coordinate axis when the movement dimension of the virtual object is locked to the target coordinate axis.
[0092] In an implementation, the device further comprises a lock cancel module configured to cancel the lock of the movement dimension of the virtual object to the target coordinate axis in response to one of the following events:
[0093] The first touch operation and the second touch operation are terminated and none of the first sliding operation continuous to the first touch operation or the second touch operation occurs;
[0094] The first touch operation and the second touch operation are terminated and none of the first sliding operation occurs after a preset time period.
[0095] In an implementation, the device further comprises a virtual object movement module configured to control the virtual object to move on a coordinate plane corresponding to a first target operation region according to a second sliding operation initiated from the first target operation region.
[0096] The first target operation region is one of the three operation regions.
[0097] In an implementation, the device further comprises a scaling and rotating module configured to control the virtual object to enter a scaling state or a rotating state in response to a third touch operation on a second target operation region; the third touch operation is different from the first touch operation and the second touch operation in operation mode; the second target operation region is one of the three operation regions.
[0098] The scaling and rotating module is further configured to control the virtual object to scale or rotate on a coordinate plane where the third operation region is located in response to a third sliding operation.
[0099] Based on the same application concept, see Figure 16 As shown, Figure 16 FIG. 1 shows a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, wherein Figure 16 As shown, a computer device 1600 provided in an embodiment of the present application includes:
[0100] Processor 1601, memory 1602 and bus 1603, the memory 1602 stores machine-readable instructions executable by the processor 1601, when the computer device 1600 is running, the processor 1601 and the memory 1602 communicate through the bus 1603, and the machine-readable instructions are executed by the processor 1601 to execute the steps of the virtual object control method shown in the above embodiment.
[0101] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the virtual object control method described in any one of the above embodiments are executed.
[0102] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0103] The computer program product for controlling virtual objects provided in an embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.
[0104] The control device for the virtual object provided in the embodiment of the present invention can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for any part not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0105] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. The embodiments described above are merely exemplary, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, and electrical, mechanical or other forms.
[0106] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0107] In addition, each functional unit in the embodiments of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0108] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0109] It should be noted that: similar reference numerals and letters in the following drawings represent similar items, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0110] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. However, such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A control method of a virtual object, characterized by, The application is applied to a touch terminal, a three-dimensional virtual scene is displayed on a graphical user interface of the touch terminal, and a virtual object is contained in the three-dimensional virtual scene. The control method comprises the following steps: In response to a trigger operation of entering an editing mode of the three-dimensional virtual scene, position indication marks of three operation regions, i.e., a first operation region, a second operation region and a third operation region, are displayed on the graphical user interface. The three operation regions correspond to three coordinate planes of a three-dimensional coordinate system with a specified position on the virtual object as an origin, respectively. In response to a first touch operation and a second touch operation occurring simultaneously on the first operation region and the second operation region, a moving dimension of the virtual object is locked on a target coordinate axis corresponding to a boundary line of coordinate planes where the first operation region and the second operation region are located. In response to a first sliding operation, the virtual object is controlled to move along a direction of the target coordinate axis according to the first sliding operation.
2. The control method according to claim 1, characterized by, The position indication marks comprise line segment marks of three coordinate axes of the three-dimensional coordinate system and / or plane marks of three coordinate planes of the three-dimensional coordinate system.
3. The control method according to claim 1, characterized by, The method further comprises the following step: in response to a touch operation on the operation region, a selected state is displayed on the operation region.
4. The control method according to claim 1, characterized by, The method further comprises the following step: when the moving dimension of the virtual object is locked on the target coordinate axis, a locked state is displayed on the target coordinate axis.
5. The control method according to claim 1, characterized by, The method further comprises the following step: in response to one of the following events, the lock of the moving dimension of the virtual object on the target coordinate axis is cancelled: The first touch operation and the second touch operation are terminated, and the first sliding operation continuous to the first touch operation or the first touch operation is not generated. The first touch operation and the second touch operation are terminated, and the first sliding operation is not generated after a preset time period.
6. The control method according to claim 1, characterized by, The method further comprises the following step: in response to a second sliding operation starting from a first target operation region, the virtual object is controlled to move on a coordinate plane corresponding to the first target operation region according to the second sliding operation. The first target operation region is one of the three operation regions.
7. The control method according to claim 1, characterized by, The method further comprises the following steps: in response to a third touch operation on a second target operation region, the virtual object is controlled to enter a scaling state or a rotating state; the third touch operation is different from the first touch operation and the second touch operation in operation mode; the second target operation region is one of the three operation regions. In response to a third sliding operation, the virtual object is controlled to be scaled or rotated on a coordinate plane where the third operation region is located.
8. A control device of a virtual object, characterized by, The device is arranged in a touch terminal, a three-dimensional virtual scene is displayed on a graphical user interface of the touch terminal, and a virtual object is contained in the three-dimensional virtual scene. The control device comprises the following steps: An indication display module is configured to display position indication marks of three operation regions, i.e., a first operation region, a second operation region and a third operation region, on the graphical user interface in response to a trigger operation of entering an editing mode of the three-dimensional virtual scene, the three operation regions corresponding to three coordinate planes of a three-dimensional coordinate system with a specified position on the virtual object as the origin; A movement dimension locking module is configured to lock a movement dimension of the virtual object to a target coordinate axis corresponding to a boundary line of coordinate planes where the first operation region and the second operation region are located in response to a first touch operation and a second touch operation occurring simultaneously on the first operation region and the second operation region; A virtual object control module is configured to control the virtual object to move along the direction of the target coordinate axis according to a first sliding operation.
9. A computer device, comprising: The computer device comprises a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, the processor and the memory communicate through the bus when the computer device is running, and the machine readable instructions are executed by the processor to perform the steps of the virtual object control method in any one of claims 1 to 7. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to perform the steps of the virtual object control method in any one of claims 1 to 7.
10. A computer readable storage medium characterized by,