Travel route generation method and device, head-mounted virtual reality device, and medium
Patent Information
- Application Number
- CN202311602698.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-08-07
- Estimated Expiration
- 2043-11-28
AI Technical Summary
[0004]现有的进攻地点设置方式较为繁琐,需要用户对目标虚拟对象的进攻状态进行持续关注,不利于用户的游戏体验
[0018]本申请提供的行进路线生成方法、装置、头戴式虚拟现实设备及介质,对于头戴式虚拟现实设备,基于获取的第一手部动作,在预设虚拟场景中生成行进位置点,以根据预设起点和行进位置点生成游戏行进路线,使得目标虚拟对象在当前任务地点完成任务后,可以自行直接沿着游戏行进路线到达行进位置点执行该行进位置点的任务,这样就可以提前为目标虚拟对象规划任务地点,无需等到目标虚拟对象在执行完当前任务后再选择下一个地点,将用户从对目标虚拟对象的进攻状态的持续关注中解脱出来,提高用户的游戏体验。
Smart Images

Figure CN117482520B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of virtual reality technology, and more specifically, to a method, apparatus, head-mounted virtual reality device, and medium for generating a travel route. Background Technology
[0002] Strategy games (SLG) generally refer to war-themed strategy simulation games. In SLG games, the target virtual object needs to continuously attack multiple locations in the virtual scene to complete the game objective.
[0003] In existing SLG games, the target virtual object will remain in place after attacking a location, waiting for the user to instruct on the next attack location. Therefore, the user needs to continuously monitor whether the target virtual object has completed its attack at the current location in order to arrange the next attack location as soon as possible.
[0004] The existing method of setting up attack locations is rather cumbersome, requiring users to continuously monitor the attack status of the target virtual object, which is detrimental to the user's gaming experience. Summary of the Invention
[0005] The purpose of this disclosure is to address the shortcomings of the prior art by providing a method, apparatus, head-mounted virtual reality device, and medium for generating travel routes, so as to pre-set travel position points for target virtual objects and improve the user's gaming experience.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, embodiments of this application provide a method for generating a travel route, applied to a head-mounted virtual reality device providing a graphical user interface, wherein the graphical user interface displays a preset virtual scene, and the method includes:
[0008] Acquire the first hand movement;
[0009] If the first hand action includes: a first preset hand action, then the movement position point is determined from the preset virtual scene based on the first hand action;
[0010] If the first hand gesture changes to a preset ending gesture, then a game movement route is generated based on the preset starting point in the preset virtual scene and the movement position point, so as to control the target virtual object to move from the preset starting point to the movement position point along the game movement route in the preset virtual scene.
[0011] Secondly, embodiments of this application also provide a route generation device, applied to a head-mounted virtual reality device providing a graphical user interface, wherein the graphical user interface displays a preset virtual scene, and the device includes:
[0012] The motion acquisition module is used to acquire the first hand motion;
[0013] The travel position determination module is used to determine the travel position from the preset virtual scene based on the first hand action if the first hand action includes a first preset hand action.
[0014] The movement route generation module is used to generate a game movement route based on the preset starting point in the preset virtual scene and the movement position point if the first hand action changes to a preset ending action, so as to control the target virtual object to move from the preset starting point to the movement position point along the game movement route in the preset virtual scene.
[0015] Thirdly, embodiments of this application also provide a head-mounted virtual reality device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the head-mounted virtual reality device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the route generation method as described in any of the first aspects.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the route generation steps as described in any of the first aspects.
[0017] The beneficial effects of this application are:
[0018] The method, apparatus, head-mounted virtual reality device, and medium for generating movement routes provided in this application, for head-mounted virtual reality devices, generate movement position points in a preset virtual scene based on the acquired first hand movements, and generate game movement routes according to preset starting points and movement position points. This allows the target virtual object to directly reach the movement position point and perform the task at that movement position point after completing the task at the current task location. In this way, task locations can be planned for the target virtual object in advance, without having to wait for the target virtual object to complete the current task before selecting the next location. This frees the user from continuous attention to the attack state of the target virtual object and improves the user's gaming experience. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating the route generation method provided in this application embodiment. Figure 1 ;
[0021] Figure 2 A flowchart illustrating the route generation method provided in this application embodiment. Figure 2 ;
[0022] Figure 3 A schematic diagram of a first gesture provided for an embodiment of this application;
[0023] Figure 4 A flowchart illustrating the route generation method provided in this application embodiment. Figure 3 ;
[0024] Figure 5 A schematic diagram of the second gesture provided in the embodiments of this application;
[0025] Figure 6 This is a schematic diagram of a graphical user interface provided in an embodiment of this application;
[0026] Figure 7 A schematic diagram illustrating the preset termination action provided in the embodiments of this application;
[0027] Figure 8 A flowchart illustrating the route generation method provided in this application embodiment. Figure 4 ;
[0028] Figure 9 A schematic diagram of the third gesture provided in the embodiments of this application;
[0029] Figure 10 A flowchart illustrating the route generation method provided in this application embodiment. Figure 5 ;
[0030] Figure 11 A flowchart illustrating the route generation method provided in this application embodiment. Figure 6 ;
[0031] Figure 12 A schematic diagram of a straight travel route provided in an embodiment of this application;
[0032] Figure 13 A flowchart illustrating the route generation method provided in this application embodiment. Figure 7 ;
[0033] Figure 14 A schematic diagram of a broken-line travel route provided in an embodiment of this application;
[0034] Figure 15 This is a schematic diagram of the structure of the route generation device provided in the embodiments of this application;
[0035] Figure 16 This is a schematic diagram of a head-mounted virtual reality device provided in an embodiment of this application. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this disclosure, but not all embodiments.
[0037] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0038] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.
[0040] This application provides a method for generating a travel route. In one embodiment of this application, the method for generating a travel route can run on a local terminal device or a server. When the method for generating a travel route runs on a server, it can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0041] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program's execution and the game screen presentation are separate. The storage and execution of the path generation method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0042] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), that is, conventionally downloading, installing, and running the game program through a head-mounted virtual reality device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling its display on the display screen.
[0043] In an optional implementation, this disclosure provides a method for generating a travel route, which provides a graphical interactive interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interactive system.
[0044] The method for generating a travel route provided in this application utilizes a head-mounted virtual reality (VR) device, also known as a head-mounted display. This VR device has multiple cameras mounted around its perimeter for real-time image capture. Instead of providing a graphical user interface through a monitor, the VR device directly presents a graphical interface in front of the user's eyes, which the user can view by wearing the VR device.
[0045] The head-mounted virtual reality device can be a device with a processor, in which game programs can be installed and run directly, and preset virtual scenes provided by the game program can be displayed in the graphical interface; the head-mounted virtual reality device can also be a standalone client device, which communicates with the cloud game server in the cloud interaction system to receive data sent by the cloud game server and display preset virtual scenes in the graphical interface.
[0046] Based on the aforementioned head-mounted virtual reality device, this application provides a method for generating a travel route for the head-mounted virtual reality device. Please refer to... Figure 1 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method may include:
[0047] S101: Obtain the first hand movement.
[0048] Running an SLG game displays a preset virtual scene in the graphical interface of a head-mounted virtual reality device. The preset virtual scene includes at least one controlled virtual object controlled by the player and a large number of virtual objects. The virtual objects constitute different task locations in the preset virtual scene. The player needs to control the controlled virtual object to go to each task location to perform tasks in order to complete the game objective.
[0049] During gameplay using a head-mounted virtual reality (VR) device, cameras installed around the device monitor the scene within its field of view. When the user's hand moves or makes a gesture within the camera's field of view, the camera captures the initial hand movement. This initial hand movement can be captured through image capture and recognition, video capture and recognition, or key motion recognition.
[0050] Specifically, image acquisition and recognition are used to acquire images of the user's hand movements when the camera detects that the user's hand is moving and making an action within the camera's field of view. This results in a first image of the user's hand, which is then sent to the processor or cloud gaming server in the head-mounted virtual reality device. The processor or cloud gaming server then recognizes the first image of the user's hand to obtain the first hand action. The first image of the user's hand is an image of one of the user's hands, and the first hand action is the hand action of that hand.
[0051] Video capture and recognition is used to capture video of a user's hand movements when the camera detects that the user's hand is moving and making an action within the camera's field of view. This results in a first user hand video, which is then sent to the processor or cloud gaming server in the head-mounted virtual reality device. The processor or cloud gaming server then recognizes the first user hand video to obtain the first hand action.
[0052] Key motion recognition is used to detect and identify the user's hand movements within the camera's field of view. When the user's hand is detected as the first hand movement, an indication message indicating that the first hand movement has been detected is sent to the head-mounted virtual reality device.
[0053] If one of the user's hands is designated as the left hand, then the other hand is designated as the right hand; conversely, if one of the user's hands is designated as the right hand, then the other hand is designated as the left hand. In this embodiment, the user's right-hand hand movement represents the first hand movement.
[0054] S102: If the first hand action includes: a first preset hand action, then determine the movement position point from the preset virtual scene according to the first hand action.
[0055] In this embodiment, a variety of hand gestures are pre-designed, each corresponding to a different function to generate different interactive instructions. The first preset hand gesture is a pre-defined hand gesture used to generate a movement position point in a preset virtual scene. If the first hand gesture in the first user's hand image includes the first preset hand gesture, the corresponding position coordinates of the first preset hand gesture in the graphical user interface can be determined based on the position of the first preset hand gesture in the world coordinate system and the mapping relationship between the world coordinate system and the graphical user interface coordinate system. Based on the corresponding position coordinates of the first preset hand gesture in the graphical user interface, the movement position point is determined from the preset virtual scene.
[0056] In some embodiments, the position of the first preset hand gesture in the world coordinate system is used to indicate the task location that the target virtual object needs to reach in the preset virtual scene, and the movement position point is the task location corresponding to the first preset hand gesture.
[0057] S103: If the first hand action changes to a preset ending action, then a game movement route is generated based on the preset starting point and movement position in the preset virtual scene, so as to control the target virtual object to move from the preset starting point to the movement position along the game movement route in the preset virtual scene.
[0058] In this embodiment, to avoid triggering the generation of a game path in a preset virtual scene due to the user's unintentional first hand movement, a preset ending action associated with the first hand movement can be set. If the preset ending action is recognized in another user's hand image after the first hand movement is recognized from the first user's hand image, that is, the user's hand movement changes from the first hand movement to the preset ending action, then it can be determined that the user needs to generate a game path in the preset virtual scene.
[0059] After the first hand movement changes to the preset ending movement, a game path is generated based on the preset starting point and movement position in the preset virtual scene. The game path can be a straight path connecting the preset starting point and movement position, or a curved path. If there are virtual objects between the straight line connecting the preset starting point and movement position, a curved path that avoids the virtual objects can be generated.
[0060] After the game path is generated, once the target virtual object completes its task at the current task location, it can move directly along the game path from the preset starting point to the current location point, and complete the task at the corresponding task location point at that current location point.
[0061] For example, the preset starting point can be the current task location where the target virtual object is located, or it can be any location point in other preset virtual scenes specified by the user.
[0062] In an optional implementation, if the head-mounted virtual reality device interacts with a cloud gaming server, the cloud gaming server, after obtaining the game route based on the preset starting point and the travel position, sends the screen of the preset virtual scene that generates the game route to the head-mounted virtual reality device, so as to display the preset virtual scene with the game route in the graphical interface of the head-mounted virtual reality device.
[0063] The movement route generation method provided in the above embodiments, for head-mounted virtual reality devices, generates movement position points in a preset virtual scene based on the acquired first hand movements, and generates a game movement route according to the preset starting point and movement position points. This allows the target virtual object to directly reach the movement position point and perform the task at that movement position point after completing the task at the current task location. In this way, task locations can be planned for the target virtual object in advance, without having to wait for the target virtual object to complete the current task before selecting the next location. This frees the user from continuous attention to the attack state of the target virtual object and improves the user's gaming experience.
[0064] The following describes the possible implementation methods for determining the travel position point based on the first hand movement, with reference to the embodiments.
[0065] Please refer to Figure 2 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 2 ,like Figure 2 As shown, the process of determining the movement position from the preset virtual scene based on the first hand movement in S102 may include:
[0066] S201: Generate virtual points in a preset virtual scene based on the initial gesture in the first gesture change sequence.
[0067] In this embodiment, if the user only needs to set a travel position point in the preset virtual scene, the user only needs to control the hand to perform a first preset hand action.
[0068] By recognizing the first user's hand image captured in real time by the camera of the head-mounted virtual reality device, it is determined that the first hand action recognized includes only one first preset hand action. That is, when recognizing the first user's hand image in multiple consecutive frames, only one first preset hand action is recognized before the user's hand action changes from the first hand action to the preset ending action.
[0069] The first preset hand gesture includes: a first gesture change sequence, which indicates a first preset hand gesture constituted by the user's gesture changes in a first user hand image across multiple consecutive frames. The first gesture change sequence includes: an initial gesture, a movement of the initial gesture, and a completion gesture.
[0070] Once an initial gesture is recognized in the first user's hand image, a virtual point is generated in the preset virtual scene based on the initial gesture. The virtual point can be located at any position in the preset virtual scene, and generally the virtual point is located within a preset range of the preset starting point.
[0071] S202: Based on the movement of the initial gesture in the first gesture change sequence, adjust the position of the virtual point in the preset virtual scene to obtain the target position point.
[0072] In this embodiment, in order to ensure that a movement position point is generated at the task location in the preset virtual scene, the user can control the movement of the hand in the world space based on the initial gesture, and adjust the position of the virtual point in the preset virtual scene in real time.
[0073] Specifically, the head-mounted virtual reality device detects the position of the initial gesture in the first user hand image of two adjacent frames to determine if the initial gesture has been displaced. If displacement is determined, the movement direction of the initial gesture is calculated, and based on the movement direction, the virtual point is controlled in real time to move along that direction within the preset virtual scene. When the position of the virtual point in the preset virtual scene is determined to meet the user's needs or be located at the task location, the target position point is obtained.
[0074] In an optional implementation, the movement distance of the virtual point in a preset virtual scene can be determined based on the movement distance of the initial gesture in world space and the mapping relationship of the coordinate system.
[0075] In another optional implementation, the movement distance of the virtual point in the preset virtual scene can be determined according to the preset default distance. That is, if the initial gesture is displaced in the first user hand image of two adjacent frames, the virtual point is controlled to move along the movement direction in the preset virtual scene according to the preset default distance.
[0076] In another optional implementation, the movement distance of the virtual point in the preset virtual scene can be determined according to the preset movement rate, that is, the movement distance of the virtual point is calculated according to the preset movement rate and the acquisition time interval of the first user hand image of two adjacent frames.
[0077] S203: Based on the completed gesture in the first gesture change sequence, determine the target position point in the preset virtual scene as a moving position point.
[0078] In this embodiment, when a completed gesture is recognized in the first user's hand image, a travel position point is generated based on the last location of the virtual point in the preset virtual scene, i.e., the target position point.
[0079] In some embodiments, if the first hand gesture is used to indicate the generation of a single movement position in a preset virtual scene, the completion gesture in the first gesture change sequence and the preset end gesture can be the same gesture. After determining a single movement position in the preset virtual scene based on the completion gesture in the first gesture change sequence, a game movement route is generated based on the preset starting point and the single movement position.
[0080] The method for generating a travel route provided in the above embodiments generates a virtual point based on the initial gesture in the first gesture change sequence, adjusts the position of the virtual point in the preset virtual scene based on the movement of the initial gesture, and generates a travel position point based on the target position point where the virtual point is located after the completed gesture. This enables the pre-setting of travel position points for target virtual objects in the preset virtual scene using a head-mounted virtual reality device. The operation is simple and improves the user's gaming experience when playing games using a head-mounted virtual reality device.
[0081] In one possible implementation, if the first hand action includes: a series of consecutive first preset hand actions, each first preset hand action includes: a first gesture change sequence, wherein the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence satisfies a preset interval threshold.
[0082] In this embodiment, if the user needs to generate a game route including multiple movement points in a preset virtual scene, the user needs to control the hand to continuously perform multiple first preset hand actions.
[0083] By recognizing the first user's hand image captured in real time by the camera of the head-mounted virtual reality device, it is determined that the recognized first hand action includes multiple consecutive first preset hand actions. That is, when recognizing multiple consecutive frames of the first user's hand image, the user's hand action changes from the first hand action to the preset ending action only after multiple first preset hand actions are recognized.
[0084] For each first preset hand action including the first gesture change sequence, the above S201-S203 are used to generate the corresponding travel position point for each first gesture change sequence. Between two adjacent first gesture change sequences, it is necessary to ensure that the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence is less than or equal to the preset interval threshold. That is, after the user's hand action changes to the completed gesture, it needs to switch back to the initial gesture within the preset interval threshold to enable the setting of the next travel position point.
[0085] After generating multiple movement points based on multiple gesture change sequences, the game movement route is generated by connecting the preset starting point and each movement point in the order in which they were generated.
[0086] In some embodiments, if the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence exceeds a preset interval threshold, the generation of the travel position point is canceled, and the user needs to re-control the hand movements to generate the first gesture change sequence.
[0087] In some embodiments, if the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence exceeds a preset interval threshold, then all movement position points corresponding to the first gesture change sequences before the current first gesture change sequence are generated. However, if the current first gesture change sequence cannot be responded to, then virtual points cannot be generated based on the initial gesture in the current first gesture change sequence. In this case, the user can control the hand movement to change to a preset end action to generate a game movement route based on the preset starting point and the already generated movement position points, and generate new movement position points again through the first gesture change sequence when needed.
[0088] The movement route generation method provided in the above embodiments generates multiple movement position points based on a series of first preset hand movements. Based on the preset starting point and multiple movement position points, a game movement route is generated, enabling the setting of multiple task locations for the target virtual object at one time. After the target virtual object completes a task at one task location, it can directly move along the game movement route to the next task location to perform a task. This allows for the pre-planning of task locations for the target virtual object, eliminating the need to wait for the target virtual object to complete the current task before selecting the next location. This frees the user from continuous attention to the target virtual object's offensive state and improves the user's gaming experience.
[0089] In an optional implementation, the initial gesture is: a pinching gesture of the fingers of the same hand, and the completed gesture is a releasing gesture of the pinched fingers.
[0090] For example, please refer to Figure 3 This is a schematic diagram of the first gesture provided in an embodiment of this application, such as... Figure 3 As shown, Figure 3 The image in the middle left shows a pinching gesture where the tips of the right thumb and index finger touch each other. Figure 3 The image on the right shows a releasing gesture with a preset distance between the tips of the right thumb and index finger.
[0091] It should be noted that, Figure 3 The pinching and releasing gestures shown are merely examples and are not limited to the specific gestures used in this application. Figure 3 The gestures shown are for pinching and releasing.
[0092] Furthermore, if the first hand gesture includes: multiple consecutive first preset hand gestures, then the finger corresponding to the pinch gesture in the current first gesture change sequence can be the same finger as the pinch gesture in the previous first gesture change sequence, or it can be a different finger.
[0093] If different fingers are used, the pinch gesture can be changed from one finger and thumb to another. For example, the first initial gesture is the pinch gesture of the index finger and thumb, the second initial gesture is the pinch gesture of the middle finger and thumb, the third initial gesture is the pinch gesture of the ring finger and thumb, and the fourth initial gesture is the pinch gesture of the little finger and thumb. The completed gesture corresponding to each initial gesture is the release gesture of the corresponding finger and thumb. The time interval between switching from the release gesture of one finger and thumb to the pinch gesture of another finger and thumb must be less than or equal to a preset interval threshold.
[0094] Through the pinching gesture of the four fingers and the thumb, the movement of the pinching gesture, and the releasing gesture of the four fingers and the thumb, four movement position points are generated in the preset virtual scene.
[0095] In some embodiments, if the number of travel position points to be generated is greater than 4, after the above round of pinching gestures of each finger and thumb, a new round of pinching gestures can be started from the index finger.
[0096] The method for generating a travel route provided in the above embodiments can generate one or more travel position points in a virtual scene through simple pinch and release gestures. The travel route is then planned for the target virtual object based on one or more travel position points and a preset starting point. This allows users to pre-set travel position points for the target virtual object in a preset virtual scene using a head-mounted virtual reality device. The method is simple and improves the user's gaming experience when playing games using a head-mounted virtual reality device.
[0097] Please refer to Figure 4 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 3 ,like Figure 4 As shown, the process of determining the movement position from the preset virtual scene based on the first hand movement in S102 may include:
[0098] S301: Generate the current virtual point in the preset virtual scene based on the current initial gesture in the current second gesture change sequence.
[0099] In this embodiment, if the user needs to generate a game route including multiple movement points in a preset virtual scene, the user needs to control the hand to continuously perform multiple second preset hand actions.
[0100] By recognizing the first user's hand image captured in real time by the camera of the head-mounted virtual reality device, it is determined that the recognized first hand action includes multiple consecutive second preset hand actions. That is, when recognizing multiple consecutive frames of the first user's hand image, the user's hand action changes from the first hand action to the preset ending action only after multiple second preset hand actions are recognized.
[0101] The second preset hand gesture includes a second gesture change sequence, which indicates a second preset hand gesture constituted by the user's gesture changes in multiple consecutive frames of the first user hand image. The second gesture change sequence includes an initial gesture and movement of the initial gesture.
[0102] Once the initial gesture in the current second gesture change sequence is recognized in the first user's hand image, a current virtual point is generated in the preset virtual scene based on the initial gesture. The current virtual point can be located at any position in the preset virtual scene, and generally the current virtual point is located within the preset range of the preset starting point or the previous moving position point.
[0103] S302: Based on the movement of the initial gesture, adjust the position of the current virtual point in the preset virtual scene to obtain the current position point.
[0104] In this embodiment, in order to ensure that a movement position point is generated at the task location in the preset virtual scene, the user can control the hand to move in the world space based on the initial gesture in the current second gesture change sequence, and adjust the position of the current virtual point in the preset virtual scene in real time.
[0105] Specifically, the head-mounted virtual reality device detects the position of the initial gesture in the first user hand image of two adjacent frames to determine if the initial gesture has been displaced. If it is determined that the initial gesture has been displaced, the movement direction of the initial gesture is calculated. Based on the movement direction, the current virtual point is controlled in real time to move along that direction within the preset virtual scene. When it is determined that the current virtual point's position in the preset virtual scene meets the user's needs or is located at the task location, the current position point is obtained.
[0106] S303: Based on the next initial gesture in the next second gesture change sequence, determine the current position point in the preset virtual scene as a moving position point, and generate a new virtual point in the preset virtual scene.
[0107] The difference between the method of generating the travel position point in this embodiment and the above-described S203 is that the above-described S203 determines the generation of the travel position point based on the completed gesture in the first gesture change sequence, while in this embodiment, the second gesture change sequence does not include the completed gesture. Instead, the initial gesture in the next second gesture change sequence, i.e., the next initial gesture, is used as the completed gesture of the current second gesture change sequence. When the next initial gesture is recognized in the first user's hand image, a travel position point is generated based on the last location of the current virtual point in the preset virtual scene, i.e., the current position point. A new virtual point is generated in the preset virtual scene, and the new virtual point can be located within the preset range of the travel position point.
[0108] S304: Based on the movement of the next initial gesture, adjust the position of the new virtual point in the preset virtual scene to obtain a new position point, until the first hand movement changes to the preset end movement, and obtain multiple movement position points.
[0109] In this embodiment, the method of adjusting the position of the new virtual point in the preset virtual scene according to the movement of the next initial gesture to obtain the new position point is the same as the method of adjusting the position of the current virtual point in the preset virtual scene according to the movement of the current initial gesture to obtain the current position point in S302, and will not be described again here.
[0110] Based on multiple consecutive second gesture change sequences, multiple travel position points are generated sequentially. If a position point is obtained based on the initial gesture and movement of the initial gesture in a second gesture change sequence, and the second gesture change sequence is not followed by another second gesture change sequence, but by a preset ending action, then the position point is directly determined as the last travel position point based on the preset ending action.
[0111] The movement route generation method provided in the above embodiments generates multiple movement position points based on a series of second preset hand movements. Based on the preset starting point and multiple movement position points, a game movement route is generated, enabling the setting of multiple task locations for the target virtual object at one time. After the target virtual object completes a task at one task location, it can directly move along the game movement route to the next task location to perform a task. This allows for the pre-planning of task locations for the target virtual object, eliminating the need to wait for the target virtual object to complete the current task before selecting the next location. This frees the user from continuous attention to the target virtual object's offensive state and improves the user's gaming experience.
[0112] In one possible implementation, the current initial gesture is: a pinch gesture of a first number of fingers of the same hand with a preset finger, and the next initial gesture is: a pinch gesture of a second number of fingers of the same hand with the preset finger, wherein the first number is less than the second number.
[0113] In this embodiment, the initial gesture is a pinching gesture of multiple fingers in the same hand. In order to distinguish between the current initial gesture and the next initial gesture, they can be distinguished according to the number of fingers that make up the pinching gesture.
[0114] Specifically, the fingers in the same hand are divided into preset fingers and other fingers. The pinching gesture is a gesture in which the fingertips of other fingers and preset fingers touch each other. The current initial gesture is the pinching gesture of the first number of other fingers and preset fingers, and the next initial gesture is the pinching gesture of the second number of other fingers and preset fingers, wherein the first number is less than the second number.
[0115] In some embodiments, the next initial gesture may be to add one additional finger to the preset finger in addition to the first number of other fingers in the current initial gesture.
[0116] For example, the default finger can be the thumb. The first initial gesture is a pinch gesture between the index finger and the thumb. The second initial gesture is a pinch gesture between the index finger, middle finger and thumb. The third initial gesture is a pinch gesture between the index finger, middle finger, ring finger and thumb. The fourth initial gesture is a pinch gesture between the index finger, middle finger, ring finger and little finger and thumb.
[0117] For example, please refer to Figure 5 This is a schematic diagram of the second gesture provided in an embodiment of this application, such as... Figure 5 As shown, Figure 5 (1) in the figure represents the pinching gesture between the index finger and thumb. Figure 5 (2) in the middle refers to the pinching gesture of the index finger, middle finger and thumb. Figure 5 (3) is the pinching gesture of the index finger, middle finger, ring finger and thumb. Figure 5 (4) is the pinching gesture of the index finger, middle finger, ring finger, little finger and thumb.
[0118] In another possible implementation, the current initial gesture is: a pinch gesture of the third number of the same hand and a preset finger, and the next initial gesture is: a pinch gesture of the fourth number of the same hand and a preset finger, where the third number is greater than the fourth number.
[0119] In this embodiment, the initial gesture is a pinching gesture of multiple fingers in the same hand. In order to distinguish between the current initial gesture and the next initial gesture, the finger data constituting the pinching gesture can be used for differentiation.
[0120] Specifically, the fingers of the same hand are divided into preset fingers and other fingers. The pinching gesture is a gesture in which the fingertips of other fingers and preset fingers touch each other. The current initial gesture is the pinching gesture of the third number of other fingers and preset fingers, and the next initial gesture is the pinching gesture of the fourth number of other fingers and preset fingers. The third number is greater than the fourth number.
[0121] In some embodiments, the next initial gesture may be based on the third number of other fingers of the current initial gesture, by releasing one other finger and pinching it with a preset finger, wherein the fourth number is at least 1, that is, it must be ensured that one other finger is pinched with the preset finger.
[0122] For example, the first initial gesture is a pinching gesture using the index, middle, ring, little, and thumb fingers, i.e. Figure 5 In (4), the second initial gesture is a pinching gesture of the index finger, middle finger, ring finger and thumb, that is... Figure 5 In (3), the third initial gesture is a pinching gesture with the index finger, middle finger, and thumb, that is... Figure 5 In (2), the fourth initial gesture is a pinching gesture between the index finger and thumb, that is... Figure 5 (1) in the middle.
[0123] It can be seen that increasing or decreasing the number of pinched fingers are two ways to generate multiple travel position points.
[0124] In some embodiments, if the next initial gesture increases the number of fingers pinched on the current initial gesture to generate multiple travel position points, the maximum number of travel position points that can be generated is four. In order to further increase the number of travel position points that can be generated, the number of travel position points can be further increased if all fingers are pinched with preset fingers, depending on whether the next initial gesture decreases the number of fingers pinched on the current initial gesture.
[0125] For example, the default finger can be the thumb. The first initial gesture is a pinch gesture between the index finger and the thumb. The second initial gesture is a pinch gesture between the index finger, middle finger and thumb. The third initial gesture is a pinch gesture between the index finger, middle finger, ring finger and thumb. The fourth initial gesture is a pinch gesture between the index finger, middle finger, ring finger and little finger and thumb. The fifth initial gesture is a pinch gesture between the index finger, middle finger, ring finger and thumb. The sixth initial gesture is a pinch gesture between the index finger, middle finger and thumb. The seventh initial gesture is a pinch gesture between the index finger and the thumb.
[0126] Furthermore, based on the pinching gesture of the index finger and thumb, the cycle begins with the addition of the middle finger, continuing until the middle, ring, and little fingers are all pinched with the thumb. Then, the little finger, ring finger, and middle finger are released in sequence, with the release of the middle finger pinching the end of the cycle, thus further increasing the number of movement points.
[0127] The method for generating a travel route provided in the above embodiments distinguishes the initial gestures in a series of consecutive second hand movements by using different numbers of fingers and preset finger pinching gestures. This allows for the generation of multiple travel position points through different pinching gestures. The method is simple to operate and improves the user's gaming experience when playing games using a head-mounted virtual reality device.
[0128] Please refer to the travel position points generated based on the above embodiments. Figure 6 This is a schematic diagram of the graphical user interface provided in the embodiments of this application, such as... Figure 6 As shown, the graphical interactive interface displays a preset virtual scene composed of virtual objects. The preset virtual scene includes a preset starting point 11 and multiple movement position points 12. By connecting the preset starting point 11 and multiple movement position points 12 in sequence, a game movement route is generated.
[0129] For example, please refer to Figure 7 This is a schematic diagram of the preset end action provided in the embodiments of this application, such as... Figure 7 As shown, the preset ending gesture can be a palm-opening gesture with all fingers released. Figure 7 The gesture shown is the back of the hand outstretched, but it can also be the palm of the hand outstretched; there is no restriction here.
[0130] In one possible implementation, please refer to Figure 8 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 4 ,like Figure 8 As shown, the method may further include:
[0131] S401: Obtain the second hand action, which, along with the first hand action, represents the hand actions of both hands.
[0132] In this embodiment, when a user moves and performs an action with their hand within the field of view of the camera on the head-mounted virtual reality device, the camera can capture the second hand action. The camera can capture the second hand action using methods such as image capture and recognition, video capture and recognition, or key action recognition; the specific methods are the same as those for capturing the first hand action, and will not be elaborated upon here.
[0133] The second hand movement is a hand movement of another hand that is distinct from the first hand movement. In this embodiment, the hand movement of the user's left hand represents the second hand movement.
[0134] S402: Determine the movement rate of the virtual point based on the second hand movement.
[0135] In this embodiment, the second hand gesture is used to indicate the movement rate of the virtual point in the preset virtual scene. Multiple rate indication gestures are predefined, and each rate indication gesture corresponds to a movement rate. The movement rate corresponding to the rate indication gesture that matches the second hand gesture can be determined based on the second hand gesture in the second user's hand image, and used as the movement rate of the virtual point.
[0136] For example, please refer to Figure 9 This is a schematic diagram of the third gesture provided in the embodiments of this application, such as... Figure 9 As shown, Figure 9 (1) in the figure is a first-level speed indication gesture, corresponding to a first-level movement speed (x1). Figure 9 (2) in the figure represents the second-level rate indicator finger, corresponding to the second-level movement rate (x2). Figure 9 (3) in the figure represents the three-level speed indicator finger, corresponding to the three-level movement speed (x3). Figure 9 (4) is the fourth-level speed indicator finger, corresponding to the fourth-level movement speed (x4).
[0137] The process of adjusting the position of the virtual point in the preset virtual scene based on the movement of the initial gesture in the first gesture change sequence to obtain the target position point may include:
[0138] S403: Based on the movement of the initial gesture in the first gesture change sequence, move the virtual point using a movement rate to adjust the position of the virtual point in the preset virtual scene.
[0139] In this embodiment, the movement distance of the virtual point is calculated based on the movement rate corresponding to the second hand movement and the acquisition time interval of the first user hand image in two adjacent frames. The position of the virtual point in the preset virtual scene is adjusted by the movement distance and the corresponding movement direction.
[0140] In some embodiments, after determining the movement rate based on the second hand gesture, the movement rate is displayed in a graphical user interface to confirm that the movement rate indicated by the second hand gesture is effective. During the initial gesture movement in the first gesture change sequence, the second hand gesture may be canceled, which does not affect the effectiveness of the determined movement rate.
[0141] In other embodiments, during the initial gesture movement in the first gesture change sequence, the second hand action is kept in a holding state to ensure that the movement rate of the virtual point is also kept in a holding state until the second hand action is switched or canceled, at which point the movement rate of the virtual point is switched to the corresponding movement rate or the default rate.
[0142] It should be noted that the process of determining the movement rate of the virtual point based on the second hand movement, and adjusting the position of the virtual point in the preset virtual scene according to the movement rate, is also applicable to the process of S301-S304 above, and will not be repeated here.
[0143] The method for generating a travel route provided in the above embodiments controls the movement speed of the virtual point through a second hand movement, so that the movement distance of the virtual point can be adjusted within the limited swing range of the user's first hand movement, making the operation more flexible and improving the user's gaming experience when playing games using a head-mounted virtual reality device.
[0144] In one possible implementation, please refer to Figure 10 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 5 ,like Figure 10 As shown, before obtaining the first hand movement in S101, the method may further include:
[0145] S501: Determine the eye's focus from the graphical user interface.
[0146] S502: Obtain the third hand movement.
[0147] S503: If the third hand movement is the third preset hand movement, then determine the preset starting point based on the eye's focus of gaze.
[0148] In this embodiment, the user's eye focus on the graphical user interface is determined based on the recognition of the user's eyes by the camera or sensor in the head-mounted virtual reality device. Determining the eye focus on the graphical user interface requires ensuring that the user's gaze duration at that focus reaches a preset threshold. After determining the eye focus, it can be displayed in the graphical user interface using a special marker.
[0149] Since users' eyes will inevitably be focused on the graphical user interface for a long time when wearing this head-mounted virtual reality device, in order to confirm that the user is setting a preset starting point in the preset virtual scene, after determining the focus of the eyes based on the user's gaze, a third hand movement is also captured by a camera.
[0150] The third preset hand gesture is a preset confirmation gesture. If the third hand gesture is the third preset hand gesture, then a preset starting point is generated in the preset virtual scene based on the position of the eye's focus in the graphical user interface. The third preset hand gesture can be a pinching gesture of the same hand's fingers.
[0151] However, it should be noted that although both the second preset hand gesture and the initial gesture in the gesture sequence involve pinching fingers, these two actions occur at different stages, and therefore their corresponding functions are also different. Specifically, after determining the eye focus in the graphical user interface, the pinching gesture is used to generate a preset starting point; when there is a preset starting point in the preset virtual scene, the pinching gesture is used to generate a virtual point to further generate the movement position point.
[0152] The method for generating a travel route provided in the above embodiments determines the generation of a preset starting point in a preset virtual scene based on the user's eye focus and a third preset hand movement. This avoids the error of triggering the generation of a preset starting point solely through the eye focus, thus ensuring the accuracy of virtual reality interactive control.
[0153] In one possible implementation, the process of generating a game route based on a preset starting point and a travel position in a preset virtual scene, as described in S103, may include:
[0154] The game route is generated by connecting the preset starting point and the travel position point to multiple virtual tiles. The virtual tiles are obtained by dividing the scene terrain of the preset virtual scene into cells.
[0155] In this embodiment, the preset virtual scene has scene terrain, which is used to place virtual objects and allow virtual objects to move within the preset virtual scene. By dividing the scene terrain into cells, multiple virtual plots of the same size and shape are obtained. The virtual plots are used to indicate the unit distance that the virtual object moves within the preset virtual scene, that is, the unit distance that the virtual object travels is the distance corresponding to the adjacent plot.
[0156] By connecting the virtual tiles where the preset starting point and the travel position are located, multiple virtual tiles along the line are determined. Based on the virtual tiles where the preset starting point is located, the multiple virtual tiles along the line, and the virtual tiles where the travel position is located, a game travel route including these virtual tiles is determined, so as to control the target virtual object to move along these virtual tiles in sequence, so as to travel from the preset starting point to the travel position.
[0157] In some embodiments, please refer to Figure 11 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 6 ,like Figure 11 As shown, the process of generating a game route based on multiple virtual tiles traversed by the line connecting the preset starting point and the travel position can include:
[0158] S601: Based on the straight line connecting the preset starting point and the travel position point, determine the multiple virtual plots that the straight line passes through.
[0159] S602: Generate the game route based on the virtual plot where the preset starting point is located, the multiple virtual plots passed through by the straight line, and the virtual plot where the movement position point is located.
[0160] In this embodiment, if the SLG game supports the target virtual object passing through virtual objects in a preset virtual scene and supports the target virtual object moving along a straight line, then by connecting the virtual tiles where the preset starting point and the travel position point are located with a straight line, the multiple virtual tiles that the straight line passes through are determined. Based on the virtual tiles where the preset starting point is located, the multiple virtual tiles that the straight line passes through, and the virtual tiles where the travel position point is located, a game travel route including these virtual tiles is determined, so as to control the target virtual object to move along these virtual tiles in sequence, so as to travel from the preset starting point to the travel position point.
[0161] For example, please refer to Figure 12 This is a schematic diagram of a straight-line travel route provided in an embodiment of this application, such as... Figure 12 As shown, the target virtual object starts from the virtual plot where the preset starting point is located, passes through multiple virtual plots in sequence by the straight line connecting the preset starting point and the travel position point, and arrives at the virtual plot where the travel position point is located.
[0162] In other embodiments, please refer to Figure 13 The following is a flowchart illustrating the method for generating a travel route provided in this application embodiment. Figure 7 ,like Figure 13 As shown, the process of generating a game route based on multiple virtual tiles traversed by the line connecting the preset starting point and the travel position can include:
[0163] S701: Based on the preset starting point and the line connecting the travel position points, determine the multiple virtual plots that the line connects.
[0164] S702: Generate the game route based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the broken line, and the virtual plot where the movement position point is located.
[0165] In this embodiment, if the SLG game does not support the target virtual object passing through virtual objects in a preset virtual scene, or does not support the target virtual object moving along a straight line, then a polyline is drawn connecting the virtual plots where the preset starting point and the moving position point are located to determine the multiple virtual plots traversed by the polyline. The polyline is composed of multiple straight lines parallel to the boundaries of the virtual plots.
[0166] Based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the broken line, and the virtual plot where the movement position is located, a game movement route including these virtual plots is determined, so as to control the target virtual object to move sequentially along these virtual plots to move from the preset starting point to the movement position.
[0167] In some embodiments, a preset pathfinding algorithm can be used to determine the polyline connecting the virtual tiles where the preset starting point and the travel position are located. The preset pathfinding algorithm can be the shortest path pathfinding algorithm or other pathfinding algorithms with a reward mechanism. The algorithm determines the next optimal virtual tile corresponding to the current virtual tile. Based on the next optimal virtual tile corresponding to each virtual tile, the algorithm determines the game travel route composed of multiple optimal virtual tiles between the preset starting point and the virtual tile where the travel position is located.
[0168] For example, please refer to Figure 14 This is a schematic diagram of the broken-line travel route provided in the embodiments of this application, such as... Figure 14 As shown, the target virtual object starts from the virtual plot where the preset starting point is located, passes through multiple virtual plots traversed by the broken line connecting the preset starting point and the travel position point, and arrives at the virtual plot where the travel position point is located.
[0169] The method for generating a travel route provided in the above embodiments generates a game travel route based on multiple virtual plots traversed by the line connecting the preset starting point and the travel position point. This method can generate the optimal game travel route, ensuring that the target virtual object quickly reaches the travel position point and improving game efficiency.
[0170] In one possible implementation, if the preset virtual scene includes multiple controlled virtual objects, the target virtual object is the controlled virtual object that completes the game task first among the multiple controlled virtual objects; or, the target virtual object is the controlled virtual object that is closest to the preset starting point among the multiple controlled virtual objects.
[0171] In this embodiment, if there are multiple controllable virtual objects that can be scheduled by the player in the preset virtual scene, the player can control the multiple controllable virtual objects to perform tasks at different task locations. Each task location can be performed by at least one controllable virtual object.
[0172] After players generate a game path for the next mission using a head-mounted virtual reality device, the target virtual object among multiple controlled virtual objects can move along the game path to reach the mission location and perform the mission.
[0173] In some embodiments, if multiple controlled virtual objects execute their respective tasks, when one of the multiple tasks is completed first by the corresponding controlled virtual object, the controlled virtual object that executed the task becomes the target virtual object and moves along the game's path to the task location to execute a new task. This avoids the controlled virtual object that has completed its game task being in a waiting state and increases the speed at which the game objective is completed.
[0174] In other embodiments, if multiple controlled virtual objects perform their respective tasks at different task locations, the controlled virtual object closest to the preset starting point can be determined as the target virtual object based on the distance between the task location of the controlled virtual object and the preset starting point. After the target virtual object completes its current task, it moves from the current task location to the preset starting point and moves along the game's movement route to a new task location to perform its task, ensuring that the movement distance of the controlled virtual object is minimized and saving game resources.
[0175] Based on the above method embodiments, this application also provides a route generation device, applied to a head-mounted virtual reality device providing a graphical user interface, wherein the graphical user interface displays a preset virtual scene. Please refer to... Figure 15 This is a schematic diagram of the structure of the route generation device provided in the embodiments of this application, as shown below. Figure 15 As shown, the device may include:
[0176] The motion acquisition module 101 is used to acquire the first hand motion;
[0177] The travel position determination module 102 is used to determine the travel position from the preset virtual scene based on the first hand action if the first hand action includes: a first preset hand action;
[0178] The movement route generation module 103 is used to generate a game movement route based on the preset starting point and movement position point in the preset virtual scene if the first hand action changes to a preset ending action, so as to control the target virtual object to move from the preset starting point to the movement position point along the game movement route in the preset virtual scene.
[0179] Optionally, the first hand gesture includes: a first preset hand gesture, the first preset hand gesture including: a first gesture change sequence; the moving position point determination module 102 includes:
[0180] The virtual point generation unit is used to generate virtual points in a preset virtual scene based on the initial gesture in the current first gesture change sequence.
[0181] The virtual point position adjustment unit is used to adjust the position of the virtual point in the preset virtual scene according to the movement of the initial gesture in the first gesture change sequence, so as to obtain the target position point;
[0182] The movement position determination unit is used to determine a target position point in a preset virtual scene as a movement position point based on the completed gesture in the first gesture change sequence.
[0183] Optionally, if the first hand action includes: multiple consecutive first preset hand actions, each first preset hand action includes: a first gesture change sequence, wherein the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence satisfies a preset interval threshold.
[0184] Optionally, the initial gesture is a pinching gesture with the fingers of the same hand, and the final gesture is a releasing gesture with the pinched fingers.
[0185] Optionally, the first hand gesture includes: a series of second preset hand gestures, each second preset hand gesture including: a second gesture change sequence;
[0186] The virtual point generation unit is also used to generate a current virtual point in a preset virtual scene based on the current initial gesture in the current second gesture change sequence;
[0187] The virtual point position adjustment unit is also used to adjust the position of the current virtual point in the preset virtual scene according to the movement of the current initial gesture, so as to obtain the current position point;
[0188] The movement position determination unit is also used to determine the current position in the preset virtual scene as a movement position based on the next initial gesture in the next second gesture change sequence, and to generate a new virtual point in the preset virtual scene;
[0189] The movement position point determination unit is also used to adjust the position of the new virtual point in the preset virtual scene according to the movement of the next initial gesture, so as to obtain a new position point, until the first hand action changes to the preset end action, and obtain multiple movement position points.
[0190] Optionally, the current initial gesture is: a pinch gesture of a first number of fingers of the same hand with a preset number of fingers, and the next initial gesture is: a pinch gesture of a second number of fingers of the same hand with the preset number of fingers, wherein the first number is less than the second number.
[0191] Optionally, the current initial gesture is: the third number of the same hand and the pinch gesture of the preset fingers, and the next initial gesture is: the fourth number of the same hand and the pinch gesture of the preset fingers, where the third number is greater than the fourth number.
[0192] Optionally, the device may also include:
[0193] The motion acquisition module is also used to acquire the second hand motion, which, along with the first hand motion, represents the hand motions of both hands.
[0194] The movement rate determination module is used to determine the movement rate of the virtual point based on the second hand movement.
[0195] The virtual point position adjustment unit is also used to move the virtual point at a moving rate according to the movement of the initial gesture in the first gesture change sequence, so as to adjust the position of the virtual point in the preset virtual scene.
[0196] Optionally, the device may also include:
[0197] The focus determination module is used to determine the eye's gaze focus from the graphical user interface;
[0198] The motion acquisition module is also used to acquire third hand motions;
[0199] The starting point generation module is used to determine the preset starting point based on the eye's gaze focus if the third hand movement is a third preset hand movement.
[0200] In one possible implementation, the route generation module 103 is specifically used to generate a game route based on multiple virtual plots traversed by the line connecting the preset starting point and the travel position point. The virtual plots are obtained by dividing the scene terrain of the preset virtual scene into cells.
[0201] In some embodiments, the route generation module 103 is specifically used to determine multiple virtual plots traversed by the straight line connecting the preset starting point and the travel position point; and to generate a game route based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the straight line, and the virtual plot where the travel position point is located.
[0202] In other embodiments, the route generation module 103 is specifically used to determine multiple virtual plots traversed by the polyline connecting the preset starting point and the travel position point; and to generate a game route based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the polyline connecting the polyline, and the virtual plot where the travel position point is located.
[0203] In one possible implementation, if the preset virtual scene includes multiple controlled virtual objects, the target virtual object is the controlled virtual object that completes the game task first among the multiple controlled virtual objects; or, the target virtual object is the controlled virtual object that is closest to the preset starting point among the multiple controlled virtual objects.
[0204] The movement route generation device provided in the above embodiments, for head-mounted virtual reality devices, generates movement position points in a preset virtual scene based on the acquired first hand movements, and generates a game movement route according to the preset starting point and movement position points. This allows the target virtual object to directly reach the movement position point and perform the task at that movement position point after completing the task at the current task location. In this way, task locations can be planned for the target virtual object in advance, without having to wait for the target virtual object to complete the current task before selecting the next location. This frees the user from continuous attention to the attack state of the target virtual object and improves the user's gaming experience.
[0205] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0206] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0207] Please refer to Figure 16 This is a schematic diagram of a head-mounted virtual reality device provided in an embodiment of this application, as shown below. Figure 16 As shown, the head-mounted virtual reality device 200 includes a processor 201, a storage medium 202, and a bus. The storage medium 202 stores program instructions that can be executed by the processor 201. When the head-mounted virtual reality device 200 is running, the processor 201 communicates with the storage medium 202 through the bus, and the processor 201 executes the program instructions to perform the above-mentioned route generation method.
[0208] Specifically, the steps of the processor executing the above-mentioned route generation method include:
[0209] Obtain the first hand gesture; if the first hand gesture includes a first preset hand gesture, then determine the movement position from the preset virtual scene based on the first hand gesture; if the first hand gesture changes to a preset end gesture, then generate a game movement route based on the preset starting point and movement position in the preset virtual scene, so as to control the target virtual object to move from the preset starting point to the movement position along the game movement route in the preset virtual scene.
[0210] In one possible implementation, the first hand gesture includes: a first preset hand gesture, the first preset hand gesture including: a first gesture change sequence; the processor executing the above process of determining the movement position point from the preset virtual scene based on the first hand gesture may include:
[0211] Based on the initial gesture in the first gesture change sequence, a virtual point is generated in the preset virtual scene; based on the movement of the initial gesture in the first gesture change sequence, the position of the virtual point in the preset virtual scene is adjusted to obtain the target position point; based on the completed gesture in the first gesture change sequence, the target position point in the preset virtual scene is determined as a moving position point.
[0212] In one possible implementation, if the first hand action includes: a series of consecutive first preset hand actions, each first preset hand action includes: a first gesture change sequence, wherein the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence satisfies a preset interval threshold.
[0213] In an optional implementation, the initial gesture is: a pinching gesture of the fingers of the same hand, and the completed gesture is a releasing gesture of the pinched fingers.
[0214] In one possible implementation, the first hand gesture includes: a series of consecutive second preset hand gestures, each second preset hand gesture including: a second gesture change sequence; the processor executing the above process of determining the movement position point from the preset virtual scene based on the first hand gesture may include:
[0215] Based on the current initial gesture in the current second gesture change sequence, a current virtual point is generated in the preset virtual scene; based on the movement of the current initial gesture, the position of the current virtual point in the preset virtual scene is adjusted to obtain the current position point; based on the next initial gesture in the next second gesture change sequence, the current position point in the preset virtual scene is determined as a moving position point, and a new virtual point is generated in the preset virtual scene; based on the movement of the next initial gesture, the position of the new virtual point in the preset virtual scene is adjusted to obtain the new position point, until the first hand movement changes to the preset ending movement, resulting in multiple moving position points.
[0216] In one possible implementation, the current initial gesture is: a pinch gesture of a first number of fingers of the same hand with a preset finger, and the next initial gesture is: a pinch gesture of a second number of fingers of the same hand with the preset finger, wherein the first number is less than the second number.
[0217] In another possible implementation, the current initial gesture is: a pinch gesture of the third number of the same hand and a preset finger, and the next initial gesture is: a pinch gesture of the fourth number of the same hand and a preset finger, where the third number is greater than the fourth number.
[0218] In one possible implementation, the steps of the processor executing the above-described route generation method further include:
[0219] The second hand gesture is obtained, which, along with the first hand gesture, represents the hand gestures of both hands. Based on the second hand gesture, the movement rate of the virtual point is determined. According to the movement of the initial gesture in the first gesture change sequence, the virtual point is moved using the movement rate to adjust its position in the preset virtual scene.
[0220] In one possible implementation, before the processor executes the above-described method for generating the travel route, the steps of the method executed by the processor further include:
[0221] Determine the eye focus from the graphical user interface; obtain the third hand gesture; if the third hand gesture is a third preset hand gesture, determine the preset starting point based on the eye focus.
[0222] In one possible implementation, the processor performing the steps described above to generate a game path based on a preset starting point and a travel position in a preset virtual scene may include:
[0223] The game route is generated by connecting the preset starting point and the travel position point to multiple virtual tiles. The virtual tiles are obtained by dividing the scene terrain of the preset virtual scene into cells.
[0224] In some embodiments, the step of the processor generating a game route by connecting multiple virtual tiles traversed by a line from a preset starting point and a travel position point may include:
[0225] Based on the straight line connecting the preset starting point and the travel position, determine the multiple virtual plots that the straight line passes through; based on the virtual plot where the preset starting point is located, the multiple virtual plots that the straight line passes through, and the virtual plot where the travel position is located, generate the game travel route.
[0226] In other embodiments, the step of generating a game route by the processor based on the multiple virtual tiles traversed by the line connecting the preset starting point and the travel position point may include:
[0227] Based on the zigzag line connecting the preset starting point and the travel position, determine the multiple virtual plots traversed by the zigzag line; based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the zigzag line, and the virtual plot where the travel position is located, generate the game travel route.
[0228] In one possible implementation, if the preset virtual scene includes multiple controlled virtual objects, the target virtual object is the controlled virtual object that completes the game task first among the multiple controlled virtual objects; or, the target virtual object is the controlled virtual object that is closest to the preset starting point among the multiple controlled virtual objects.
[0229] The aforementioned method for generating movement routes, when used with a head-mounted virtual reality device, generates movement position points in a preset virtual scene based on the acquired first hand gesture. This allows the game movement route to be generated according to the preset starting point and movement position points. After completing a task at the current location, the target virtual object can automatically follow the game movement route to reach the movement position point and perform the task there. This allows for pre-planning of task locations for the target virtual object, eliminating the need to wait until it completes its current task before selecting the next location. This frees the user from continuous focus on the target virtual object's offensive state, improving the user's gaming experience.
[0230] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described route generation method.
[0231] Specifically, the steps of the processor executing the above-mentioned route generation method include:
[0232] Obtain the first hand gesture; if the first hand gesture includes a first preset hand gesture, then determine the movement position from the preset virtual scene based on the first hand gesture; if the first hand gesture changes to a preset end gesture, then generate a game movement route based on the preset starting point and movement position in the preset virtual scene, so as to control the target virtual object to move from the preset starting point to the movement position along the game movement route in the preset virtual scene.
[0233] In one possible implementation, the first hand gesture includes: a first preset hand gesture, the first preset hand gesture including: a first gesture change sequence; the processor executing the above process of determining the movement position point from the preset virtual scene based on the first hand gesture may include:
[0234] Based on the initial gesture in the first gesture change sequence, a virtual point is generated in the preset virtual scene; based on the movement of the initial gesture in the first gesture change sequence, the position of the virtual point in the preset virtual scene is adjusted to obtain the target position point; based on the completed gesture in the first gesture change sequence, the target position point in the preset virtual scene is determined as a moving position point.
[0235] In one possible implementation, if the first hand action includes: a series of consecutive first preset hand actions, each first preset hand action includes: a first gesture change sequence, wherein the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence satisfies a preset interval threshold.
[0236] In an optional implementation, the initial gesture is: a pinching gesture of the fingers of the same hand, and the completed gesture is a releasing gesture of the pinched fingers.
[0237] In one possible implementation, the first hand gesture includes: a series of consecutive second preset hand gestures, each second preset hand gesture including: a second gesture change sequence; the processor executing the above process of determining the movement position point from the preset virtual scene based on the first hand gesture may include:
[0238] Based on the current initial gesture in the current second gesture change sequence, a current virtual point is generated in the preset virtual scene; based on the movement of the current initial gesture, the position of the current virtual point in the preset virtual scene is adjusted to obtain the current position point; based on the next initial gesture in the next second gesture change sequence, the current position point in the preset virtual scene is determined as a moving position point, and a new virtual point is generated in the preset virtual scene; based on the movement of the next initial gesture, the position of the new virtual point in the preset virtual scene is adjusted to obtain the new position point, until the first hand movement changes to the preset ending movement, resulting in multiple moving position points.
[0239] In one possible implementation, the current initial gesture is: a pinch gesture of a first number of fingers of the same hand with a preset finger, and the next initial gesture is: a pinch gesture of a second number of fingers of the same hand with the preset finger, wherein the first number is less than the second number.
[0240] In another possible implementation, the current initial gesture is: a pinch gesture of the third number of the same hand and a preset finger, and the next initial gesture is: a pinch gesture of the fourth number of the same hand and a preset finger, where the third number is greater than the fourth number.
[0241] In one possible implementation, the steps of the processor executing the above-described route generation method further include:
[0242] The second hand gesture is obtained, which, along with the first hand gesture, represents the hand gestures of both hands. Based on the second hand gesture, the movement rate of the virtual point is determined. According to the movement of the initial gesture in the first gesture change sequence, the virtual point is moved using the movement rate to adjust its position in the preset virtual scene.
[0243] In one possible implementation, before the processor executes the above-described method for generating the travel route, the steps of the method executed by the processor further include:
[0244] Determine the eye focus from the graphical user interface; obtain the third hand gesture; if the third hand gesture is a third preset hand gesture, determine the preset starting point based on the eye focus.
[0245] In one possible implementation, the processor performing the steps described above to generate a game path based on a preset starting point and a travel position in a preset virtual scene may include:
[0246] The game route is generated by connecting the preset starting point and the travel position point to multiple virtual tiles. The virtual tiles are obtained by dividing the scene terrain of the preset virtual scene into cells.
[0247] In some embodiments, the step of the processor generating a game route by connecting multiple virtual tiles traversed by a line from a preset starting point and a travel position point may include:
[0248] Based on the straight line connecting the preset starting point and the travel position, determine the multiple virtual plots that the straight line passes through; based on the virtual plot where the preset starting point is located, the multiple virtual plots that the straight line passes through, and the virtual plot where the travel position is located, generate the game travel route.
[0249] In other embodiments, the step of generating a game route by the processor based on the multiple virtual tiles traversed by the line connecting the preset starting point and the travel position point may include:
[0250] Based on the zigzag line connecting the preset starting point and the travel position, determine the multiple virtual plots traversed by the zigzag line; based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the zigzag line, and the virtual plot where the travel position is located, generate the game travel route.
[0251] In one possible implementation, if the preset virtual scene includes multiple controlled virtual objects, the target virtual object is the controlled virtual object that completes the game task first among the multiple controlled virtual objects; or, the target virtual object is the controlled virtual object that is closest to the preset starting point among the multiple controlled virtual objects.
[0252] The aforementioned method for generating movement routes, when used with a head-mounted virtual reality device, generates movement position points in a preset virtual scene based on the acquired first hand gesture. This allows the game movement route to be generated according to the preset starting point and movement position points. After completing a task at the current location, the target virtual object can automatically follow the game movement route to reach the movement position point and perform the task there. This allows for pre-planning of task locations for the target virtual object, eliminating the need to wait until it completes its current task before selecting the next location. This frees the user from continuous focus on the target virtual object's offensive state, improving the user's gaming experience.
[0253] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0254] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0255] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0256] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0257] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for generating a travel route, characterized in that, The method, applied to a head-mounted virtual reality device providing a graphical user interface (GUI) displaying a preset virtual scene, includes: Acquire the first hand movement; If the first hand action includes: a first preset hand action, then the movement position point is determined from the preset virtual scene according to the first hand action; If the first hand gesture changes to a preset ending gesture, then a game movement route is generated based on the preset starting point in the preset virtual scene and the movement position point, so as to control the target virtual object to move from the preset starting point to the movement position point along the game movement route in the preset virtual scene.
2. The method as described in claim 1, characterized in that, The first hand gesture includes: a first preset hand gesture, the first preset hand gesture including: a first gesture change sequence; The step of determining the travel position point from the preset virtual scene based on the first hand gesture includes: Based on the initial gesture in the current first gesture change sequence, generate virtual points in the preset virtual scene; Based on the movement of the initial gesture in the first gesture change sequence, the position of the virtual point in the preset virtual scene is adjusted to obtain the target position point; Based on the completed gesture in the first gesture change sequence, the target location point in the preset virtual scene is determined as a moving location point.
3. The method as described in claim 2, characterized in that, If the first hand action includes: a series of first preset hand actions, each first preset hand action includes: a first gesture change sequence, wherein the time interval between the initial gesture in the current first gesture change sequence and the completed gesture in the previous first gesture change sequence satisfies a preset interval threshold.
4. The method as described in claim 2, characterized in that, The initial gesture is a pinching gesture of the fingers of the same hand, and the final gesture is the releasing gesture of the pinched fingers.
5. The method as described in claim 1, characterized in that, The first hand gesture includes: a series of consecutive second preset hand gestures, each second preset hand gesture including: a second gesture change sequence; The step of determining the travel position point from the preset virtual scene based on the first hand gesture includes: Based on the current initial gesture in the current second gesture change sequence, generate the current virtual point in the preset virtual scene; Based on the movement of the current initial gesture, adjust the position of the current virtual point in the preset virtual scene to obtain the current position point; Based on the next initial gesture in the next second gesture change sequence, determine the current position point in the preset virtual scene as a moving position point, and generate a new virtual point in the preset virtual scene; Based on the movement of the next initial gesture, the position of the new virtual point in the preset virtual scene is adjusted to obtain a new position point, until the first hand movement changes to the preset ending movement, resulting in multiple moving position points.
6. The method as described in claim 5, characterized in that, The current initial gesture is: a pinching gesture between a first number of fingers of the same hand and a preset finger, and the next initial gesture is: a pinching gesture between a second number of fingers of the same hand and the preset finger, wherein the first number is less than the second number.
7. The method as described in claim 5, characterized in that, The current initial gesture is: a pinching gesture of the third number of the same hand and a preset number of fingers. The next initial gesture is: a pinching gesture of the fourth number of the same hand and the preset number of fingers, wherein the third number is greater than the fourth number.
8. The method as described in claim 2, characterized in that, The method further includes: Acquire a second hand gesture, wherein the second hand gesture and the first hand gesture are hand gestures of both hands respectively; The movement rate of the virtual point is determined based on the second hand movement; The step of adjusting the position of the virtual point in the preset virtual scene based on the movement of the initial gesture in the first gesture change sequence includes: Based on the movement of the initial gesture in the first gesture change sequence, the virtual point is moved at the movement rate to adjust the position of the virtual point in the preset virtual scene.
9. The method as described in claim 1, characterized in that, Before acquiring the first hand movement, the method further includes: The eye's focal point is determined from the graphical user interface; Acquire the third hand movement; If the third hand gesture is a third preset hand gesture, then the preset starting point is determined based on the eye's gaze focus.
10. The method as described in claim 1, characterized in that, The step of generating a game route based on a preset starting point in the preset virtual scene and the travel position point includes: The game route is generated based on multiple virtual plots traversed by the line connecting the preset starting point and the travel position point. The virtual plots are obtained by dividing the scene terrain of the preset virtual scene into cells.
11. The method as described in claim 10, characterized in that, The step of generating the game route based on multiple virtual tiles traversed by the line connecting the preset starting point and the travel position point includes: Based on the straight line connecting the preset starting point and the travel position point, determine the multiple virtual plots traversed by the straight line; The game route is generated based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the straight line, and the virtual plot where the travel position point is located.
12. The method as described in claim 10, characterized in that, The step of generating the game route based on multiple virtual tiles traversed by the line connecting the preset starting point and the travel position point includes: Based on the polyline connecting the preset starting point and the travel position point, determine the multiple virtual plots traversed by the polyline connecting the points; The game route is generated based on the virtual plot where the preset starting point is located, the multiple virtual plots traversed by the broken line, and the virtual plot where the travel position point is located.
13. The method as described in claim 1, characterized in that, If the preset virtual scene includes multiple controlled virtual objects, then the target virtual object is the controlled virtual object that completes the game task first among the multiple controlled virtual objects; or, the target virtual object is the controlled virtual object that is closest to the preset starting point among the multiple controlled virtual objects.
14. A route generation device, characterized in that, A head-mounted virtual reality device that provides a graphical user interface (GUI) displaying a preset virtual scene, the device comprising: The motion acquisition module is used to acquire the first hand motion; The travel position determination module is used to determine the travel position from the preset virtual scene based on the first hand action if the first hand action includes a first preset hand action. The movement route generation module is used to generate a game movement route based on the preset starting point in the preset virtual scene and the movement position point if the first hand action changes to a preset ending action, so as to control the target virtual object to move from the preset starting point to the movement position point along the game movement route in the preset virtual scene.
15. A head-mounted virtual reality device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the head-mounted virtual reality device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the route generation method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of generating a travel route as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Acquisition method and device of virtual object in game, electronic equipment and storage medium
CN111282265A
Game display control method and device, computer equipment and storage medium
CN115193046A