Virtual scene-based beam display method and its device, equipment, and computer program
Patent Information
- Application Number
- JP2023571836
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-01-29
- Filing Date
- 2022-11-16
- Publication Date
- 2025-03-27
- Estimated Expiration
- 2042-11-16
Smart Images

Figure 0007651817000001 
Figure 0007651817000002 
Figure 0007651817000003
Abstract
Description
[Technical field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims priority to a Chinese patent application bearing application number 202210110548.6 and title "Virtual scene-based beam display method and its apparatus, device and storage medium" filed with the China Patent Office on January 29, 2022, the entire contents of which are incorporated herein by reference.
[0002] The present invention relates to the field of computer technology, and in particular to a virtual scene-based beam display method and an apparatus, device and storage medium thereof. [Background technology]
[0003] With the development of multimedia technology and the diversification of terminal functions, the types of games that can be played on terminals are becoming more and more numerous. Shooting games are a popular type of game. In shooting games, users can control virtual objects and use different virtual item launchers, and can use the virtual item launchers to compete against virtual objects controlled by other users.
[0004] In the related art, a sight is usually displayed on the game screen to remind the user of the aiming position of the virtual item launcher. However, the sight is always small in area and light in color. In some game scenes with complex display content, it is difficult to find the position of the sight, and the difficulty of aiming is relatively high, which may greatly affect the hit rate of the virtual object operated by the player, resulting in a poor game experience and low efficiency of human-computer interaction. In addition, because the sight is small in area and light in color, the virtual item launcher needs to be repeatedly debugged in order for the player to effectively aim at the target, which results in the player's match time and game time being too long, which wastes the power resources of the terminal and affects the terminal's cruising capacity. Summary of the Invention
[0005] A method for virtual scene based beam display implemented by a computing device is provided, the method comprising: displaying a virtual scene, the virtual scene displaying a target virtual object and a virtual item launcher held by the target virtual object; in response to an assembly operation of the virtual item launcher in the virtual scene, displaying an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, the virtual beam launcher being used to assist in aiming the virtual item launcher; and displaying a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher.
[0006] A virtual scene based beam display device is provided, the device comprising: a virtual scene display module configured to display a virtual scene, the virtual scene display module displaying a target virtual object and a virtual item launcher held by the target virtual object; a virtual beam projector display module configured to display an assembled virtual beam projector based on a target assembly position determined by an assembly operation of the virtual item projector in the virtual scene, the virtual beam projector being used to assist in aiming the virtual item projector; and a beam display module configured to display a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher.
[0007] A computing device comprising one or more processors and one or more memories, wherein the one or more memories store at least one computer-readable instruction, and the computer-readable instruction is loaded and executed by the one or more processors to realize the virtual scene-based beam display method.
[0008] A computer-readable storage medium having at least one computer-readable instruction stored therein, the computer-readable instruction being loaded and executed by a processor to realize the virtual scene-based beam display method.
[0009] A computer program product or computer program, the computer program product or computer program comprising computer readable instructions, the computer readable instructions being stored in a computer readable storage medium, and when a processor of a computing device reads the computer readable instructions from the computer readable storage medium, the processor executes the computer readable instructions, thereby causing the computing device to perform the above-mentioned virtual scene-based beam display method.
[0010] In order to more clearly describe the technical solutions of the embodiments of the present invention, the following briefly describes the drawings that need to be used in the description of the embodiments. It is obvious that the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings under the premise that no creative efforts are required. [Brief description of the drawings]
[0011] [Figure 1] 1 is a schematic diagram of an implementation environment of a virtual scene-based beam display method provided by an embodiment of the present invention; [Diagram 2] 2 is a schematic diagram of viewpoints for observing a virtual scene provided by an embodiment of the present invention; [Diagram 3] 1 is a schematic diagram of a virtual scene provided by an embodiment of the present invention; [Figure 4] 4 is a flowchart of a virtual scene-based beam display method provided by an embodiment of the present invention. [Diagram 5] 4 is a flowchart of a virtual scene-based beam display method provided by an embodiment of the present invention. [Figure 6] FIG. 2 is a schematic diagram of another virtual scene provided by an embodiment of the present invention. [Figure 7] FIG. 2 is a schematic diagram of yet another virtual scene provided by an embodiment of the present invention. [Figure 8] FIG. 2 is a schematic diagram of yet another virtual scene provided by an embodiment of the present invention. [Figure 9] FIG. 2 is a schematic diagram of yet another virtual scene provided by an embodiment of the present invention. [Figure 10] FIG. 2 is a schematic diagram of yet another virtual scene provided by an embodiment of the present invention. [Figure 11] FIG. 2 is a schematic diagram of target launch distances provided by an embodiment of the present invention. [Figure 12] 4 is a flowchart of a virtual scene-based beam display method provided by an embodiment of the present invention. [Figure 13] FIG. 2 is a structural schematic diagram of a virtual scene-based beam display device provided by an embodiment of the present invention; [Figure 14] FIG. 2 is a structural schematic diagram of a computer device provided by an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following describes the embodiments of the present invention in more detail with reference to the accompanying drawings.
[0013] In the present invention, the terms "first", "second", etc. are used to distinguish between identical or similar items having substantially the same actions and functions, and there is no logical or chronological dependency between "first", "second", and "nth", and there are no limitations on the number or execution order.
[0014] As used herein, the term "at least one" means one or more, and "multiple" means two or more than two.
[0015] In many related arts, a sight is displayed on a game screen to remind the player of the aiming position of a virtual item launcher. The game screen is used to simulate a real scene, but a sight does not exist in the real scene, and displaying the sight on the game screen may reduce the reality of the game. If the sight is not displayed on the game screen, the player may aim using a fixed-position aiming device, which improves the reality of the game, but may reduce the accuracy of the aiming. In addition, since the position of the aiming device is fixed, the configuration of the aiming device is not flexible.
[0016] Virtual Scene: A virtual scene that is displayed (or provided) when an application program is executed on a terminal. The virtual scene may be a simulation environment for the real world, a semi-simulation and semi-fictional virtual environment, or a completely fictional virtual environment. The virtual scene may be any one of a 2D virtual scene, a 2.5D virtual scene, or a 3D virtual scene, but the embodiment of the present invention does not limit the dimension of the virtual scene. For example, the virtual scene may include sky, land, ocean, etc., and the land may include environmental elements such as desert, city, etc. A user can control virtual objects to move within the virtual scene.
[0017] Virtual object: refers to an active object in a virtual scene. The active object may be a person, an animal, a plant, a drum, a wall, a stone, etc., a virtual person, a virtual animal, an animated person, etc., displayed in the virtual scene. The virtual object may be a virtual image representing a user in the virtual scene. A virtual scene includes multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.
[0018] Exemplarily, the virtual object may be a user character controlled by an operation on a client, an artificial intelligence (AI) set in a virtual scene battle through training, or a non-player character (NPC) set in a virtual scene. Exemplarily, the virtual object is a virtual person competing in a virtual scene. Exemplarily, the number of virtual objects participating in an interaction in the virtual scene may be set in advance, or may be dynamically determined according to the number of clients participating in the interaction.
[0019] Taking a shooting game as an example, a user can control a virtual object to free fall, glide, or open a parachute and fall in the air in the virtual scene, run, jump, crawl, or bend forward on land, and can also control a virtual object to swim, float, or dive in the ocean. Of course, a user can control a virtual object to ride a virtual vehicle and move in the virtual scene, for example, the virtual vehicle may be a virtual car, a virtual airplane, a virtual yacht, etc., and only the above scenes are described as examples here, and the embodiment of the present invention does not specifically limit this. A user can control a virtual object to interact with other virtual objects in a manner such as fighting using an interaction item, and for example, the interaction item may be a throwing type interaction item such as a grenade, a cluster mine, or a sticky grenade (also referred to as a sticky lightning), or a shooting type interaction item such as a machine gun, a pistol, or a rifle, and the present invention does not specifically limit the type of the interaction item. It should be noted that the shooting-type interaction items such as the machine gun, pistol, and rifle described above are all in-game items.
[0020] FIG. 1 is a schematic diagram of an implementation environment of a virtual scene-based beam display method provided by an embodiment of the present invention. Referring to FIG. 1, the implementation environment includes: a terminal 110 and a server 140 .
[0021] The terminal 110 is installed with and executes an application program that supports display of a virtual scene. Exemplarily, the application program is any one of a first-person shooter game (FPS), a third-person shooter game, a virtual reality application program, a three-dimensional map program, or a multiplayer mechanical survival game. The terminal 110 is a terminal used by a user, and the user uses the terminal 110 to manipulate a target virtual object located in a virtual scene to perform an activity, the activity being at least one of adjusting a body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. Exemplarily, the target virtual object is a virtual person such as a simulation human character or an animation human character.
[0022] The server 140 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, and the embodiment of the present invention does not limit the number and type of the servers. The server 140 provides background services for application programs running on the terminal 110, and the terminal 110 is connected to the server 140 via a wireless network or a wired network.
[0023] After describing the implementation environment of the embodiment of the present invention, the application scenario of the embodiment of the present invention will be described below. In the following description, the terminal is the terminal 110 in the above implementation environment, and the server is the above server 140.
[0024] The technical solution provided by the embodiments of the present invention is applicable to a shooting game scene, in which a terminal displays a virtual scene, the virtual scene includes a target virtual object, and a user can control the movement and attack of the target virtual object in the virtual scene through the terminal. In some embodiments, the target virtual object can hold a virtual item launcher to realize an attack on another virtual object in the virtual scene through the virtual item launcher. During the game, a user can control the virtual item launcher held by the target virtual object to aim at a virtual object to be attacked, thereby launching an attack on the virtual object. In some embodiments, the terminal displays a sight of the virtual item launcher in the virtual scene, the sight is used to indicate the aiming position of the virtual item launcher in the virtual scene, and a user can adjust the position of the sight to realize the purpose of controlling the virtual item launcher to aim. In some cases, due to the complexity of the virtual scene and the relatively complex display content, the user may not be able to accurately detect the position of the sight, which increases the difficulty of aiming the virtual item launcher and reduces the efficiency of human-computer interaction. In addition, due to the small area and light color of the sight, the user needs to repeatedly debug the virtual item launcher in order to effectively aim the target, which results in the user's playing time and game time being too long, which wastes the power resources of the terminal and affects the terminal's cruising capacity.
[0025] After adopting the technical solution provided by the embodiment of the present invention, a user can add a virtual beam projector for a virtual item projector, which can assist the virtual item projector in aiming, reduce the difficulty of aiming the virtual item projector, and improve the efficiency of human-computer interaction, so that the user can effectively aim at the target without the need for repeated debugging, thereby shortening the match time and game time, saving the power resources of the terminal, and improving the terminal's endurance. In addition, the user can also select the assembly position of the virtual beam projector on the virtual item projector by himself, and regardless of which position the virtual beam projector is assembled on the virtual item projector, all the virtual beam projectors can send beams to the aiming position of the virtual item projector, which can improve the realism of the game, enrich the user's game choices, and improve the efficiency of human-computer interaction.
[0026] It should be noted that although the above description takes as an example the application of the technical solution provided by the embodiments of the present invention to a shooting game scene, in other possible embodiments, the technical solution provided by the embodiments of the present invention can also be applied to other types of games that require aiming, and the embodiments of the present invention are not limited thereto.
[0027] It should be noted that the above description has been given using an example of the virtual scene-based beam display method provided by the embodiment of the present invention being executed by a terminal. If the above shooting game is a cloud game, the virtual scene-based beam display method provided by the embodiment of the present invention may be executed by a server, i.e., the server may perform a background processing process to generate a video stream, push the video stream to the terminal, and the terminal may display it. The embodiment of the present invention is not limited thereto.
[0028] In order to more clearly explain the technical solution provided by the embodiment of the present invention, the following describes the virtual scene of the present invention, and referring to Fig. 2, in order to make the shooting game more realistic, the game designer refers to the manner in which humans observe the real world to design the display manner of the virtual scene. A first virtual object 201 can observe the virtual scene in an area 202, and the screen obtained by observing the area 202 at the angle of the first virtual object 201 is the displayed virtual scene. A user can adjust the position where the first virtual object 201 observes the virtual scene by adjusting the orientation of the first virtual object 201.
[0029] In some embodiments, the virtual scene includes controls for controlling the target virtual object to perform different operations. Referring to FIG. 3, a virtual joystick 302, a posture adjustment control 303, and a shooting control 304 are displayed in the virtual scene 301, where the virtual joystick 302 is used to control the movement direction of the target virtual object. The posture adjustment control 303 is used to adjust the posture of the target virtual object, for example, to control the virtual object to perform an operation such as crouching or crawling. The shooting control 304 is used to control a virtual item launcher held by the target virtual object to launch a virtual item, where in some embodiments, the virtual item launcher is a virtual instrument in the game, and the virtual item is a virtual ammunition in the game. 305 is called a small map or a virtual map, and a user can observe the positions of allies and enemies in the virtual scene through the small map 305.
[0030] After describing the implementation environment and application scenario of the embodiment of the present invention, the virtual scene-based beam display method provided by the embodiment of the present invention will be described below, which may be executed by the terminal 110 alone, or may be executed by the terminal 110 in cooperation with the server 140. Referring to Fig. 4, the method will be described by taking the method executed by the terminal 110 shown in Fig. 1 as an example, and the method includes the following steps 401 to 403.
[0031] In step 401, a terminal displays a virtual scene, in which a target virtual object and a virtual item launcher held by the target virtual object are displayed.
[0032] Here, the virtual scene is an activity scene of a virtual object, and the virtual scene is a simulation of the real world, and in some embodiments, the virtual scene is also called a game scene. The target virtual object is a virtual object controlled by a terminal, and a user controls the target virtual object through the terminal so that the target virtual object can perform an interaction in the virtual scene. The virtual item launcher is a game item provided by a game, and the virtual item launcher can launch a virtual item in the virtual scene, thereby realizing an attack on the virtual object, and here, the virtual item launcher is also a virtual instrument in the game, and the virtual item launched from the virtual item launcher is also a virtual ammunition in the game.
[0033] In step 402, in response to an assembly operation of the virtual item launcher in the virtual scene, the terminal displays an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, and the virtual beam launcher is used to assist in aiming the virtual item launcher.
[0034] Here, the assembly operation for the virtual item launcher refers to an operation of selecting an assembly position on the virtual item launcher for a virtual beam launcher. The virtual beam launcher can emit a beam in a virtual scene, and the beam serves to assist the virtual item launcher in aiming, for example, the virtual beam launcher can be a virtual laser indicator. In the embodiment of the present invention, the assembly position of the virtual beam launcher on the virtual item launcher is determined by the user, that is, in the embodiment of the present invention, a plurality of assembly forms between the virtual beam launcher and the virtual item launcher are provided, providing the user with a rich assembly manner.
[0035] In step 403, the terminal displays a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher and the target assembly position, and the beam is directed toward the aiming position of the virtual item launcher.
[0036] Here, the beam emitted from the virtual beam emitter is directed to the target position of the virtual item emitter, which means that the user can know the target position of the virtual item emitter just by looking at the direction of the beam, which makes it easier for the user to control the aim of the virtual item emitter, and the efficiency of human-computer interaction is high. The user can effectively aim at the target without having to adjust the posture or position of the target virtual object and perform repeated debugging, thereby shortening the battle time and game time and improving the cruising time of the terminal.
[0037] According to the technical solution provided by the embodiment of the present invention, the virtual scene provides a function of assembling a virtual beam emitter, and the user can select the assembly position by himself during assembly. During aiming, a beam is displayed based on the assembly positions of the target virtual object, the virtual item emitter, and the virtual beam emitter, so that the beam can be directed to the aiming position of the virtual item emitter, and the beam can assist the user in aiming, thereby reducing the difficulty of aiming and improving the efficiency of human-computer interaction.
[0038] The above steps 401-403 are a brief description of the virtual scene-based beam display method provided by the embodiments of the present invention, and the following will be combined with some examples to further describe the technical solutions provided by the embodiments of the present invention. The method may be performed by the terminal 110 alone, or may be performed by the terminal 110 in cooperation with the server 140. Referring to FIG. 5, the method is described by taking the method performed by the terminal 110 as an example, and the method includes steps 501-504.
[0039] In step 501, a terminal displays a virtual scene, in which a target virtual object and a virtual item launcher held by the target virtual object are displayed.
[0040] In some embodiments, the virtual scene is a game scene of a shooting game, the target virtual object is a virtual object controlled by a terminal, and the user can control the movement of the target virtual object in the virtual scene, use items, drive a virtual vehicle, and perform other activities by the terminal. The virtual item launcher is a game item provided in the shooting game, and the virtual item launcher can launch a virtual item in the virtual scene, and the virtual item launched from the virtual item launcher can attack the virtual object in the virtual scene. When a virtual object in a virtual scene is hit by a virtual item, an attribute value of the virtual object is reduced, where the amount of reduction in the attribute value of the virtual item is related to at least one of the type of the virtual item, the position where the virtual item is hit, and the equipped virtual armor. When the attribute value of the virtual object is reduced to a target value, the virtual object is defeated. In some embodiments, the attribute value is called a lifetime value of the virtual object, and when the target value is 0, i.e., the lifetime value of the virtual object is reduced to 0, the virtual object is defeated.
[0041] In one possible embodiment, in response to a user initiating a competitive match, the terminal displays a virtual scene corresponding to the competitive match and displays a target virtual object in the virtual scene, where the competitive match is a shooting game, the virtual scene displayed by the terminal is a portion of the virtual scene, the target virtual object is displayed in the center of the virtual scene displayed by the terminal, the virtual scene displayed by the terminal moves with the movement of the target virtual object, and the target virtual object holds a virtual item launcher. In some embodiments, the target virtual object adopts at least two postures to hold the virtual item launcher, the first posture is to place the virtual item launcher on the waist of the target virtual object, and such posture is also called "hip fire", and the second posture is to place the virtual item launcher on the shoulder of the target virtual object, and such posture is also called "ADS (Aiming Down Sight)", that is, a posture to aim using the sight of the virtual item launcher, and the transition from the "hip fire" posture to the "ADS" posture is also called start shooting. In some embodiments, the virtual scene displayed by the terminal is also referred to as the viewing range of the target virtual object. In this case, if another virtual object enters the viewing range of the target virtual object, the terminal can display the other virtual object.
[0042] The following describes the above embodiment with two examples.
[0043] Example 1: In response to a click operation on a target icon, a terminal launches a target application program, where the target icon is an icon corresponding to the target application program, and the target application program is an application program for the competitive match. The terminal loads resources related to the target application program and displays a main interface of the target application program. In response to an operation on the main interface, a competitive match is started, and the terminal loads rendering resources of a virtual scene to display a virtual scene corresponding to the competitive match, where a target virtual object and a virtual item launcher held by the target virtual object are displayed in the virtual scene. In some embodiments, a user can autonomously switch the virtual item launcher held by the target virtual object during a game, and autonomously switch the posture in which the target virtual object holds the virtual item launcher. In this case, the rendering and display of the virtual scene are both performed by the terminal.
[0044] Example 2: In response to a click operation on a target icon, the terminal sends an application program launch request to the server, where the target icon is an icon corresponding to a target application program, where the target application program is an application program of the competitive match, and where the application program launch request carries an identifier of the target application program. In response to receiving the application program launch request, the server obtains an identifier of the target application program from the application program launch request, and launches the target application program based on the identifier of the target application program. The server persistently pushes a video stream of the target application program to the terminal, and the terminal displays the video stream. In response to an operation based on the video stream, the terminal sends a competitive match start request to the server, where the server receives the competitive match start request, and loads a rendering resource of a virtual scene based on the competitive match start request, and generates a virtual scene corresponding to the competitive match. The server pushes a video stream corresponding to the competitive match to the terminal, and the terminal displays a virtual scene corresponding to the competitive match, where a target virtual object and a virtual item launcher held by the target virtual object are displayed in the virtual scene. In this case, the rendering of the virtual scene is performed by the server and the display of the virtual scene is performed by the terminal, and the shooting game is a cloud game.
[0045] In step 502, in response to an assembly operation of the virtual item launcher in the virtual scene, the terminal displays an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, and the virtual beam launcher is used to assist in aiming the virtual item launcher.
[0046] Here, the virtual beam emitter is a game item provided in a shooting game, and in the shooting game, the virtual beam emitter is also called a laser indicator or abbreviated as "LI". In some embodiments, the virtual beam emitter has multiple types, and different types of virtual beam emitters have different performance parameters. For example, different types of virtual beam emitters may have different external shapes, or different types of virtual beam emitters may transmit beams of different colors. The virtual beam emitter can be assembled to a virtual item emitter and assist the virtual item by emitting a beam, that is, after the virtual beam emitter is assembled to the virtual item emitter, it can emit a beam directed to the aiming position of the virtual item emitter in the virtual scene, and the user can determine the current aiming position of the virtual item emitter by viewing the beam, thereby facilitating the user's aiming. In some embodiments, the beam emitted from the virtual beam emitter is realized by a particle effect. The target assembly position is determined based on the assembly operation, i.e., the user can select the assembly position of the virtual beam launcher on the virtual item launcher by himself, thereby realizing the personal assembly of the virtual item launcher and providing the user with a richer way of playing. Furthermore, in some embodiments, in a shooting game, the virtual item launcher is provided with multiple accessories, and different types of accessories can provide different functions for the virtual item launcher, and the virtual beam launcher is also one of the accessories of the virtual item launcher. The assembly positions of the multiple accessories of the virtual item launcher can be freely determined by the user, and the assembly positions of each accessory can be adjusted, i.e., the user can adjust the assembly position of the virtual beam launcher on the virtual item launcher at any time during the game.
[0047] For example, referring to FIG. 6 , the terminal displays a virtual scene 600 in which a virtual item launcher 601 is displayed, and a virtual beam launcher 602 is constructed on the virtual item launcher 601, and the virtual beam launcher 602 launches a beam 603 within the virtual scene.
[0048] In one possible embodiment, in response to a first operation on the virtual scene, the terminal displays an assembly page for the virtual item launcher in the virtual scene, where a plurality of candidate assembly positions for the virtual item launcher are displayed on the assembly page. In response to a second operation on the assembly page, the terminal determines a selected candidate assembly position from the plurality of candidate assembly positions as the target assembly position. The terminal displays the virtual beam launcher at the target assembly position for the virtual item launcher.
[0049] Wherein, an assembly page of the virtual item launcher is used to assemble an accessory on the virtual item launcher, a plurality of candidate assembly positions provided on the assembly page are positions provided for assembling the accessory on the virtual item launcher, and the assembly page provides a function of assembly position selection to a user. In some embodiments, the assembly page further provides an accessory selection area, the accessory selection area including a plurality of accessories owned by a target virtual object, and a user can select an accessory to be assembled on the virtual item launcher from the accessory selection area, and the accessory selection area is also referred to as a virtual backpack of the target virtual object.
[0050] In this embodiment, on the one hand, a method of aiming by a virtual beam projector is provided, which can enhance the reality of the game compared with the related art method of aiming by a sight. Furthermore, the emitted virtual beam helps the user to aim at the target with the virtual item projector, and the user can effectively aim at the target without repeated debugging, thereby shortening the user's match time and game time and improving the terminal's survivability. On the other hand, a plurality of candidate assembly positions for the virtual beam projector are provided on the virtual item projector, and the user can select the target assembly position from the plurality of candidate assembly positions by himself, which improves the flexibility of the assembly of the virtual beam projector.
[0051] Self-selection of the target assembly position from among a plurality of candidate assembly positions provides at least the following advantages.
[0052] First, it is adapted to the user's usage habits; for example, some users are accustomed to assembling the virtual beam launcher to the right side of the virtual item launcher, while other users are accustomed to assembling the virtual beam launcher to the left side of the virtual item launcher, and the multiple candidate assembly positions provided can also be adapted to the different usage habits of users at the same time.
[0053] Secondly, since different virtual item launchers may have different sizes and shapes, different virtual beam launchers may also have different sizes and shapes, and there may be a situation where the view is obstructed when the virtual beam launcher is assembled at a certain position on the virtual item launcher. If multiple possible assembly positions are provided, the user can timely adjust the assembly position of the virtual beam launcher when the view is obstructed, thereby resolving the situation where the view is obstructed.
[0054] In order to describe the above embodiment more clearly, the following describes the above embodiment in three parts.
[0055] First part: In response to a first operation in the virtual scene, the terminal displays a building page for the virtual item launcher in the virtual scene.
[0056] 7 provides a schematic diagram of an assembly page for the virtual item launcher. Referring to FIG. 7, the assembly page 700 provides a number of possible assembly positions corresponding to different parts of the virtual item launcher. In some embodiments, the assembly page further displays the virtual item launcher, allowing the user to easily know which virtual item launcher the virtual beam launcher is currently being assembled for.
[0057] In one possible embodiment, in response to a pick-up operation on the virtual beam projector in the virtual scene, the terminal displays a build page for the virtual item projector in the virtual scene, where a first operation in the virtual scene is a pick-up operation on the virtual beam projector in the virtual scene.
[0058] Here, the pick-up operation in the virtual scene is an operation of controlling a target virtual object to pick up a virtual beam emitter in the virtual scene. In some embodiments, the virtual beam emitter in the virtual scene is a virtual beam emitter randomly dropped in the virtual scene or a virtual beam emitter dropped after a virtual object is defeated in the virtual scene, although embodiments of the present invention are not limited thereto.
[0059] In such an embodiment, when a target virtual object picks up a virtual beam emitter in the virtual scene, the terminal can display an assembly page for the virtual item emitter, and through the assembly page, provide the user with an assembly selection position for assembling the picked up virtual beam emitter, which is highly efficient.
[0060] For example, in response to approaching the position of the virtual beam projector of a target virtual object in a virtual scene, the terminal displays a pickup control for the virtual beam projector, where the position of the target virtual object in the virtual scene is controlled by the user, i.e., when the user sees the virtual beam projector in the virtual scene, the user can control the movement of the target virtual object to the position of the virtual beam projector, thereby controlling the target virtual object to pick up the virtual beam projector. In response to a click operation of the pickup control, the target virtual object picks up the virtual beam projector and displays an assembly page for the virtual item projector, where the target virtual object picking up the virtual beam projector is to store the virtual beam projector in the virtual backpack of the target virtual object. Alternatively, in response to the proximity of a target virtual object in a virtual scene to the position of the virtual beam emitter, the terminal controls the target virtual object to pick up the virtual beam emitter, i.e., when the user controls the target virtual object to approach the virtual beam emitter, the terminal can automatically control the target virtual object to pick up the virtual beam emitter without the need for manual control by the user, and the efficiency of human-computer interaction is high. In response to the target virtual object picking up the virtual beam emitter, the terminal displays an assembly page for the virtual item emitter, and the user can select an assembly position for the picked-up virtual beam emitter via the assembly page.
[0061] In one possible embodiment, in response to a click on a build control displayed in the virtual scene, the terminal displays a build page for the virtual item launcher in the virtual scene.
[0062] Here, the assembly control is a function control that triggers the display of the assembly page, and the form and display position of the assembly control are set by the engineer according to the actual situation, and the embodiment of the present invention is not limited thereto. In this case, the first operation in the virtual scene is a click operation on the assembly control in the virtual scene.
[0063] In such an embodiment, when a user wants to view the build page for the virtual item launcher, he or she can directly click on the build control, resulting in high efficiency of human-computer interaction.
[0064] For example, referring to FIG. 6 and FIG. 7, a virtual scene 600 displays an assembly control 604, and in response to a click operation on the assembly control 604, the terminal displays an assembly page 700 for the virtual item launcher in the virtual scene.
[0065] Second part: In response to a second operation on the assembly page, the terminal determines a selected candidate assembly position from the plurality of candidate assembly positions as the target assembly position.
[0066] Here, the target assembly position is the assembly position of the virtual beam launcher on the virtual item launcher.
[0067] In one possible embodiment, in response to a click operation on any one of the plurality of candidate assembly positions on the assembly page, the terminal determines the candidate assembly position as the target assembly position.
[0068] In this case, the second operation in the virtual scene is a click operation on any one of the plurality of candidate assembly positions.
[0069] In such an embodiment, the user can quickly select the target assembly position by clicking, and the efficiency of human-computer interaction is high.
[0070] For example, referring to FIG. 7, in response to a click operation on any one of the candidate assembly positions 701 on the assembly page 700, the terminal determines the candidate assembly position 701 as the target assembly position.
[0071] In one possible embodiment, in response to dragging the virtual beam emitter to any one of the plurality of candidate assembly positions within the assembly page, the terminal determines the candidate assembly position as the target assembly position.
[0072] In such an embodiment, a user can select an assembly position for a virtual beam emitter by dragging, and at the same time, the drag operation can also indicate the virtual beam emitter that currently has the selected assembly position, reducing the probability of selection error.
[0073] For example, referring to FIG. 7, in response to the virtual beam emitter being dragged to any one of the plurality of candidate assembly positions 701, the terminal determines the candidate assembly position 701 as the target assembly position.
[0074] Third part: the terminal displays the virtual beam projector at the target assembly position of the virtual item projector.
[0075] In one possible embodiment, the terminal renders a model of the virtual beam projector at the target construction location based on the target construction location and a model of the virtual item projector.
[0076] Note that the above step 502 is explained using an example in which a terminal executes a corresponding step based on an operation. In a cloud gaming scene, the terminal transmits a corresponding command to a server based on the operation, the server executes the step corresponding to the command, and transmits a rendered video stream to the terminal, which can then display the video stream.
[0077] In step 503, the terminal determines an emission direction of the beam based on positioning information of the target virtual object in the virtual scene, a type of the virtual item launcher and the target assembly position, where the emission direction of the beam is the emission direction relative to the virtual item launcher.
[0078] In one possible embodiment, the terminal determines a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position, the first positioning information including a hand position and a pointing direction of the target virtual object in the virtual scene, and determines a firing direction of the beam based on the first positioning information, second positioning information of the target virtual object, a type of the virtual item emitter, the hand position, and the target position, the second positioning information including a position and an orientation of a virtual camera of the target virtual object in the virtual scene.
[0079] Here, since the virtual beam emitter includes a plurality of candidate assembly positions, when the virtual beam emitter is assembled in different candidate positions, the direction in which the virtual beam emitter emits the beam may be different, and the terminal may determine the beam emission direction based on a plurality of pieces of information to ensure that the beam is directed to the target position of the virtual item emitter. The virtual camera is the "eye" through which the user observes the virtual scene, and the virtual scene displayed by the terminal is the screen photographed by the virtual camera. In a first-person shooter game, the position of the virtual camera in the virtual scene is the head position of a target virtual object in the virtual scene, simulating the angle at which the target virtual object observes the virtual scene. Or, the position of the virtual camera in the virtual scene is the eye position of the target virtual object in the virtual scene. In a third-person shooter game, the position of the virtual camera in the virtual scene is above the target virtual object.
[0080] In order to describe the above embodiment more clearly, the following describes the above embodiment in two parts.
[0081] First part: the terminal determines a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position.
[0082] Here, the first positioning information includes a hand position and a pointing direction of a target virtual object in a virtual scene, and the hand position in the virtual scene is a relative position between the hand and the origin of the model of the target virtual object. Correspondingly, the hand pointing direction in the virtual scene is a relative pointing direction between the hand and the origin of the model of the target virtual object. The target assembly position is a relative position between the virtual beam emitter and the virtual item emitter, and the target position is a relative position between the virtual beam emitter and the origin of the model of the target virtual object. In some embodiments, the origin of the model of the target virtual object is also called a root bone, and the coordinate system established at the root bone is also called a person space. In some embodiments, the terminal adopts a form of coordinates to display the hand position in the virtual scene, and adopts a form of vectors to display the hand pointing direction in the virtual scene. In some embodiments, the coordinate system established at the origin of the virtual item emitter is also called an instrument space. Through the above first part of the processing process, the target position between the virtual beam and the root bone can be determined, and the transformation of the coordinate system is realized, which facilitates subsequent processing.
[0083] In one possible embodiment, the terminal generates a first rotation matrix based on the hand pointing direction. The terminal processes the target assembly position by employing the first rotation matrix to obtain a reference position of the virtual beam emitter. The terminal fuses the hand position and the reference position of the virtual beam emitter to obtain a target position of the virtual beam emitter, where the target position is a relative position of the virtual beam emitter and the target virtual object.
[0084] Here, the relative position of the virtual beam launcher and the target virtual object is the relative position of the virtual beam launcher and the origin of the model of the target virtual object. When the target virtual object holds the virtual item launcher, the orientation of the hand of the target virtual object is the orientation of the virtual item launcher in the virtual scene.
[0085] For example, a terminal acquires a gripping screen of a target virtual object for the virtual item launcher. The terminal acquires first positioning information of the target virtual object in the virtual scene based on the gripping screen, i.e., acquires hand coordinates and a direction vector of the target virtual object. The terminal generates a first rotation matrix based on the direction vector of the hand. The terminal employs the first rotation matrix to process the target assembly coordinates to acquire reference coordinates of the virtual beam launcher, where the target assembly coordinates represent a target assembly position and the reference coordinates represent a reference position. The terminal adds the hand coordinates and the reference coordinates of the virtual beam launcher to acquire target coordinates of the virtual beam launcher, where the target coordinates represent a target position.
[0086] For example, the terminal acquires the holding screen of the virtual item launcher by the following equation (1), acquires the hand position of the target virtual object based on the holding screen of the virtual item launcher by the following equation (2), and acquires the hand pointing direction of the target virtual object based on the holding screen of the virtual item launcher by the following equation (3), and the hand position and pointing direction of the target virtual object are expressed by the following equation (4).
[0087] GripAnim=GetGripAnim(CurrentWeapon) (1) HandLoc=GripAnim.GetBoneLoc(“Hand”) (2) HandRot=GripAnim.GetBoneRot(“Hand”) (3) (“Hand”, Loc=(X=28.7, Y=15.6, Z=133.0), Rot=(Roll=0, Yaw=2, Pitch=0)) (4) Here, GripAnim is the gripping screen of the virtual item launcher, CurrentWeapon is the virtual item launcher, Hand is the hand of the target virtual object, Loc=() is the coordinates of the hand, Rot is the pointing direction of the hand, Roll is the rolling angle indicating the rotation angle around the Z axis, Yaw is the yawing angle indicating the rotation angle around the Y axis, and Pitch is the pitch angle indicating the rotation angle around the X axis.
[0088] The terminal obtains the target coordinates of the virtual beam emitter according to the following equation (5).
[0089] LaserLoc=HandLoc+HandRotInverseTransformVector(LaserLoc_WeaponSpace) (5) where LaserLoc is the target coordinates of the virtual beam launcher, HandLoc is the hand position in the virtual scene, HandRotInverseTransformVector is a first rotation matrix, LaserLoc_WeaponSpace is the target assembly coordinates, WeaponSpace represents the space in which the virtual item launcher is located, and HandRot InverseTransformVector The result of (LaserLoc_WeaponSpace) is the reference coordinate of the virtual beam emitter.
[0090] The application method of the above formula (5) will be described below as an example, with reference to the following calculation process.
[0091] LaserLoc(68.4,12.3,143.6)=(28.7,15.6,133.0)+(Roll=0,Yaw=2,Pitch=0) InverseTransformVector(39.6,-3.3,10.6), (68.4,12.3,143.6) are the three-dimensional coordinates of the target assembly position in the root bone coordinate system, in centimeters, and InverseTransformVecto acts to rotate this vector of (39.6,-3.3,10.6) -2 degrees around the Yaw direction, so that (39.6,-3.3,10.6) is the relative coordinate between the target assembly position and the virtual item launcher.
[0092] Second part: The terminal determines a firing direction of the beam based on the first positioning information, the second positioning information of the target virtual object, the type of the virtual item launcher, the position of the hand, and the target position.
[0093] In one possible embodiment, the terminal determines a target launch distance of the virtual item launcher based on a type of the virtual item launcher. The terminal determines a reference aim position of the virtual item launcher based on second positioning information of the target virtual object and the target launch distance. The terminal determines a launch direction vector of the beam based on the target position, the reference aim position of the virtual item launcher and the first positioning information.
[0094] To more clearly explain the above embodiments, the following describes the concept of target launch distance.
[0095] In some embodiments, the target firing distance, also called the zeroing distance, refers to the distance where the light spot and the sight exactly coincide, and the light spot refers to the point displayed when the beam and the virtual obstacle in the virtual scene come into contact. If the zeroing distance is 10 meters, referring to FIG. 8, when the distance from the sight to the virtual camera is 10 meters, the light spot 801 exactly coincides with the sight 802; referring to FIG. 9, when the distance from the sight to the virtual camera is less than the zeroing distance, the light spot 901 is located at the lower right of the sight 902; referring to FIG. 10, when the distance from the sight to the virtual camera is greater than the zeroing distance, the light spot 1001 is located at the upper left of the sight 1002. Referring to FIG. 11, this is because the angle between the beam 1101 and the virtual beam emitter 1102 is fixed and does not change according to the change in the distance between the sight and the camera, otherwise the beam emitted from the virtual beam emitter will lack realism. In some embodiments, the zeroing distance is often the optimal operating distance of the virtual item launcher, and the zeroing distance is related to the type of the virtual item launcher, for example, the zeroing distance of the MP5 virtual submachine gun is 30 meters, and the zeroing distance of the AKM virtual assault rifle is 80 meters, where the MP5 virtual submachine gun and the AKM virtual assault rifle are both game items in the game. It should be noted that after adopting the technical solution provided by the embodiment of the present invention, in the case shown in the above Figures 9 and 10, the beam emitted from the virtual beam launcher also coincides with the sight, thereby realizing the assistance for the aim of the virtual item launcher. In some embodiments, the sight is a point in the middle of the screen, and the virtual item is located near the sight during hip fire, and the direction of the sight is a point on a straight line extending forward from the midpoint of the virtual camera.
[0096] In such an embodiment, different types of virtual item launchers have different target launch distances, i.e., different types of virtual item launchers have different optimal operation distances. For different types of virtual item launchers, the beam launch directions determined by adopting the above embodiment are all directed to the sight of the virtual item launcher, i.e., directed to the aiming position of the virtual item launcher, thereby improving the aiming accuracy of the virtual item launcher. Furthermore, although the virtual beam launcher has multiple assembly positions on the virtual item launcher, the process of determining the beam launch direction is combined with the assembly positions of the virtual beam launcher, so that no matter where the virtual beam launcher is assembled on the virtual item launcher, the determined beam launch direction can all be directed to the sight of the virtual item launcher.
[0097] After describing the target launch distance, the following describes the above embodiment.
[0098] For example, the terminal performs a query based on the type of the virtual item launcher to obtain a target launch distance of the virtual item launcher. The terminal obtains second positioning information of the target virtual object in the virtual scene based on a gripping screen of the target virtual object relative to the virtual item launcher. The second positioning information includes a position and an orientation of the virtual camera in the virtual scene, and the terminal generates a second rotation matrix based on the orientation of the virtual camera in the virtual scene. The terminal processes the target launch distance based on the second rotation matrix and the position of the virtual camera in the virtual scene to obtain a reference aim position of the virtual item launcher, where the reference aim position is a position where a beam is pointed in the virtual scene. The terminal determines a reference launch direction vector of the beam based on the target position and the reference aim position of the virtual item launcher, and the reference launch direction vector is a vector in a space established based on the target virtual object. The terminal rotates the reference firing direction based on the pointing direction of the hand to obtain a firing direction vector of the beam, the firing direction vector being a vector in a space established based on the virtual item launcher.
[0099] For example, the terminal queries in a target launch distance list based on the type of the virtual item launcher to obtain a target launch distance of the virtual item launcher, where the target launch distance list stores a correspondence between the type of virtual item launcher and the target launch distance. The terminal obtains the coordinates of a virtual camera in a virtual scene based on a holding screen of a target virtual object for the virtual item launcher according to the following formula (6), and obtains the orientation of the virtual camera in the virtual scene according to the following formula (7). The terminal generates a second rotation matrix based on the orientation of the virtual camera in the virtual scene. The terminal processes the target launch distance by adopting the second rotation matrix and the position of the virtual camera in the virtual scene according to the following formula (8), to obtain a reference aim position of the virtual item launcher. The terminal determines a reference launch direction vector of the beam based on the target position and the reference aim position of the virtual item launcher according to the following formula (9), where the reference launch direction vector is a vector in a space established based on the target virtual object. The terminal rotates the reference firing direction vector based on the pointing direction of the hand according to the following equation (10) to obtain a firing direction vector of the beam, where the firing direction vector is a vector in a space established based on the virtual item launcher.
[0100] CameraLoc=GripAnim.GetBoneLoc(“Camera”) (6) CameraRot=GripAnim.GetBoneRot(“Camera”) (7) ZeroingPoint=CameraLoc + CameraRotGetForwardVector * ZeroingDistance (8) BeamDirection=(ZeroingPoint ― LaserLoc).GetNormal (9) BeamDirection_WeaponSpace=HandRotTransformVector(BeamDirection) (10) where CameraLoc is the position of the virtual camera in the virtual scene, CameraRot is the orientation of the virtual camera in the virtual scene, ZeroingPoint is the reference aim position, ZeroingDistance is the target firing distance, CameraRotGetForwardVector is a second rotation matrix, BeamDirection is the reference firing direction vector, LaserLoc is the target position of the virtual beam emitter, GetNormal is used to obtain a unit vector of the vector, BeamDirection_WeaponSpace is the firing direction vector of the beam, and HandRotTransformVector is a third rotation matrix generated based on the hand pointing direction, and in some embodiments the first rotation matrix and the third rotation matrix are inverse matrices of each other.
[0101] The above step 503 will now be described with reference to FIG. 12 and the above alternative embodiments.
[0102] Referring to FIG. 12, the terminal acquires a grip screen GripAnim of a target virtual object for the virtual item launcher. The terminal acquires a hand position HandLoc and a direction HandRot of the target virtual object based on the grip screen GripAnim. The terminal acquires a virtual camera position CameraLoc and a direction CameraRot based on the grip screen GripAnim. The terminal acquires a zeroing distance ZeroingDistance of the virtual item launcher based on the type of the virtual item launcher, that is, acquires a target launch distance of the virtual item launcher. The terminal acquires a target assembly position LaserLoc_WeaponSpace of the virtual beam launcher, and determines a target position LaserLoc of the virtual beam launcher based on the target assembly position. The terminal determines a reference launch direction vector BeamDirection of the beam based on the target position and the reference aim position of the virtual item launcher. The terminal rotates the reference firing direction vector BeamDirection based on the pointing direction of the hand to obtain the firing direction vector BeamDirection_WeaponSpace of the beam.
[0103] Note that the above steps 501 to 503 are described as being executed by the terminal in real time. In other possible embodiments, the terminal may execute the above steps 501 to 503 in advance before the game starts, and store the processing results for direct calling during the game, and the embodiment of the present invention is not limited by the execution timing.
[0104] In step 504, the terminal controls the virtual beam emitter to emit the beam in the emission direction.
[0105] In one possible embodiment, the terminal renders and displays the beam within the virtual scene based on the position of the virtual beam emitter and the emission direction.
[0106] After step 504, the terminal may further perform any of the following steps, illustratively:
[0107] In one possible embodiment, when the aim position of the virtual item launcher is a virtual obstacle in the virtual scene, the terminal displays a light spot on the virtual obstacle, the light spot being the intersection point between the beam emitted from the virtual beam launcher and the virtual obstacle.
[0108] Here, the virtual obstacles include obstacles such as virtual walls, virtual stones, virtual trees, etc., and in some embodiments, when the aiming position of the virtual item launcher is at any virtual object in the virtual scene, the terminal displays the light spot on the virtual object.
[0109] In such an embodiment, the terminal can indicate the aiming position of the virtual item launcher by displaying a light spot, which plays an auxiliary role in helping the user control the aim of the virtual item launcher.
[0110] For example, referring to FIG. 8, when the aiming position of the virtual item launcher is a virtual obstacle 803 in the virtual scene, the terminal displays a light spot 801 on the virtual obstacle 803 .
[0111] In one possible embodiment, when the target virtual object holds the virtual item launcher in a first pose and the pose in which the target virtual object holds the virtual item launcher is adjusted from the first pose to a second pose, the terminal does not represent a beam emitted from the virtual beam launcher.
[0112] Here, the first position is "hip fire" and the second position is "ADS (Aiming Down Sight)."
[0113] In such an embodiment, when the attitude of the target virtual object changes, the terminal will no longer display the beam, allowing the user to focus on aiming in the "ADS" manner, improving the hit rate of virtual item shooting.
[0114] All the above optional technical solutions can be adopted in any combination to form optional embodiments of the present invention, which will not be further described in this specification.
[0115] The technical solution provided by the embodiment of the present invention provides a function of assembling a virtual beam emitter in a virtual scene, and allows a user to select the assembly position by himself during assembly. During aiming, a beam is displayed based on the assembly positions of a target virtual object, a virtual item emitter, and a virtual beam emitter, so that the beam can be directed to the aiming position of the virtual item emitter, and the beam can assist the user in aiming, thereby reducing the difficulty of aiming and improving the efficiency of human-computer interaction.
[0116] In the related art, the beam is directed to a point in front of the virtual item launcher regardless of the hip-fire posture. In order to optimize the artistic effect, if the angle of the gripping hand is tilted slightly upward during hip-fire, the light spot corresponding to the beam may move upward, if tilted slightly to the left, the light spot may move to the left, and so on. This often results in the position of the light spot being far away from the sight, making it impossible for the user to aim using the virtual beam launcher. After adopting the technical solution provided by the embodiment of the present invention, the angle of the beam can be adjusted according to the actual situation, so that the beam coincides with the sight at the zeroing distance. Even if the distance between the sight and the virtual camera is the zeroing distance, the sight may be located on the extension line of the beam, and even if the distance between the sight and the camera is greater than the zeroing distance, the sight may be located on the edge of the beam. In short, it is easy for the user to aim in various situations. Of course, when there are multiple possible assembly positions on the virtual item launcher and they are provided for the assembly of the virtual beam launcher, the technical solution provided by the embodiment of the present invention can still ensure that the beam is always directed to the position where the sight is located, that is, regardless of which assembly position on the virtual item launcher the virtual beam launcher is assembled to, the virtual beam launcher can still achieve accurate aiming effect, and at the same time, the multiple possible assembly positions also improve the flexibility of the virtual beam launcher and enrich the user's choices. Furthermore, in some shooting games where the sight is not set, the technical solution provided by the embodiment of the present invention can also directly realize auxiliary aiming when using the virtual item launcher.
[0117] FIG. 13 is a structural schematic diagram of a virtual scene-based beam display device provided by an embodiment of the present invention. Referring to FIG. 13, the device includes a virtual scene display module 1301, a virtual beam emitter display module 1302 and a beam display module 1303.
[0118] The virtual scene display module 1301 is configured to display a virtual scene, where the virtual scene includes a target virtual object and a virtual item launcher held by the target virtual object.
[0119] The virtual beam emitter display module 1302 is configured to display an assembled virtual beam emitter based on a target assembly position determined by an assembly operation of the virtual item launcher in the virtual scene, the virtual beam emitter being used to assist in aiming the virtual item launcher.
[0120] The beam display module 1303 is configured to display a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher.
[0121] In one possible embodiment, the virtual beam launcher display module 1302 is configured to: in response to a first operation on the virtual scene, display an assembly page for the virtual item launcher within the virtual scene, where a plurality of candidate assembly positions for the virtual item launcher are displayed on the assembly page; and in response to a second operation on the assembly page, determine a selected candidate assembly position from the plurality of candidate assembly positions as the target assembly position; and display the virtual beam launcher at the target assembly position of the virtual item launcher.
[0122] In one possible embodiment, the virtual beam emitter display module 1302 includes: displaying a build page for the virtual item launcher in the virtual scene in response to a pick-up operation of the virtual beam launcher in the virtual scene; and in response to a click operation on a build control displayed in the virtual scene, displaying a build page for the virtual item launcher in the virtual scene.
[0123] In one possible embodiment, the virtual beam emitter display module 1302 includes: In response to a click operation on any one of the plurality of candidate assembly positions on the assembly page, determining the candidate assembly position as the target assembly position; in response to dragging the virtual beam emitter on the assembly page to any one of the plurality of candidate assembly positions, determining the candidate assembly position as the target assembly position.
[0124] In one possible embodiment, the beam display module 1303 is configured to determine a firing direction of the beam based on positioning information of the target virtual object in the virtual scene, a type of the virtual item launcher and the target assembly position, where the firing direction of the beam is a firing direction relative to the virtual item launcher, and to control the virtual beam launcher to fire the beam in the firing direction.
[0125] In one possible embodiment, the beam display module 1303 is configured to: determine a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position, where the first positioning information includes a hand position and pointing direction of the target virtual object in the virtual scene; and determine a firing direction of the beam based on the first positioning information, second positioning information of the target virtual object, the type of the virtual item emitter, the hand position, and the target position, where the second positioning information includes a virtual camera position and orientation of the target virtual object in the virtual scene.
[0126] In one possible embodiment, the beam display module 1303 is configured to: generate a first rotation matrix based on a pointing direction of the hand; process the target assembly position by employing the first rotation matrix to obtain a reference position of the virtual beam emitter; and fuse the hand position and the reference position of the virtual beam emitter to obtain a target position of the virtual beam emitter, where the target position is a relative position of the virtual beam emitter and the target virtual object.
[0127] In one possible embodiment, the beam display module 1303 is configured to: determine a target launch distance of the virtual item launcher based on a type of the virtual item launcher; determine a reference aim position of the virtual item launcher based on second positioning information of the target virtual object and the target launch distance; and determine a launch direction vector of the beam based on the target position, the reference aim position of the virtual item launcher and the first positioning information.
[0128] In one possible embodiment, the beam display module 1303 is configured to: determine a reference firing direction vector of the beam based on the target position and a reference aim position of the virtual item launcher, where the reference firing direction vector is a vector in a space established based on the target virtual object; and rotate the reference firing direction based on a pointing direction of the hand to obtain a firing direction vector of the beam, where the firing direction vector is a vector in a space established based on the virtual item launcher.
[0129] In one possible embodiment, the device further comprises: The virtual item launcher includes a light spot display module configured to display a light spot on a virtual obstacle in the virtual scene when the aiming position of the virtual item launcher is a virtual obstacle in the virtual scene, the light spot being an intersection point between the beam emitted from the virtual beam launcher and the virtual obstacle.
[0130] In one possible embodiment, the beam display module 1303 further does not display the beam emitted from the virtual beam emitter when the target virtual object adjusts the pose in which it holds the virtual item emitter from the first pose to a second pose.
[0131] It should be noted that, when the virtual scene-based beam display device provided by the above embodiment displays a beam, only the division of each of the above functional modules is taken as an example for description, but in actual application, the above functional allocation can be completed by different functional modules as required, that is, the internal structure of the computer device needs to be divided into different functional modules to complete all or part of the above functions. Furthermore, the virtual scene-based beam display device provided by the above embodiment has the same concept as the embodiment of the virtual scene-based beam display method, and the specific implementation process thereof is referred to the embodiment of the method, and no further reference is made herein.
[0132] In the technical solution provided by the embodiment of the present invention, the virtual scene provides a function of assembling a virtual beam emitter, and during assembly, the user can select the assembly position by himself. During aiming, a beam is displayed based on the assembly positions of the target virtual object, the virtual item emitter, and the virtual beam emitter, so that the beam is directed to the aiming position of the virtual item emitter, and the user can be assisted in aiming through the beam, thereby reducing the difficulty of aiming and improving the efficiency of human-computer interaction. The user can effectively aim at the target without repeated debugging, thereby shortening the match time and game time, saving the power resources of the terminal, and improving the cruising time of the terminal.
[0133] An embodiment of the present invention provides a computer device for performing the above method, and the computer device is realized as a terminal, and the following describes the structure of the terminal.
[0134] 14 is a structural schematic diagram of a terminal provided by an embodiment of the present invention. The terminal 1400 may be a smart phone, a tablet computer, a notebook computer or a desktop computer. The terminal 1400 may also be called a user device, a mobile terminal, a laptop terminal, a desktop terminal, or other names.
[0135] Typically, the terminal 1400 includes one or more processors 1401 and one or more memories 1402 .
[0136] The processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 1401 may include a main processor and a coprocessor, where the main processor is a processor that processes data in a wake-up state, also called a CPU (Central Processing Unit), and the coprocessor is a low-power processor that processes data in a standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), where the GPU is configured to render and draw content that needs to be displayed on a display screen. In some embodiments, the processor 1401 may include an AI (Artificial Intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
[0137] The memory 1402 may include one or more computer readable storage media, which may be non-transitory. The memory 1402 may further include high speed random access memory and non-volatile memory, such as one or more disk storage devices, flash storage devices, etc. In some embodiments, the non-transitory computer readable storage medium in the memory 1402 is configured to store at least one computer readable instruction, which is executed by the processor 1401 to realize the virtual scene-based beam display method provided by the method embodiment of the present invention.
[0138] As will be appreciated by those skilled in the art, the structure shown in FIG. 14 does not constitute a limitation on terminal 1400, which may include more or fewer components than shown, or may combine certain components, or employ different arrangements of components.
[0139] In an exemplary embodiment, a computer-readable storage medium such as a memory including computer-readable instructions is further provided, and the computer-readable instructions are executed by a processor to complete the virtual scene-based beam display method in the above embodiment. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0140] In an exemplary embodiment, a computer program product or computer program is further provided, the computer program product or computer program including computer readable instructions, the computer readable instructions being stored in a computer readable storage medium, a processor of a computing device reading the computer readable instructions from the computer readable storage medium, and the processor executing the computer readable instructions, thereby causing the computing device to perform the above-mentioned virtual scene-based beam display method.
[0141] In some embodiments, computer readable instructions according to embodiments of the present invention may be located and executed on one computer device, may be executed on multiple computer devices at one location, or may be executed on multiple computer devices distributed at multiple locations and interconnected via a communication network, and multiple computer devices distributed at multiple locations and interconnected via a communication network may constitute a blockchain system.
[0142] As can be understood by those skilled in the art, all or part of the steps for realizing the above embodiments may be completed by hardware, or may be completed by a program instructing related hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.
[0143] The above are only optional examples of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. 1. A computer device implemented method for virtual scene based beam display, comprising: displaying a virtual scene, the virtual scene displaying a target virtual object and a virtual item launcher held by the target virtual object; in response to an assembly operation of the virtual item launcher in the virtual scene, displaying an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, the virtual beam launcher being used to assist in aiming the virtual item launcher; displaying a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher; displaying an assembled virtual beam projector in response to an assembly operation of the virtual item projector in the virtual scene based on a target assembly position determined by the assembly operation, displaying a build page for the virtual item launcher within the virtual scene in response to a first operation in the virtual scene, the build page displaying a plurality of possible build positions for the virtual item launcher; determining, in response to a second operation on the assembly page, a selected candidate assembly location from among the plurality of candidate assembly locations as the target assembly location; and displaying the virtual beam projector at the target assembly location of the virtual item projector.
2. displaying a build page for the virtual item launcher within the virtual scene in response to a first operation in the virtual scene, displaying a build page for the virtual item launcher in the virtual scene in response to a pick-up operation of the virtual beam launcher in the virtual scene; displaying an assembly page for the virtual item launcher in the virtual scene in response to a click operation on an assembly control displayed in the virtual scene. The virtual scene-based beam display method according to claim 1 .
3. determining, in response to a second operation on the assembly page, a selected candidate assembly position from among the plurality of candidate assembly positions as the target assembly position, determining, in response to a click operation on any one of the plurality of candidate assembly positions on the assembly page, the candidate assembly position as the target assembly position; determining, in response to dragging the virtual beam emitter to any one of the plurality of candidate assembly positions on the assembly page, the candidate assembly position as the target assembly position. The virtual scene-based beam display method according to claim 1 .
4. A method for virtual scene-based beam display implemented by a computing device, comprising: displaying a virtual scene, the virtual scene displaying a target virtual object and a virtual item launcher held by the target virtual object; in response to an assembly operation of the virtual item launcher in the virtual scene, displaying an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, the virtual beam launcher being used to assist in aiming the virtual item launcher; displaying a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher; displaying a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item emitter, and the target assembly position, determining a direction of emission of the beam based on positioning information of the target virtual object in the virtual scene, the type of the virtual item projector, and the target assembly position; and controlling the virtual beam emitter to emit the beam in the emission direction.
5. determining a direction of the beam based on positioning information of the target virtual object in the virtual scene, a type of the virtual item projector, and a target assembly position, determining a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position, the first positioning information including a hand position and a pointing direction of the target virtual object in the virtual scene; determining a firing direction of the beam based on the first positioning information, second positioning information of the target virtual object, the type of the virtual item launcher, the hand position, and the target position, wherein the second positioning information includes a position and orientation of a virtual camera of the target virtual object in the virtual scene. The virtual scene-based beam display method according to claim 4.
6. determining a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position, generating a first rotation matrix based on a pointing direction of the hand; employing the first rotation matrix to process the target assembly position to obtain a reference position of the virtual beam emitter; adding the coordinates of the hand and the reference coordinates of the virtual beam emitter to blend the position of the hand with a reference position of the virtual beam emitter to obtain a target position of the virtual beam emitter, the target position being a relative position of the virtual beam emitter and the target virtual object. The virtual scene-based beam display method according to claim 5 .
7. determining a launch direction of the beam based on the first positioning information, the second positioning information of the target virtual object, a type of the virtual item launcher, the hand position, and the target position, determining a target launch distance for the virtual item launcher based on a type of the virtual item launcher; determining a reference aim position of the virtual item launcher based on second positioning information of the target virtual object and the target launch distance; determining a launch direction vector of the beam based on the target position, a reference aim position of the virtual item launcher, and the first positioning information. The virtual scene-based beam display method according to claim 5 .
8. determining a launch direction vector of the beam based on the target position, a reference aim position of the virtual item launcher, and the first positioning information, determining a reference firing direction vector of the beam based on the target position and a reference aim position of the virtual item launcher, the reference firing direction vector being a vector in a space established based on the target virtual object; and rotating the reference firing direction vector based on a pointing direction of the hand to obtain a firing direction vector of the beam, the firing direction vector being a vector in a space established based on the virtual item launcher. The virtual scene-based beam display method according to claim 7.
9. After displaying the beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item emitter, and the target assembly position, the beam display method includes: The method further includes the step of displaying a light spot on a virtual obstacle in the virtual scene when the target position of the virtual item launcher is a virtual obstacle in the virtual scene, the light spot being an intersection point between a beam launched from the virtual beam launcher and the virtual obstacle. The virtual scene-based beam display method according to claim 1 .
10. A method for displaying a virtual scene based beam, the method comprising: displaying a virtual scene, the virtual scene displaying a target virtual object and a virtual item launcher held by the target virtual object; in response to an assembly operation of the virtual item launcher in the virtual scene, displaying an assembled virtual beam launcher based on a target assembly position determined by the assembly operation, the virtual beam launcher being used to assist in aiming the virtual item launcher; displaying a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher; After the target virtual object holds the virtual item launcher in a first attitude and displays a beam emitted from the virtual beam launcher in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam display method includes: The virtual scene-based beam display method further includes a step of not displaying a beam emitted from the virtual beam emitter when the target virtual object adjusts an attitude in which it holds the virtual item emitter from the first attitude to a second attitude.
11. 1. A virtual scene based beam display device, comprising: a virtual scene display module configured to display a virtual scene, the virtual scene display module displaying a target virtual object and a virtual item launcher held by the target virtual object; a virtual beam projector display module configured to display an assembled virtual beam projector based on a target assembly position determined by an assembly operation of the virtual item projector in the virtual scene, the virtual beam projector being used to assist in aiming the virtual item projector; a beam display module configured to display a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher; The virtual beam projector display module includes: displaying a build page for the virtual item launcher within the virtual scene in response to a first operation in the virtual scene, the build page displaying a plurality of possible build positions for the virtual item launcher; determining, in response to a second operation on the assembly page, a selected candidate assembly location from among the plurality of candidate assembly locations as the target assembly location; and displaying the virtual beam projector at the target assembly location of the virtual item projector.
12. The virtual beam projector display module includes: displaying a build page for the virtual item launcher in the virtual scene in response to a pick-up operation of the virtual beam launcher in the virtual scene; and in response to a click operation on a build control displayed in the virtual scene, displaying a build page for the virtual item launcher in the virtual scene. The virtual scene based beam display device of claim 11.
13. The virtual beam projector display module includes: determining, in response to a click operation on any one of the plurality of candidate assembly positions on the assembly page, the candidate assembly position as the target assembly position; in response to dragging the virtual beam emitter to any one of the plurality of candidate assembly positions on the assembly page, determining the candidate assembly position as the target assembly position. The virtual scene based beam display device of claim 11.
14. A virtual scene based beam display device, comprising: a virtual scene display module configured to display a virtual scene, the virtual scene display module displaying a target virtual object and a virtual item launcher held by the target virtual object; a virtual beam projector display module configured to display an assembled virtual beam projector based on a target assembly position determined by an assembly operation of the virtual item projector in the virtual scene, the virtual beam projector being used to assist in aiming the virtual item projector; a beam display module configured to display a beam emitted from the virtual beam emitter in the virtual scene based on the target virtual object, the virtual item launcher, and the target assembly position, the beam being directed toward an aiming position of the virtual item launcher; The beam display module includes: determining a direction of projection of the beam based on positioning information of the target virtual object in the virtual scene, the type of the virtual item projector, and the target assembly position; and controlling the virtual beam emitter to emit the beam in the emission direction.
15. The beam display module includes: determining a target position of the virtual beam emitter based on first positioning information of the target virtual object in the virtual scene and the target assembly position, the first positioning information including a hand position and a pointing direction of the target virtual object in the virtual scene; determining a firing direction of the beam based on the first positioning information, second positioning information of the target virtual object, a type of the virtual item launcher, a position of the hand, and the target position, where the second positioning information includes a position and an orientation of a virtual camera of the target virtual object in the virtual scene. The virtual scene based beam display device of claim 14.
16. A computing device comprising one or more processors and one or more memories, wherein the one or more memories store at least one computer-readable instruction, the computer-readable instruction being loaded and executed by the one or more processors to realize a virtual scene-based beam display method according to any one of claims 1 to 10.
17. A computer program product causing a computer to carry out the virtual scene-based beam display method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Operation control method and device, storage medium and electronic device
CN111111171A
Virtual prop display method, computer equipment and storage medium
CN111589132A
Virtual prop obtaining method and device, equipment and medium
CN112675544A
Accessory selection method in virtual environment, and its device, equipment, and computer program
JP2021520286A