Virtual environment screen display method, device, equipment, and computer program
By offsetting the camera model to fully display the directional skill indicator, the method addresses inaccurate aiming in MOBA games, improving aiming accuracy and efficiency in competitive gaming.
Patent Information
- Application Number
- JP2023182711
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-09
- Filing Date
- 2023-10-24
- Publication Date
- 2024-11-07
- Estimated Expiration
- 2041-03-11
AI Technical Summary
In competitive games like MOBA, when the skill action distance is long, the directional skill indicator cannot be fully displayed on the virtual environment screen, leading to inaccurate aiming and inefficient user operations.
The method involves changing the observation position of the virtual environment screen to ensure the directional skill indicator is fully displayed by offsetting the camera model in the direction indicated by the skill indicator, using methods such as frame abutment offset and direct offset.
This approach allows for accurate target aiming, reduces unnecessary client calculations, and enhances man-machine interaction efficiency by ensuring the directional skill indicator is fully visible on the screen.
Smart Images

Figure 0007579413000001 
Figure 0007579413000002 
Figure 0007579413000003
Abstract
Description
[Technical field]
[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority to a Chinese patent application bearing application number 202010275544.4, filed on April 9, 2020, for "Virtual environment screen display method, device, apparatus and medium," the entire contents of which are incorporated herein by reference.
[0002] The embodiments of the present application relate to the field of man-machine interaction, and in particular to a method, an apparatus, a device, and a medium for displaying a screen of a virtual environment. [Background technology]
[0003] A competitive game is a game in which multiple user accounts compete in the same scene. Optionally, the competitive game may be a Multiplayer Online Battle Arena Game (MOBA).
[0004] In a typical MOBA game, the virtual environment screen displayed on the client is a screen obtained by observing the virtual environment with the master virtual character as the observation center. The user can control the master virtual character to release a skill in a predetermined direction to attack a rival virtual character in the predetermined direction. When the user controls the master virtual character to aim in the predetermined direction, a directional skill indicator is displayed on the virtual environment screen to show the user the range of action after the skill is released. When the rival virtual character is within the range of action indicated by the directional skill indicator, the master virtual character can attack the rival virtual character by controlling the master virtual character to release a skill.
[0005] When the skill action distance of the master virtual character is very long and the directional skill indicator cannot be displayed completely on the virtual environment screen, the directional skill indicator cannot accurately aim at the target and needs to perform aiming operations several times to achieve target aiming, which causes the client to perform invalid calculations several times and wastes calculation resources. Summary of the Invention [Means for solving the problem]
[0006] The embodiments of the present application provide a method, device, apparatus, and medium for displaying a screen of a virtual environment, which can display a directional skill indicator more completely by changing an observation position of the virtual environment screen according to a direction indicated by the skill indicator, and can improve the accuracy of a user's target aiming. The above technical solution is as follows.
[0007] According to one aspect of the present application, there is provided a method for displaying a screen of a virtual environment executed by a client, the method comprising the steps of: a step of displaying a first virtual environment view, the first virtual environment view being a view obtained by observing the virtual environment with a first observation position as an observation center, the first virtual environment view displaying a master virtual character in the virtual environment; In response to receiving a first directional command generated by a first directional operation, a step of displaying a directional skill indicator pointing in a first direction, the directional skill indicator being a directional mark pointing in the first direction starting from a position of the master virtual character; A method for displaying a screen of a virtual environment is provided, the method including: a step of displaying a second virtual environment screen, the second virtual environment screen being a screen obtained by observing the virtual environment with a second observation position as an observation center, the second virtual environment screen including the directional skill indicator, and the second observation position being in the first direction of the first observation position or in the peripheral area of the first direction.
[0008] According to another aspect of the present application, a display module for displaying a first virtual environment view, the first virtual environment view being a view obtained by observing the virtual environment with a first observation position as an observation center, the first virtual environment view displaying a master virtual character in the virtual environment; an interaction module for receiving a first directional command generated by the first directional operation, the display module is also for displaying a directional skill indicator pointing in a first direction in response to receiving a first directional command generated by a first directional operation, the directional skill indicator being a directional mark pointing in the first direction starting from a position of the master virtual character; The display module is also for displaying a second virtual environment screen, the second virtual environment screen being a screen obtained by observing the virtual environment with a second observation position as an observation center, and including the directional skill indicator, and the second observation position is in the first direction of the first observation position or in a peripheral area of the first direction, providing a screen display device for a virtual environment.
[0009] According to another aspect of the present application, there is provided a computing device including a processor and a memory having stored therein at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to realize the method for displaying a screen of a virtual environment as described in the above aspect.
[0010] According to another aspect of the present application, there is provided a computer-readable storage medium having stored thereon at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to realize the method for displaying a screen of a virtual environment as described in the above aspect.
[0011] According to another aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored on a computer readable storage medium, the computer instructions being read by a processor of a computing device from the computer readable storage medium and executed by the processor to cause the computing device to perform the method for displaying a screen of a virtual environment as described in the above aspect.
[0012] The technical solutions provided by the embodiments of the present application provide at least the following beneficial effects:
[0013] By controlling the observation center to move in the direction pointed by the directional skill indicator, the master virtual character is no longer the observation center on the virtual environment screen, so that the directional skill indicator can be more completely displayed on the virtual environment screen, and the inability to accurately aim at the target due to the directional skill indicator being too long to be completely displayed can be avoided, so that the directional skill indicator can attack the target accurately, and furthermore, the target aiming time can be reduced, and the client can be prevented from performing many invalid calculations during aiming, thereby improving the operating efficiency of the client and improving the man-machine interaction efficiency when the directional skill indicator aims at the target. [Brief description of the drawings]
[0014] [Figure 1] FIG. 2 is a block diagram of the architecture of a computer system provided by one exemplary embodiment of the present application. [Diagram 2] 2 is a method flowchart of a screen display method for a virtual environment provided by an exemplary embodiment of the present application. [Diagram 3] FIG. 2 is a schematic diagram of a virtual environment screen provided by one exemplary embodiment of the present application. [Figure 4] FIG. 2 is a schematic diagram of a method of using a skills widget provided by one exemplary embodiment of the present application. [Diagram 5] FIG. 2 is a schematic diagram of a directional skill indicator provided by one exemplary embodiment of the present application. [Figure 6] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 7] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 8] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 9] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 10] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 11] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 12] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 13] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 14] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 15] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 16] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 17]FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 18] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 19] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 20] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 21] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 22] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 23] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 24] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Diagram 25] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 26] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 27] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Figure 28] FIG. 2 is a schematic diagram of a virtual environment screen provided by another exemplary embodiment of the present application; [Figure 29] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Diagram 30] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Diagram 31] 4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Diagram 32]4 is a method flowchart of a screen display method for a virtual environment provided by another exemplary embodiment of the present application. [Diagram 33] FIG. 2 is a device block diagram of a screen display device of a virtual environment provided by one exemplary embodiment of the present application. [Diagram 34] 1 is a block diagram of a terminal provided by one exemplary embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] First, a brief introduction of terms used in the embodiments of the present application will be given. The virtual environment is a virtual environment that is displayed (or provided) when the application is executed on the terminal. The virtual environment may be a simulation of the real world, a semi-simulated and semi-fictional three-dimensional world, or a completely fictional three-dimensional world. The virtual environment may be any one of a two-dimensional virtual environment, a two-and-a-half-dimensional virtual environment, and a three-dimensional virtual environment. In some embodiments, the virtual environment is also used for a virtual environment battle between at least two virtual characters, and the virtual environment has virtual resources that are used by the at least two virtual characters. In some other embodiments, the virtual environment includes symmetrical lower left and upper right corner areas, and virtual characters belonging to two opposing camps each occupy one of the above areas and have the victory goal of destroying a target building / base / base / crystal in the depths of the opponent's area.
[0016] A virtual character refers to a movable object in a virtual environment. The movable object may be at least one of a virtual person, a virtual animal, and an animated character. In some embodiments, when the virtual environment is a three-dimensional virtual environment, the virtual characters may be three-dimensional virtual models, and each virtual character has its own shape and volume in the three-dimensional virtual environment and occupies a part of the space in the three-dimensional virtual environment. In some other embodiments, the virtual characters are three-dimensional characters constructed based on three-dimensional human skeleton technology, and different skins are attached to achieve different appearances. In some embodiments, the virtual characters may be realized by 2.5D or 2D models, but the embodiments of the present application are not limited thereto.
[0017] A multiplayer online battle arena refers to a virtual environment in which different virtual teams belonging to at least two opposing camps each occupy a map area and compete to achieve certain victory conditions. The victory conditions include, but are not limited to, at least one of the following: occupying a base or destroying the opposing camp's base, killing the opposing camp's virtual character, ensuring one's own survival in a certain scene and within a certain time, competing for a certain resource, and exceeding the opponent's score within a certain time. The battle arena may be played in rounds, and the battle arena map for each round may be the same or different. Each virtual team includes one or more virtual characters, and may be one, two, three, five, etc.
[0018] A MOBA game provides multiple bases in a virtual environment, and users belonging to different camps compete in the virtual environment, controlling virtual characters to capture bases or destroy the bases of the opposing camp. For example, in a MOBA game, users may be divided into two opposing camps, and virtual characters controlled by the users may scatter in the virtual environment and compete against each other, with the victory condition being the destruction or capture of all enemy bases. MOBA games are played in rounds, and the duration of one round of a MOBA game is the time from the start of the game to the time the victory condition is met.
[0019] A User Interface (UI) widget is any visible widget or element that appears on the user interface of an application, such as a picture, an input box, a text box, a button, a tag, etc. Some UI widgets are responsive to user manipulation, such as a skill widget that controls a master virtual character to release a skill. A user controls a master virtual character to release a skill by triggering a skill widget. UI widgets according to embodiments of the present application include, but are not limited to, a skill widget and a movement widget.
[0020] 1 shows a block diagram of the architecture of a computer system provided by an exemplary embodiment of the present application. The computer system 100 includes a first terminal 110, a server 120, and a second terminal 130.
[0021] The first terminal 110 has a client 111 that supports a virtual environment installed and running, and the client 111 may be a multiplayer online battle program. When the first terminal runs the client 111, a user interface of the client 111 is displayed on the screen of the first terminal 110. The client may be any one of a military simulation program, a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online battle arena game (MOBA), and a simulation game (SLG). In this embodiment, a case where the client is a MOBA game will be described as an example. The first terminal 110 is a terminal used by the first user 112, who uses the first terminal 110 to control an activity of a first virtual character in a virtual environment, which may be referred to as a master virtual character of the first user 112. The activity of the first virtual character includes, but is not limited to, at least one of adjusting a body posture, crawling, walking, running, cycling, flying, jumping, driving, picking up, shooting, attacking, and throwing. Exemplarily, the first virtual character is a first virtual person, such as a simulation character or an animation character.
[0022] The second terminal 130 has a client 131 that supports a virtual environment installed and running, and the client 131 may be a multiplayer online battle program. When the second terminal 130 runs the client 131, a user interface of the client 131 is displayed on the screen of the second terminal 130. The client may be any one of a military simulation program, a battle royale shooting game, a VR application, an AR program, a 3D map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, and a SLG. In this embodiment, a case where the client is a MOBA game will be described as an example. The second terminal 130 is a terminal used by a second user 113, and the second user 113 uses the second terminal 130 to control a second virtual character in a virtual environment to act, and the second virtual character may be called a master virtual character of the second user 113. Exemplarily, the second virtual character is a second virtual person such as a simulation character or an anime character.
[0023] In some embodiments, the first virtual person and the second virtual person are in the same virtual environment. In some other embodiments, the first virtual person and the second virtual person are in the same camp, team, organization, have a friendly relationship, or have temporary communication rights. In some other embodiments, the first virtual person and the second virtual person are in different camps, teams, organizations, or are enemies.
[0024] In some embodiments, the clients installed on the first terminal 110 and the second terminal 130 are the same or the same type of client on different operating system platforms (Android or IOS). The first terminal 110 may broadly refer to one of a plurality of terminals, and the second terminal 130 may broadly refer to the other of a plurality of terminals, and in this embodiment, only the first terminal 110 and the second terminal 130 are described as examples. The device types of the first terminal 110 and the second terminal 130 may be the same or different. The device types include at least one of a smartphone, a tablet PC, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.
[0025] Although only two terminals are shown in FIG. 1, in other embodiments, there are multiple other terminals 140 that can access the server 120. Optionally, there are also one or more terminals 140 corresponding to developers. A client development and editing platform supporting a virtual environment is installed in the terminal 140, and the developer may edit and update the client on the terminal 140 and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 may download the client installation package from the server 120 to realize the client update.
[0026] A first terminal 110, a second terminal 130 and another terminal 140 are connected to a server 120 via a wireless network or a wired network.
[0027] The server 120 includes at least one of one server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is for providing background services to clients supporting a three-dimensional virtual environment. In some embodiments, the server 120 is responsible for primary computing tasks, and the terminal is responsible for secondary computing tasks. Alternatively, the server 120 is responsible for secondary computing tasks, and the terminal is responsible for primary computing tasks. Alternatively, the server 120 and the terminal perform collaborative computing through a distributed computing architecture.
[0028] In one illustrative example, the server 120 includes a processor 122, a user account database 123, a match service module 124, and a user-facing input / output interface (I / O interface) 125. The processor 122 is for loading instructions stored in the server 121 and processing data in the user account database 123 and the match service module 124. The user account database 123 is for storing user account data, such as a user account avatar, a user account nickname, a user account combat power index, and a service area where the user account is located, used by the first terminal 110, the second terminal 130, and the other terminals 140. The match service module 124 is for providing multiple match rooms in which users can play matches such as 1V1 match, 3V3 match, 5V5 match, etc. The user-facing I / O interface 125 is for communicating and exchanging data with the first terminal 110 and / or the second terminal 130 via a wireless network or a wired network.
[0029] For illustrative purposes, the virtual environment screen display method provided by the present application is applied to a MOBA game.
[0030] In a MOBA game, a user can control a master virtual character to release a skill by controlling a skill widget. In the skill release method, a user presses a skill widget to call up a wheel-type virtual joystick of the skill widget, swipes the wheel-type virtual joystick to aim in the skill release direction (aiming direction), and controls the master virtual character to release a skill in the skill release direction by removing the user's hand from the wheel-type virtual joystick. When a user calls up the wheel-type virtual joystick of the skill widget, a directional skill indicator is displayed on the virtual environment screen, and the directional skill indicator is an arrow-type widget that points in the aiming direction starting from the position of the master virtual character, and the length of the arrow is determined according to the distance at which the skill can be released. The directional skill indicator is intended to indicate the range of action after the skill is released.
[0031] For example, if the distance over which a skill can be released is too long to display a complete directional skill indicator on the virtual environment screen obtained by using the position of the master virtual character as the observation center of the camera model, the user will not be able to know the range of action of the skill by observing the directional skill indicator.
[0032] Therefore, the present application provides a virtual environment screen display method for displaying a complete directional skill indicator on the virtual environment screen by controlling the camera model to be offset in the aiming direction when the directional skill indicator exceeds the virtual environment screen. Illustratively, the present application provides two camera model offset methods, a frame abutment offset and a direct offset.
[0033] In the frame abutment offset, a field of view judgment box is defined in the virtual environment. The shape of the field of view judgment box is determined according to the shape of the display of the terminal (and other factors), and its center is the aiming position of the camera model in the virtual environment. Taking the case where the screen of the terminal is rectangular as an example, the aiming position of the camera model in the virtual environment is set as the center of the field of view judgment box, and the length and width of the field of view judgment box are determined according to the length and width of the screen. The size of the field of view judgment box is slightly smaller than the screen. The field of view judgment box has a long side perpendicular to the observation direction of the camera model and a short side parallel to the observation direction of the camera model, or a short side perpendicular to the observation direction of the camera model and a long side parallel to the observation direction of the camera model. Exemplarily, the field of view judgment box moves with the movement of the camera model in the virtual environment. Exemplarily, when the camera model is not offset, the center of the field of view judgment box is at the position of the master virtual character.
[0034] When the user controls the skill widget so that the end of the directional skill indicator exceeds the field of view judgment box, the client controls the camera model to move in the aiming direction of the directional skill indicator until the edge of the directional skill indicator fits within the field of view judgment box. Illustratively, the client determines an arbitrary point (usually an end) on the directional skill indicator as an offset calculation point. When the offset calculation point exceeds the field of view judgment box, the client calculates a vertical offset distance from the offset calculation point to the upper and lower frames or the left and right frames of the field of view judgment box, determines an offset amount of the camera model based on the vertical offset distance of the offset calculation point in at least one direction and at most two directions, and controls the offset of the camera model according to the offset amount, so that the end of the directional skill indicator fits within the field of view judgment box.
[0035] When the camera model is offset, the end of the directional skill indicator abuts against the frame of the field of view judgment box (i.e., there is an intersection between the end of the directional skill indicator and the frame of the field of view judgment box). At this time, the user controls the directional skill indicator to move in the other direction, so that the end of the directional skill indicator is located within the field of view judgment box, and when it no longer abuts against the frame of the field of view judgment box, the client controls the camera model to move to a default position (a position with the master virtual character as the observation center) until the camera model returns to the default position, thereby abutting the end of the indicator against the frame of the field of view judgment box again.
[0036] For example, when controlling the offset of the camera model by the frame abutment offset, the camera model has a maximum offset distance. That is, when the vertical offset distance calculated by the offset calculation point and the field of view judgment box exceeds the maximum offset distance, the offset amount of the camera model is determined based on the maximum offset distance, not the vertical offset distance, thereby preventing the user from feeling dizzy due to excessive offset.
[0037] In the direct offset, the offset amount of the camera model is determined based on the angle α between the directional skill indicator and the horizontal direction. Illustratively, the developer sets the upper offset distance, lower offset distance, left offset distance, and right offset distance for each skill to be offset in the direct offset method. The upper offset distance, lower offset distance, left offset distance, and right offset distance are predefined default values. After the user controls the directional skill indicator to aim in a certain direction, the client obtains the angle α between the directional skill indicator and the horizontal direction and determines the aiming direction of the directional skill indicator. When the aiming direction of the directional skill indicator is the upper right direction, the right offset amount of the camera model = cosα * right offset distance, and the upward offset amount of the camera model = sinα * upward offset distance, and then controls the camera model to be offset according to the offset amount of the camera model.
[0038] Illustratively, the client can control the camera model to be offset in either of the two ways above to better display the directional skill indicator on the virtual environment screen.
[0039] Exemplarily, the manner of moving the offset of the camera model controlled by the client is arbitrary. For example, the client may control the camera model to move to the offset end point at a constant speed, or may control the camera model to perform differential movement or smooth decay movement to the offset end point. Exemplarily, the manner of returning the camera model from the offset position to the default position may be any one of constant movement, differential movement, and smooth decay movement.
[0040] Illustratively, different skills of the same master virtual character may use different camera model offset or movement schemes.
[0041] 2 shows a flowchart of a method for displaying a screen of a virtual environment provided by an exemplary embodiment of the present application. The method may be performed by a client running on any one of the terminals in the above FIG. 1. The client supports the virtual environment. The method includes the following steps: In step 201, a first virtual environment view is displayed. The first virtual environment view is obtained by observing the virtual environment with a first observation position as the observation center, and the first virtual environment view displays a master virtual character in the virtual environment.
[0042] Exemplarily, the virtual environment screen is a two-dimensional screen displayed on the client obtained by performing a screen capture on the three-dimensional virtual environment. Exemplarily, the shape of the virtual environment screen is determined according to the shape of the display of the terminal or the shape of the user interface of the client. For example, in the case where the display of the terminal is rectangular, the virtual environment screen is also displayed on a rectangular screen.
[0043] The first virtual environment screen is a virtual environment screen obtained with the first observation position in the virtual environment as the observation center. The observation center is the center of the virtual environment screen. The observation center corresponds to the observation position in the virtual environment. For example, in the case where the virtual environment screen is a rectangular screen, the intersection of the diagonals of the rectangle in the virtual environment screen is the observation center. Assuming that the master virtual character is at the observation center in the virtual environment screen, the position of the master virtual character in the virtual environment is the observation position. The observation position is a coordinate position in the virtual environment. In the case where the virtual environment is a three-dimensional virtual environment, the observation position is a coordinate position indicated by three-dimensional coordinates. Exemplarily, if the ground in the virtual environment is a horizontal plane, the height coordinate of the observation position is 0, and therefore the observation position may be approximately indicated by two-dimensional coordinates on the horizontal plane.
[0044] When different observation positions are used as observation centers, different virtual environment views can be acquired from the virtual environment. The first virtual environment view is a virtual environment view acquired with the first observation position as the observation center. The second virtual environment view is a virtual environment view acquired with the second observation position as the observation center.
[0045] The master virtual character is a virtual character controlled by a client. The client controls the master virtual character's activities in the virtual environment according to the received user operations. Exemplarily, the master virtual character's activities in the virtual environment include walking, running, jumping, climbing, lying down, attacking, releasing skills, picking up items, and sending messages.
[0046] A skill is an ability that a virtual character uses or releases to attack virtual characters (including other virtual characters and the user) and give them a debuff or buff effect. Skills include active skills and passive skills. An active skill is a skill that a virtual character actively uses or releases, and a passive skill is a skill that is automatically triggered when a passive condition is met. Illustratively, the skills described in this embodiment are active skills that a master virtual character controlled by a user actively uses and releases.
[0047] Exemplarily, the position of the master virtual character in the virtual environment may be the first observation position or another position in the virtual environment. Exemplarily, in the display method of a virtual environment screen provided by this embodiment, the virtual environment screen is set to always have the master virtual character as the observation center in a default situation. The default situation refers to the display situation of the virtual environment screen when no viewpoint movement or switching operation is performed, and for example, the viewpoint movement or switching operation includes at least one of the following operations: dragging the map to see the surrounding terrain, pressing the minimap to see the terrain at a predetermined position, observing the virtual environment with another virtual character as the observation center after the death of the master virtual character, and controlling the master virtual character so that the user releases a skill in an area outside the current line of sight. Exemplarily, when the first virtual environment screen is a virtual environment screen obtained in the default situation, the master virtual character is at the first observation position. When the viewpoint movement is performed in the first virtual environment screen, the master virtual character may not be located at the first observation position, and further, the master virtual character may not exist in the first virtual environment screen.
[0048] Exemplarily, a first user interface is provided that is displayed on the client as shown in FIG. The first user interface includes a first virtual environment screen 301 in which a master virtual character 302 is displayed. The first virtual environment screen 301 has a rectangular shape, and an observation center 303 is located at the intersection of the diagonals of the rectangle, and the observation center 303 corresponds to a first observation position in the virtual environment, and the master virtual character 302 is at the first observation position. Exemplarily, the first virtual environment screen may display UI widgets such as a movement widget 304, a skill widget 305, and an attack widget 306, where the movement widget 304 is for controlling the master virtual character to move, the skill widget 305 is for controlling the master virtual character to release a skill, and the attack widget 306 is for controlling the master virtual character to launch an attack. Exemplarily, the UI widgets obscure a portion of the first virtual environment screen 301.
[0049] In step 202, in response to receiving a first directional command generated by a first directional operation, a directional skill indicator pointing in the first direction is displayed, the directional skill indicator being a directional mark pointing in the first direction starting from the position of the master virtual character.
[0050] The first directional operation is a user operation received by the client, and the client generates a first directional command in response to the received user operation and displays a directional skill indicator by the first directional command. Exemplarily, the user operation includes at least one operation of an operation on a UI widget, a voice operation, a motion operation, a character operation, a mouse operation, a keyboard operation, and a game joystick operation. For example, the client generates the first directional command by recognizing a voice command of the user, generates the first directional command by recognizing a motion of the user, and generates the first directional command by recognizing characters input by the user. Exemplarily, the first directional operation is an operation on a skill widget by the user.
[0051] Exemplarily, the skill widget is a wheel-type virtual joystick widget. As shown in FIG. 4, a circular skill widget 305 is displayed in the first user interface, and the user calls up a wheel-type virtual joystick 307 of the skill widget by pressing the skill widget 305. The wheel-type virtual joystick is composed of a large circle 308 (wheel portion) and a small circle 309 (joystick portion), the large circle 308 is an operable range of the wheel-type virtual joystick, the small circle 309 is a position where the user's finger is currently pressing, and the user can arbitrarily swipe the small circle 309 within the range of the large circle 308. Exemplarily, the wheel-type virtual joystick is a directional joystick, and determines the direction of the user's operation based on the direction in which the small circle 309 is offset from the center point 310 of the virtual joystick, and controls the master virtual character to release a skill in the same direction in the virtual environment according to the direction. For example, an operation in which a user releases a skill by operating a skill widget includes pressing the skill widget to call up a wheel-type virtual joystick, swiping the wheel-type virtual joystick in a target direction, and releasing the wheel-type virtual joystick to release the skill.
[0052] The first directional command includes a first direction. Illustratively, the user controls the directional skill indicator to point in the first direction by moving the skill widget in the first direction.
[0053] The directional skill indicator is a skill indicator corresponding to a directional skill. A directional skill is a skill that is released according to the user's aiming direction. The directional skill indicator is a directional auxiliary mark displayed in the virtual environment. The directional skill indicator is intended to indicate to the user the skill release direction corresponding to the current user operation in the virtual environment so that the user can easily aim. Exemplarily, the directional skill indicator is a directional mark displayed on the ground of the virtual environment starting from the master virtual character. The direction pointed by the directional skill indicator is the same as the direction pointed by the skill widget by the user's operation. That is, the directional skill indicator in the virtual environment and the direction pointed by the wheel-type virtual joystick currently controlled by the user are consistent. Exemplarily, since the virtual environment screen is a projection screen of the virtual environment, the direction pointed by the directional skill indicator displayed on the virtual environment screen and the direction of the wheel-type virtual joystick may be consistent or may be slightly different.
[0054] For example, the directional skill indicator may indicate the range of effect after the skill is released in addition to the direction. For example, the width and length of the directional skill indicator are determined according to the width and the farthest distance of the skill release.
[0055] For example, the pattern of the directional skill indicator is different depending on the directional skill. As shown in FIG. 5, three directional skill indicators are provided corresponding to three different directional skills, and the directions of the three directional skill indicators are all 45° diagonally upward. FIG. 5(1) corresponds to skill 1, which is a skill that has the farthest action distance and is released in the user's aiming direction. The farthest action distance of skill 1 is the radius of circle 311, the center of circle 311 is the position of the master virtual character, and the directional skill indicator points to any one point on the boundary line of circle 311 from the center of circle 311. When the user controls the master virtual character to release a skill, the client controls the master virtual character to release the skill according to the direction the user is currently aiming, and the action width of the skill can refer to the width of the directional skill indicator. The action target is affected by skill 1 when it is within the release range of skill 1. FIG. 5(2) corresponds to skill 2, which is a skill that has a farthest action distance and automatically locks the action target based on the user's aiming direction. For example, as shown in FIG. 5(2), the user's current aiming direction is diagonally upward at 45°, and the directional skill indicator shows a sector-shaped range 312 with the direction as the center line. When the user releases the skill in the current aiming direction, the client automatically locks the action target within the sector-shaped range 312 and causes skill 2 to act on the action target. Exemplarily, skill 2 may have a farthest action distance like skill 1, or an infinite action distance like skill 3. FIG. 5(3) corresponds to skill 3, which is a skill that has an infinite action distance and is released in the user's aiming direction. That is, skill 3 is a skill that can be released on all maps, and after the master virtual character releases the skill, the skill is fired from the position of the master virtual character along the aiming direction until it flies out of the virtual environment.For example, as shown in FIG. 6, as can be seen from the minimap 321 in the upper left corner, the range of the virtual environment currently displayed on the virtual environment screen is the range indicated by a rectangular box 322 on the minimap, and a portion of the directional skill indicator 313 corresponding to skill 3 is displayed on the virtual environment screen, and the complete directional skill indicator 313 is visible from the minimap, with the directional skill indicator 313 pointing from the position of the master virtual character to the edge of the minimap.
[0056] Exemplarily, the action target of the skill includes any three-dimensional model in the virtual environment, such as virtual characters controlled by other clients (teammates or opponents), virtual characters controlled by the client or the server (neutral creeps, animals, plants, etc.), buildings (defensive towers, bases, crystals, etc.), virtual vehicles (cars, planes, motorcycles, etc.). Exemplarily, the effect of the release of the skill by the master virtual character may be the placement of virtual items, such as throwing traps, mines, vision detectors, etc.
[0057] Exemplarily, a directional skill indicator is provided that is displayed on the user interface as shown in Fig. 7. A directional skill indicator 313, which is a directed arrow pointing from the position of the master virtual character 302 to a first direction 315 in which the skill widget 305 is currently aiming, is displayed on the virtual environment screen of the user interface. Exemplarily, the direction pointed by the directional skill indicator 313 is the same as the direction pointed by the skill widget 305. Exemplarily, an end of the directional skill indicator 313 is located on a circle 314, and the radius of the circle 314 is the farthest action distance of the skill.
[0058] For example, when the first direction pointed by the directional skill indicator 313 is diagonally upward as shown in FIG. 8, the complete directional skill indicator 313 is visible from the virtual screen obtained with the first position as the observation center, and the user can determine the effect after the skill is released based on the range indicated by the directional skill indicator 313. However, when the first direction pointed by the directional skill indicator is diagonally downward as shown in FIG. 9, the complete directional skill indicator 313 is not visible from the virtual environment screen obtained with the first position as the observation center, and the user cannot determine the effect after the skill is released based on the range indicated by the directional skill indicator. Assuming that a rival virtual character exists at the end of the directional skill indicator 313, if the user cannot see the rival virtual character, he or she cannot accurately aim and release the skill, and can only release the skill arbitrarily by feeling. Therefore, by step 203, the observation center of the virtual environment screen is moved a certain distance in the first direction, and the complete directional skill indicator can be displayed on the virtual environment screen.
[0059] In step 203, a second virtual environment screen is displayed, the second virtual environment screen being a screen obtained by observing the virtual environment with a second observation position as an observation center, the second virtual environment screen including a directional skill indicator, and the second observation position being in a first direction of the first observation position or in a peripheral area of the first direction.
[0060] The second observation position is a position corresponding to the center point (observation center) of the second virtual environment screen in the virtual environment. Exemplarily, the second observation position is a position after moving a certain distance from the first observation position in the first direction. Exemplarily, the second observation position is moved in the peripheral direction of the first direction, for example, the first direction is 45°, and the second observation position is moved in the direction of 50° from the first observation position. That is, the second observation position is in the first direction of the first observation position, or is in the peripheral area in the first direction of the first observation position. Assuming that a half line pointing in the first direction from the first observation position is the first half line, the second observation position is located on the second half line, or the distance from the second observation position to the first half line is smaller than a threshold value. The peripheral area in the first direction is a set of points whose distance to the first half line is smaller than a threshold value.
[0061] For example, the position of the master virtual character in the virtual environment does not change from the first virtual environment view to the second virtual environment view, and when the master virtual character is at the first observation position in the first virtual environment view, the position of the master virtual character remains at the first observation position when the master virtual character can be displayed in the second virtual environment view.
[0062] Exemplarily, the second virtual environment view displays either a complete directional skill indicator (including an edge of the directional skill indicator) or a relatively complete directional skill indicator (including most of the directional skill indicator but not including its edge). Exemplarily, a relatively complete directional skill indicator is displayed, meaning that the virtual environment view displays a more complete directional skill indicator than would be the case if the observation center were not offset (still centered on the first observation position).
[0063] Exemplarily, as shown in FIG. 10, the observation center of the second virtual environment screen 317 is the second observation position 316. Assuming that the master virtual character is at the first observation position 318 in the first virtual environment screen, the second observation position 316 is in the first direction of the first observation position 318, and the directional skill indicator 313 also points to the first direction, and at this time, the complete directional skill indicator 313 can be displayed on the second virtual environment screen 317. Exemplarily, as shown in FIG. 9, in the virtual environment screen with the first observation position as the observation center, the user cannot see the end of the directional skill indicator 313, but as shown in FIG. 10, in the second virtual environment screen with the second observation position as the observation center, the user can see the end of the directional skill indicator 313 and other virtual characters 319 at the end, and the user can more accurately control the directional skill indicator 313 to aim at the other virtual characters 319 and further release skills on the other virtual characters 319.
[0064] To sum up, the method provided in this embodiment controls the observation center to move in the direction pointed by the directional skill indicator, so that the master virtual character is no longer the observation center on the virtual environment screen, and the directional skill indicator can be more completely displayed on the virtual environment screen, and the inability to accurately aim at the target due to the directional skill indicator being too long to be completely displayed can be avoided. Thus, the directional skill indicator can attack the target accurately, and further reduces the target aiming time, and prevents the client from performing many invalid calculations during aiming, improving the operating efficiency of the client and improving the man-machine interaction efficiency when the directional skill indicator aims at the target.
[0065] Exemplarily, when the length of the directional skill indicator exceeds a range that can be displayed on the current virtual environment screen, the observation center is controlled to be offset to a second observation position, and the second virtual environment screen is displayed. Exemplarily, the offset of the observation center is realized by controlling the offset of the camera model.
[0066] 11 shows a flowchart of a method for displaying a screen of a virtual environment provided according to another exemplary embodiment of the present application. The method may be performed by a client running on any one of the terminals in the above FIG. 1. The client supports the virtual environment. According to the exemplary embodiment shown in FIG. 2, step 203 includes step 2031.
[0067] In step 2031, in response to the length of the directional skill indicator being greater than a distance threshold, a second virtual environment view is displayed, the distance threshold being a field of view threshold in a first direction originating from a position of the master virtual character in the first virtual environment view.
[0068] Exemplarily, the directional skill indicator has an end, and its length is the distance from the starting point to the end, i.e., the distance from the position of the master virtual character to the end, i.e., the furthest action distance of the skill. Exemplarily, if the skill is a skill that is released on the entire map, the directional skill indicator does not have an end, and its length is infinite, so it is always greater than the distance threshold. Exemplarily, if the skill is a skill that is released on the entire map, the intersection point of the directional skill indicator and the edge of the map may be determined as the end of the directional skill indicator.
[0069] The distance threshold is determined according to the field of view of the current virtual environment screen in the first direction, i.e., the field of view of the first virtual environment screen in the first direction. The distance threshold is for determining whether the field of view of the current virtual environment screen is sufficient to display a complete or relatively complete directional skill indicator. Exemplarily, the field of view refers to the area range of the virtual environment displayed on the current virtual environment screen. Alternatively, the field of view refers to the area range of the virtual environment that can be displayed on the current virtual environment screen. Exemplarily, since a UI widget is displayed overlapping on the virtual environment screen, the UI widget also covers the field of view of the current virtual environment screen. Therefore, the distance threshold may be determined taking into consideration the factor of covering by the UI widget in the first direction.
[0070] Exemplarily, the distance threshold is the distance from the master virtual character's position to the furthest point visible from the virtual environment screen along the first direction pointed by the directional skill indicator. As shown in Fig. 8, the length of a line segment 320 from the master virtual character's position to the edge of the virtual environment screen along the first direction is the distance threshold. Exemplarily, as shown in Fig. 6, when the user is obscured by the minimap 321 in the first direction, the user's field of view in the first direction is reduced and the distance threshold is reduced accordingly.
[0071] For example, the client captures an image of the virtual environment using a camera model arranged in the virtual environment to obtain a virtual environment screen. As shown in Fig. 12, step 2031 further includes steps 2031-1 to 2031-3.
[0072] In step 2031-1, in response to the length of the directional skill indicator being greater than the distance threshold, an offset amount for the camera model is obtained to determine the movement direction and movement distance of the camera model.
[0073] The first virtual environment screen and the second virtual environment screen are screens of the virtual environment captured by a camera model placed in the virtual environment, and the observation center is the intersection of a half line extending from the position of the camera model in the observation direction and the virtual environment.
[0074] The camera model is disposed in the virtual environment and is a model for acquiring a virtual environment screen. Exemplarily, the camera model has various arrangement modes in a default state, for example, the position of the camera model is bound to a three-dimensional model (e.g., head or eyes) of a master virtual character, the imaging direction (observation direction) of the camera model is rotated with the rotation of the head or eyes of the master virtual character, and the position of the camera model is moved with the movement of the position of the master virtual character, so that the virtual environment can be imaged from the viewpoint of the master virtual character and a virtual environment screen from the first-person viewpoint of the master virtual character can be obtained. The position of the camera model is bound behind (behind) the master virtual character at a certain distance and height, the imaging direction (observation direction) of the camera model is rotated with the rotation of the body of the master virtual character, and the position of the camera model is moved with the movement of the position of the master virtual character, so that the virtual environment can be imaged from the viewpoint over the shoulder of the master virtual character and a virtual environment screen from the viewpoint over the shoulder of the master virtual character can be obtained. When the position of the camera model and the relative position of the master virtual character are fixed, for example, when the camera model is located directly below (or directly south of) the master virtual character at a height of 10 meters, the position of the camera model is moved with the movement of the position of the master virtual character, but the imaging direction is not changed with the rotation of the head or body of the master virtual character, so that the virtual environment is imaged from a third-person viewpoint, and a virtual environment screen from a third-person viewpoint with the master virtual character as the observation target can be obtained. Illustratively, the camera model of this embodiment images the virtual environment from a third-person viewpoint with the master virtual character as the observation target in a default situation. For example, the camera model is placed directly south of the position of the master virtual character at a height of 10 meters at a distance of 10 meters, and the master virtual character is imaged with an observation direction of 45° diagonally downward. If the position of the master virtual character is (0,0,0), the position of the camera model is (0,-10,10).For example, as shown in Fig. 13, no matter where the master virtual character 302 moves in the virtual environment, the relative position between the camera model 323 and the master virtual character 302 is constant, and the imaging direction of the camera model 323 does not change depending on the orientation of the master virtual character 302. The observation center of the camera model 323 is an intersection 325 between a half line extending from the position of the camera model in an observation direction 324 and the virtual environment, that is, the position of the master virtual character 302. Exemplarily, Fig. 13 is a screen cut out from the virtual environment by the perspective method, and the imaging directions (observation directions) of the camera models seen on the screen are slightly different due to the difference in distance between the two camera models 323 and the perspective point, but the imaging directions (observation directions) of the camera models in the virtual environment are actually the same.
[0075] Exemplarily, in a default situation, the camera model captures an image while following the master virtual character with the master virtual character as the observation center. When the user moves or transforms the viewpoint, the user may manually change the position of the camera model in the virtual environment, or the client may automatically adjust the position of the camera model according to the user's operation (e.g., a skill release operation) to display the virtual environment screen on the client as the user wishes. Exemplarily, the manner of changing the camera model to obtain a different virtual environment screen includes, but is not limited to, changing the horizontal coordinate of the camera model, changing the height of the camera model, and changing the observation direction of the camera model. By changing the horizontal coordinate of the camera model, the observation position of the camera model (observation center in the virtual environment screen) changes, and a different virtual environment screen can be obtained. By changing the horizontal coordinate, only the observation position changes, and the size of the field of view in the virtual environment screen does not change. By changing the height of the camera model, the observation position of the camera model (observation center in the virtual environment screen) does not change, and the size of the field of view changes, and the higher the height of the camera model, the wider the field of view, and the larger the range of the virtual environment displayed on the obtained virtual environment screen. Changing the pitch angle (vertical angle) of the camera model simultaneously changes the observation position and the size of the field of view of the camera model. Changing the deflection angle (horizontal angle) of the camera model changes the observation position of the camera model, but does not change the size of the field of view.
[0076] Illustratively, the present embodiment obtains different virtual environment views by controlling the horizontal coordinate in the virtual environment of the camera model, and displays a more complete directional skill indicator on the virtual environment view.
[0077] Illustratively, the horizontal coordinate of the camera model may be changed and the height of the camera model may be increased to further increase the viewing range of the virtual environment screen.
[0078] Exemplarily, a more complete directional skill indicator may be displayed by changing at least one parameter of the focal length, height, deflection angle, and pitch angle of the camera model. For example, the focal length of the camera model may be used to expand the field of view of the camera model, the height of the camera model may be increased to expand the field of view of the camera model, and the pitch angle or deflection angle of the camera model may be controlled to deflect the directional skill indicator in the direction it points. Exemplarily, the client may display a more complete directional skill indicator on the virtual environment screen by any one or more of the camera model changing methods provided above.
[0079] The offset amount is the distance and direction of movement of the camera model. The offset amount is the distance and direction that the camera model is offset from the default position, and the default position is the position of the camera model in the default situation. Exemplarily, when the camera model is bound to the master virtual character as the imaging target (the position of the master virtual character is the observation center), the default position of the camera model is determined by the position of the master virtual character. Exemplarily, when a rectangular coordinate system parallel to the horizontal plane is created, the offset amount is a directional vector that points from the default position to the position after the offset. For example, when the camera model moves from the default position (0,0) to the second camera position (1,1), the offset amount is (1,1).
[0080] In step 2031-2, the camera model is controlled to move from the first camera position to the second camera position according to the offset amount, and the observation center of the camera model at the first camera position is the first observation position, and the observation center of the camera model at the second camera position is the second observation position.
[0081] Exemplarily, the client changes the horizontal coordinate position of the camera model in the virtual environment according to the offset amount, so that the camera model moves from the first camera position to the second camera position. Exemplarily, the client determines the current offset end position of the camera model based on the offset amount. Exemplarily, the first camera position may be the default position of the camera model, or may be a position where the camera model is offset once. If the first camera position is a position where the camera model is offset, the total offset amount when the camera model is offset to the second camera position is equal to the sum of the first offset amount when the camera model is offset from the default position to the first camera position and the second offset amount when the camera model is offset from the first camera position to the second camera position.
[0082] For example, as shown in FIG. 14, when the directional skill indicator 313 is pointing to the left and the complete directional skill indicator 313 cannot be displayed in the first field of view 327 of the first virtual environment screen acquired when the camera model is located at the first camera position 326, by controlling the camera model to move to the second camera position 328, the complete directional skill indicator 313 is displayed in the second field of view range 329 of the second virtual environment screen acquired at the second camera position 328.
[0083] The first virtual environment view is captured by a camera model at a first camera position, the center of view of which is the first observation position, and the second virtual environment view is captured by a camera model at a second camera position, the center of view of which is the second observation position.
[0084] Illustratively, an offset end point of the camera model can be determined based on the offset amount, and then the camera model is controlled to move gradually from the offset start point to the offset end point according to a preset movement manner, so that the virtual environment screen displayed on the client is not a screen that jumps instantly, but a screen that moves continuously. As shown in FIG. 15, step 2031-2 further includes step 2031-21.
[0085] In step 2031-21, the camera model is controlled to move from the first camera position to the second camera position in a predetermined movement manner according to the offset amount, where the predetermined movement manner includes any one of uniform motion, differential motion, and smooth damping motion.
[0086] For example, in order for the virtual environment screen displayed on the client to have continuity when the camera model is offset, the camera model does not jump directly from the first camera position to the second camera position, but passes through multiple frames of screen while moving from the first camera position to the second camera position, so the client calculates the position to which the camera model should move on the screen for each frame using a different movement method, and obtains the screen for that frame using the camera model at that position.
[0087] Exemplarily, the movement method may be a constant speed movement that controls the camera model to move to the second camera position at a constant speed. For example, if the offset amount of the camera model is 10 meters and the client needs to control the camera model to move to the target position after 100 frames of the screen, the camera model needs to move 0.1 meters for each frame of the screen.
[0088] Exemplarily, the movement method may be differential movement. Differential movement determines the position of the camera model on the screen of each frame based on the current position, the target position, and the movement ratio of the camera model. For example, if the movement ratio is 0.1, the client calculates the difference between the position of the camera model on the screen of the previous frame and the target position, and then controls the camera model to move toward the target position by a distance of 0.1 times the difference. If the target position is 10 and the current position is 0, the camera model moves 10*0.1=1 in the next frame to reach a position of 1, moves (10-1)*0.1=0.9 in the next frame to reach a position of 1.9, and moves (10-1.9)*0.1=0.81 in the next frame to reach a position of 2.71. When moving in this manner, the camera model never reaches the target position, but only approaches infinity. Therefore, the movement ratio may be set to change from 0 to 1, and when the movement ratio is set to 1, the camera model moves to the target position. Differential motion is motion that determines a movement distance based on a distance difference and a movement ratio.
[0089] Exemplarily, the movement method may be a smooth damping movement. The smooth damping movement is a movement that determines a movement distance based on a predetermined movement time and a smoothing function. The smoothing function is a black box function. The smoothing function is a function similar to a spring damper.
[0090] For example, the client may control the movement of the camera model using different movement methods for different skills (such as the size of the directional skill indicator, the amount of offset, etc.) or may control the movement of the camera model using a movement method selected by the user.
[0091] At step 2031-3, a second virtual environment view including a directional skill indicator is displayed with the camera model at a second camera position.
[0092] Exemplarily, after the camera model moves to a second camera position, the client determines the view of the virtual environment captured by the camera model as the second virtual environment view.
[0093] To summarize the above, in the method provided by this embodiment, when the directional skill indicator cannot be completely displayed on the virtual environment screen, the observation center of the virtual environment screen is moved, so that the directional skill indicator can be displayed more completely, and the directional skill indicator can attack the target accurately; further, the target aiming time is reduced, and the client is prevented from performing many invalid calculations during aiming, thereby improving the operating efficiency of the client and improving the man-machine interaction efficiency when the directional skill indicator is aiming at the target.
[0094] The method provided by this embodiment further calculates the offset amount of the camera model to accurately control the movement of the camera model, so that the camera model can be accurately moved to the target camera position, control the movement of the observation center of the virtual environment screen, and display a complete directional skill indicator on the virtual environment screen, contributing to improving the accuracy of skill release, reducing invalid calculations during client aiming, and improving the man-machine interaction efficiency of skill aiming.
[0095] In the method provided by this embodiment, the camera model is further controlled to move from the first camera position to the second camera position in different movement manners, so that the virtual environment screen displayed on the client becomes a continuously moving screen, and the user is prevented from feeling dizzy due to the virtual environment screen jumping too quickly.
[0096] Illustratively, the embodiment of the present application includes two offset calculation methods: The first method calculates the offset of the camera model based on the view judgment box.
[0097] 16 shows a flow chart of a method for displaying a screen of a virtual environment provided according to one exemplary embodiment of the present application. The method may be performed by a client running on any one of the terminals in FIG. 1 above. The client supports the virtual environment. According to the exemplary embodiment shown in FIG. 12, step 2031-1 includes step 2031-11.
[0098] In step 2031-11, in response to the directional skill indicator exceeding a first field of view judgment box centered on the first observation position, an offset amount for the camera model is obtained based on the distance the directional skill indicator exceeds the first field of view judgment box.
[0099] The offset amount is calculated using a field of view judgment box to indicate the field of view of the camera model.
[0100] Exemplarily, the field of view judgment box is for indicating the field of view range of the virtual environment screen displayed on the user interface. Exemplarily, the field of view judgment box is defined according to the field of view range of the virtual environment screen displayed on the display of the terminal. Exemplarily, the field of view judgment box is for encircling the area range currently displayed in the virtual environment in the virtual environment. For ease of calculation, the field of view judgment box is generally rectangular, and the aspect ratio of the rectangle is determined according to the aspect ratio of the user interface or the aspect ratio of the display. Exemplarily, when the user interface has a part of a UI widget that covers the virtual environment screen, the shape of the field of view judgment box may be set according to the shape of the UI widget. For example, as shown in FIG. 6, when the minimap 321 covers a part of the virtual environment screen, the square of the minimap may be removed from the rectangle to obtain a polygonal field of view judgment box. Exemplarily, the field of view judgment box is a rectangular box that is reduced in proportion to the user interface or the display, and the reduction ratio may be set arbitrarily. By setting a field of view determination box that is smaller than the virtual environment screen, UI widgets in the virtual environment screen are excluded from the field of view range, and the field of view range described by the field of view determination box can be more accurately described. For example, as shown in FIG. 17, the field of view determination box 330 is slightly smaller than the virtual environment screen.
[0101] Exemplarily, the field of view judgment box is a rectangular box arranged in the 3D virtual environment and not displayed on the virtual environment screen. That is, the user does not see the field of view judgment box on the virtual environment screen. Exemplarily, the field of view judgment box is parallel to the horizontal plane centered on the observation position of the current camera model, and the border is perpendicular / parallel to the observation direction of the camera model. That is, the field of view judgment box is a projection area of the virtual environment screen defined on the ground of the virtual environment.
[0102] For example, a visual field judgment box having a center point at the first observation position is referred to as a first visual field judgment box, and a visual field judgment box having a center point at the second observation position is referred to as a second visual field judgment box.
[0103] Exemplarily, when the directional skill indicator exceeds the first field of view judgment box, the client determines that the complete directional skill indicator cannot be displayed on the virtual environment screen, and further determines an offset amount of the camera model based on the distance by which the directional skill indicator exceeds the first field of view judgment box. For example, when the directional skill indicator exceeds the field of view judgment box by 1 meter, the client controls the camera model to move by 1 meter in the first direction, so that the directional skill indicator can be included within the field of view judgment box, and the user can see the complete directional skill indicator on the virtual environment screen.
[0104] 18, a method for obtaining an offset amount by a field of view judgment box is provided, and step 2031-11 further includes steps 401 to 403. A method for controlling a camera model to return an offset by a field of view judgment box is further provided, and further includes steps 501 to 503 after step 2031-3.
[0105] In step 401, an offset calculation point of a directional skill indicator is obtained, which is determined based on an end of the directional skill indicator.
[0106] The offset calculation point is for determining the relative positional relationship between the directional skill indicator and the field of view judgment box. Exemplarily, an arbitrary point on the skill indicator is selected as a reference point (offset calculation point) for determining whether the directional skill indicator has exceeded the field of view judgment box. When the offset calculation point is outside the field of view judgment box, the distance by which the directional skill indicator has exceeded the field of view judgment box is further calculated based on the offset calculation point. Exemplarily, the offset calculation point is a point at or near the end of the directional skill indicator. Exemplarily, when the skill of the directional skill indicator is a skill that is released on all maps, a point where the directional skill indicator does not have an end and the distance from the starting point (observation center point) is a fixed value may be selected as the offset calculation point. Alternatively, it may be understood that the end of the directional skill indicator is an intersection point with the boundary of the virtual environment, and a point where the distance from the end is a fixed value is selected as the offset calculation point.
[0107] Exemplarily, as shown in FIG. 17, the end 331 of the directional skill indicator 313 is determined as the offset calculation point.
[0108] In step 402, in response to the offset calculation point being outside the first field of view judgment box, an excess distance that the offset calculation point has exceeded the first field of view judgment box is calculated.
[0109] For example, if the offset calculation point is outside the first field of view judgment box, a relatively complete directional skill indicator cannot be displayed on the first virtual environment screen.
[0110] The offset amount of the camera model is calculated according to the offset calculation point and the first field of view judgment box. For example, the intersection point of the connecting line between the position of the master virtual character and the offset calculation point and the first field of view judgment box is calculated, the distance from the offset calculation point to the intersection point is calculated, and the distance that the directional skill indicator exceeds the field of view judgment box is obtained, and then the camera model is moved by the corresponding distance in the first direction.
[0111] For example, when a Cartesian coordinate system is created that is parallel to the ground in a direction parallel / perpendicular to the frame of the field of view judgment box, the frame of the field of view judgment box is represented by four straight lines in the format of x=a, y=b on the Cartesian coordinate system, and the horizontal and vertical vertical distances from the offset calculation point to the frame of the first field of view judgment box are calculated based on the coordinates of the offset calculation point. For example, when the four frames of the first field of view judgment box are x=-2, x=2, y=1, y=-1, and the coordinates of the offset calculation point are (3,4), the vertical offset distance from the offset calculation point to the first field of view judgment box is 4-1=3, the horizontal offset distance is 3-2=1, and the excess distance is represented by a vector as (1,3), in this case, the client can control the camera model to move (1,3) to reach the second camera position.
[0112] In step 403, the excess distance is determined as an offset amount for the camera model.
[0113] The client calculates a second camera position according to the first camera position and the offset amount, taking the excess distance calculated in step 402 as the offset amount of the camera model. Exemplarily, when the offset amount is a direction vector, the second camera position is obtained by adding the offset amount to the first camera position.
[0114] In step 501, in response to receiving a second directional command generated by a second directional operation, a directional skill indicator is displayed to change from a state pointing in the first direction to a state pointing in the second direction.
[0115] Illustratively, when the camera model is offset to the second camera position by the directional skill indicator pointing to the first direction, the user controls the directional skill indicator to point to the second direction. The offset calculation point of the directional skill indicator pointing to the first direction intersects with the second field of view judgment box, and the directional skill indicator pointing to the second direction is within the second field of view judgment box. In other words, when the directional skill indicator does not exactly abut the boundary of the user's field of view range, the client needs to control the position of the camera model to be pulled back to the default position so that the directional skill indicator always exactly abuts the boundary of the user's field of view range until the camera model returns to the default position.
[0116] For example, as shown in Fig. 19, the directional skill indicator is changed from a state originally pointing in the first direction 333 to a state pointing in the second direction 334, so that the offset calculation point is changed from a state just abutting the border of the second field of view judgment box 332 to a state inside the second field of view judgment box 332. Alternatively, the directional skill indicator retracts in the direction 335 and the length is shortened, so that the offset calculation point is inside the second field of view judgment box 332. In this way, the client needs to control the camera model to return to the default position so that the offset calculation point is always located on the border of the field of view judgment box until the camera model returns to the default position.
[0117] In step 502, in response to the offset calculation point of the directional skill indicator pointing in the second direction being within a second field of view judgment box, the camera model is controlled to move from the second camera position in the direction of the default camera position to reach a third camera position, the second field of view judgment box being a field of view judgment box having the second observation position as its center point, and the default camera position being the position of the camera model in the virtual environment when the camera model is not offset.
[0118] Exemplarily, in response to the offset calculation point of the directional skill indicator pointing in the second direction being again within the second field of view judgment box, the camera model is controlled to move from the second camera position toward the default camera position and reach the third camera position. In other words, when the directional skill indicator is changed from a state pointing in the first direction to a state pointing in the second direction, if the end of the directional skill indicator does not abut against the second field of view judgment box and returns to within the second field of view judgment box, the camera model is controlled to be pulled back toward the default camera position.
[0119] Exemplarily, the default camera position is the default position. When the offset calculation point is within the second field of view judgment box, the offset calculation point is within the second field of view judgment box and is not on the border of the second field of view judgment box.
[0120] Illustratively, the client stops moving the camera position when it controls the camera position to retract to the default camera position until the offset calculation point again abuts against the border of the field of view determination box at the current position or until the camera model returns to the default camera position.
[0121] For example, as shown in Fig. 19, when the offset calculation point is within the second field of view judgment box, the camera model is controlled to move to the default position until the camera model moves to the third camera position. Therefore, as shown in Fig. 20, the offset calculation point abuts against the frame line of the third field of view judgment box 336 again.
[0122] In step 503, a third virtual environment view including a directional skill indicator is displayed with the camera model at a third camera position.
[0123] Here, the observation center of the camera model at the third camera position is the third observation position, the offset calculation point of the directional skill indicator in the third virtual environment screen intersects with the boundary line of the third field of view judgment box, and the third field of view judgment box is a field of view judgment box having the third observation position as its center point.
[0124] For example, when the offset calculation point of the directional skill indicator pointing in the third direction exceeds the second field of view judgment box, the calculation of the offset amount of the camera model according to the above method is continued. By continuing to control the camera model to be offset outward, the offset calculation point does not exceed the field of view judgment box.
[0125] Illustratively, when the user controls the master virtual character to release a skill or when the user cancels the aim operation, the client zeros the offset amount of the camera model and controls the camera model to return to the default camera position.
[0126] To summarize, the method provided by this embodiment places a field of view judgment box in the virtual environment, and determines the offset amount by which the camera model moves based on the vertical distance that the directional skill indicator exceeds the field of view judgment box, thereby accurately controlling the movement of the camera model to the target camera position, avoiding the display of the directional skill indicator being obscured by the UI widget, and allowing the directional skill indicator to be fully displayed on the virtual environment screen, contributing to improving the accuracy of skill release, reducing the target aiming time, preventing the client from performing many invalid calculations during aiming, and improving the operating efficiency of the client, as well as improving the man-machine interaction efficiency of skill aiming.
[0127] The method provided by this embodiment further arranges a field of view judgment box, and controls the movement of the camera model according to the positional relationship between the directional skill indicator and the field of view judgment box, so that the observation center of the virtual environment screen can move more flexibly according to the directional skill indicator, and quickly display the complete directional skill indicator on the virtual environment screen, thereby avoiding the client from performing many invalid calculations during aiming, and improving the operating efficiency of the client.
[0128] The method provided by this embodiment further pulls back the camera model by controlling the camera model to move to the default camera position before offsetting when the end of the directional skill indicator is within the field of view judgment box and does not intersect with the frame. Thus, the end of the directional skill indicator always intersects the edge of the field of view judgment box until the camera model returns to the default camera position. This controls the camera model to achieve a "spring"-like offset or retract effect according to the original position of the directional skill indicator on the virtual environment screen, improving the consistency when the camera model is offset when the directional skill indicator moves.
[0129] In the second method, the offset of the camera model is calculated based on a first direction, which is the direction in which the directional skill indicator is pointing.
[0130] FIG. 21 shows a flow chart of a method for displaying a screen of a virtual environment provided according to one exemplary embodiment of the present application. The method may be performed by a client running on any one of the terminals in FIG. 1 above. The client supports the virtual environment. According to the exemplary embodiment shown in FIG. 12, step 2031-1 includes step 2031-12.
[0131] In step 2031-12, in response to the length of the directional skill indicator being greater than the distance threshold, an offset amount for the camera model is obtained according to a first direction and a fixed offset distance, the fixed offset distance being an arbitrary value.
[0132] The offset amount is calculated based on the first direction. The fixed offset distance is a preset offset distance. For example, if the fixed offset distance is 10 meters, the client directly controls the camera model to move 10 meters in the first direction according to the first direction indicated by the directional skill indicator to reach the second camera position.
[0133] 22, step 2031-12 further includes steps 601 to 603. For example, in order to more accurately control the offset distance in each direction of the camera model, a fixed offset distance is set in each of the four directions, ie, up, down, left and right.
[0134] In step 601, in response to the length of the directional skill indicator being greater than the distance threshold, a first angle between the first direction and the x-axis of a ground coordinate system is obtained, the ground coordinate system being a rectangular coordinate system parallel to the ground that is created based on the observation direction of the camera model with the position of the master virtual character as its origin.
[0135] By way of example, the ground coordinate system is a Cartesian coordinate system that has the position of the master virtual character as its origin, the rightward direction perpendicular to the observation direction of the camera model as the positive part of the x-axis, and the forward direction parallel to the observation direction as the positive part of the y-axis, and is parallel to the ground (horizontal plane) of the virtual environment.
[0136] Exemplarily, the first angle is an angle between the first direction and the horizontal direction. The horizontal direction is a direction perpendicular to the viewing direction of the camera model and parallel to a horizontal plane. Exemplarily, the value of the first angle is in the range of 0° to 90°. Exemplarily, the value of the first angle may be in the range of 0° to 360°, but the corresponding sine and cosine values need to take absolute values.
[0137] For example, as shown in FIG. 23, within the virtual environment screen, there is a first angle α between a first direction pointed to by the directional skill indicator 313 and the horizontal direction.
[0138] In step 602, a fixed offset distance corresponding to the first direction is determined based on the quadrant or coordinate axis in which the first direction lies in the ground coordinate system.
[0139] For example, the positive part of the y-axis of the ground coordinate system is the top, the negative part of the y-axis is the bottom, the positive part of the x-axis is the right, and the negative part of the x-axis is the left. When the first direction is located in the first quadrant, it corresponds to the top offset distance and the right offset distance. When the first direction is located in the second quadrant, it corresponds to the top offset distance and the left offset distance. When the first direction is located in the third quadrant, it corresponds to the bottom offset distance and the left offset distance. When the first direction is located in the fourth quadrant, it corresponds to the bottom offset distance and the right offset distance. When the first direction is located in the positive part of the x-axis, it corresponds to the right offset distance. When the first direction is located in the negative part of the x-axis, it corresponds to the left offset distance. When the first direction is located in the positive part of the y-axis, it corresponds to the top offset distance. When the first direction is located in the negative part of the y-axis, it corresponds to the bottom offset distance.
[0140] In step 603, an offset for the camera model is determined based on a fixed offset distance corresponding to the first angle and the first orientation.
[0141] Exemplarily, after obtaining the fixed offset distance corresponding to the first direction, the client may directly control the camera model to move the fixed offset distance. For example, when the fixed offset distance corresponding to the first direction includes a right offset distance of 10 meters and an up offset distance of 10 meters, the offset amount is (10, 10).
[0142] Illustratively, the client may further refine the offset by the sine and cosine values of the first angle.
[0143] Exemplarily, the fixed offset distance includes at least one of a vertical fixed offset distance and a horizontal fixed offset distance. The vertical fixed offset distance includes at least one of a top offset distance and a bottom offset distance. The horizontal fixed offset distance includes at least one of a left offset distance and a right offset distance. As shown in FIG. 24, step 603 further includes steps 6031 to 6033.
[0144] In step 6031, in response to the fixed offset distances corresponding to the first direction including a vertical fixed offset distance, the product of the vertical fixed offset distance and the sine of the first angle is determined as the vertical offset distance.
[0145] If the fixed offset distance corresponding to the first direction includes a vertical fixed offset distance, such as a top offset distance or a bottom offset distance, the client obtains the vertical offset distance of the camera model by multiplying the vertical fixed offset distance by the sine value of the first angle.
[0146] In step 6032, in response to the fixed offset distances corresponding to the first direction including a lateral fixed offset distance, a product of the lateral fixed offset distance and the cosine value of the first angle is determined as the lateral offset distance.
[0147] When the fixed offset distance corresponding to the first direction includes a lateral fixed offset distance, such as a left offset distance or a right offset distance, the client obtains the lateral offset distance of the camera model by multiplying the lateral fixed offset distance by the cosine value of the first angle.
[0148] In step 6033, at least one of the horizontal offset distance and the vertical offset distance is determined as the offset amount of the camera model.
[0149] For example, as shown in FIG. 23, if the first angle is 30°, the first direction points to the upper right, the top offset distance is preset as 4, and the right offset distance is preset as 2, then the horizontal offset distance=2*cos30°≒1.732, and the vertical offset distance=4*sin30°=2, and therefore the offset amount of the camera model is (1.732, 2).
[0150] Also, for example, as shown in FIG. 25, if the first angle is 0°, the first direction points to the right, and the right offset distance is preset as 4, then the horizontal offset distance = 4*cos0° = 4, the vertical offset distance = 4*sin0° = 0, and the offset amount of the camera model is (4,0).
[0151] To sum up, the method provided by this embodiment sets an offset distance in a predetermined direction for each skill, and when the skill is released, the offset amount of the camera model is determined based on the product of the trigonometric function value (sine value or cosine value) corresponding to the angle between the skill release direction and the horizontal direction and the offset distance, so that the camera model is accurately offset in the skill release direction according to the offset amount, and a more complete directional skill indicator can be displayed on the virtual screen, which contributes to improving the accuracy of skill release. At the same time, it reduces invalid calculations during the client's aiming and improves the operating efficiency of the client.
[0152] For illustrative purposes, an exemplary embodiment will be described in which the camera model is offset by a combination of two offset methods: moving the position of the camera model by another method and moving the position of the camera model based on a directional skill indicator.
[0153] FIG. 26 shows a flow chart of a method for displaying a screen of a virtual environment provided according to one exemplary embodiment of the present application. The method may be performed by a client running on any one of the terminals in FIG. 1 above. The client supports the virtual environment. According to the exemplary embodiment as shown in FIG. 12, step 2031-1 includes step 2031-13 and step 2031-14.
[0154] In step 2031-13, a skill offset amount and a global offset amount for the camera model are obtained, the skill offset amount being determined based on a control command for a directional skill indicator, and the global offset amount being determined based on at least one camera control command among a map drag command, a minimap check command, and a virtual unit viewpoint designation command.
[0155] The skill offset amount is an offset amount calculated by at least one of the two offset amount calculation methods provided by the above embodiment. The skill offset amount is used to measure an offset amount generated when a complete directional skill indicator is displayed on the virtual environment screen. For example, as shown in FIG. 27, the skill offset amount includes an offset amount calculated by a frame abutment offset 701 method, an offset amount calculated by a direct offset 702 method, and an offset amount calculated by a designated offset 703 method. The frame abutment offset 701 is an offset amount calculated based on the field of view judgment box. The direct offset 702 is an offset amount calculated based on a first direction and a fixed offset distance. The designated offset 703 is a specific offset method created for some specific skills. For example, as shown in FIG. 28, when the action range of the skill is a fan shape, the skill indicator 704 is displayed in a fan shape. The designated offset may always cause the boundary of the fan shape to meet or intersect with the boundary of the virtual environment screen when the user aims the skill indicator 704.
[0156] The global offset amount is an offset amount generated by other operations capable of controlling the positional movement of the camera model. For example, as shown in FIG. 29, the global offset amount is generated by means including dragging the map or minimap 705, switching to a teammate's viewpoint after death 706, fixing the lens at a certain unit in the map 707, and bullet tracking 708. For example, the user switches the viewpoint by dragging the map or minimap. Continue observing the virtual environment from a teammate's viewpoint after the death of the master virtual character. Lock the viewpoint to a certain three-dimensional model in the virtual environment such as a defense tower, crystal, grass, or ground. Make the viewpoint of the camera model follow the bullets fired.
[0157] Illustratively, the client uses two separate calculation modules to calculate the skill offset amount and the global offset amount of the camera model respectively, and finally sums the two offset amounts calculated by the two calculation modules to obtain the final offset amount of the camera model, and then controls the offset of the camera model according to the finally obtained offset amount.
[0158] In step 2031-14, the sum of the skill offset amount and the global offset amount is determined as the offset amount of the camera model.
[0159] In summary, in the method provided by this embodiment, the final offset amount of the camera model, i.e., the final position of the camera model, is determined based on the combination of the offset amounts of the camera model corresponding to the global offset method and the skill offset method, so that the offset effects of the camera model generated by different operations are calculated separately, which simplifies the calculation and reduces the possibility of calculation errors. At the same time, the movement of the camera model is controlled according to different offset amounts, which reduces the invalid calculation during the aiming of the client and improves the operation efficiency of the client.
[0160] FIG. 30 shows a flowchart of a screen display method of a virtual environment provided by one exemplary embodiment of the present application. The method may be executed by a client operating on any one of the terminals in FIG. 1 above. The client supports the virtual environment. First, in step 801, a user uses a skill to control a master virtual character to actively aim according to a directional skill indicator displayed on a virtual environment interface. Then, in step 802, the client displays a more complete directional skill indicator on the virtual environment screen by controlling the movement of a lens aiming point (camera model) according to the directional skill indicator. Finally, in step 803, the client controls the lens to return when the skill is successfully released or the user cancels the release of the skill.
[0161] FIG. 31 shows a schematic diagram of an algorithm module for implementing the virtual environment screen display method provided by one exemplary embodiment of the present application.
[0162] CameraActionUtils 804 is a lens module toolset for providing an interface for operating the lens to the outside world, and the operations include operations such as moving, rotating, and lifting the lens.
[0163] A Camera Controller 805 is a lens controller that manages various data of the camera (lens) and provides each interface inside the lens module.
[0164] CameraAction 806 is a lens scheme for providing a motion scheme for the camera model, including differential movement, smooth damped motion, uniform motion, etc.
[0165] The MoveComponent processes the lens offset, obtains scheme parameters from the CameraAction, and moves the lens (camera model) for each frame until the end point is reached. Exemplarily, the MoveComponent includes a LocalMoveComponent 807 and a GlobalMoveComponent 808. The LocalMoveComponent is for controlling the movement of the skill offset amount, and the GlobalMoveComponent is for controlling the movement of the global offset amount.
[0166] SetLocalPosOff(return to trajectory) 809 is for controlling the offset based on the skill offset amount to return to the default camera position.
[0167] SetGlobalPosOff (global return) 810 is for controlling the offset based on the global offset amount to return to the default camera position.
[0168] Illustratively, in the method for displaying a virtual environment screen provided by this embodiment, a waiting time occurs each time the position of the camera model moves, and after the waiting time has elapsed, the camera model is controlled to move. FIG. 32 shows a flowchart of a method for displaying a virtual environment screen provided by one exemplary embodiment of the present application. The method may be executed by a client operating on any one of the terminals in FIG. 1 above. The client supports the virtual environment. In step 811, the client waits for an input of an offset and waits for a user's operation to call up a directional skill indicator. In step 812, the client confirms that an offset of the camera model is required and waits for a delay time for the offset. In step 813, after the delay time has elapsed, the client controls the camera model to be offset. In step 814, the client confirms that a return of the camera model is required and waits for a delay time for the return. In step 815, after the delay time has elapsed, the client controls the camera model to be returned and waits for an input of an offset again.
[0169] To summarize, in the method provided by this embodiment, a delay time is added before controlling the camera model to be offset, so that when a camera model offset is required, the camera model is not immediately controlled to be offset, and a visual buffer time is ensured to achieve a good screen effect.
[0170] In the above embodiment, the above method has been described based on a game application scene. Below, the above method will be described by way of example based on a military simulation application scene.
[0171] Simulation technology is a modeling technology that reflects the operation and process of a system through experiments that simulate the real world using software and hardware.
[0172] Military simulation programs are programs specially constructed for military purposes using simulation technology. They accurately simulate the battlefield environment by quantifying and analyzing operational elements of sea, land, and air, the performance of weapons and equipment, and operational actions, and provide operational system evaluation and decision-making assistance.
[0173] In one example, a soldier creates a virtual battlefield on a terminal on which a military simulation program is installed, and plays against a team. The soldier controls virtual objects in the battlefield virtual environment to perform at least one of the following actions in the battlefield virtual environment: standing, crouching, sitting, lying on one's back, lying on one's stomach, lying on one's side, walking, running, climbing, driving, shooting, throwing, attacking, wounding, scouting, and close combat. The battlefield virtual environment includes at least one natural form of plains, mountains, plateaus, basins, deserts, rivers, lakes, oceans, and vegetation, and location forms such as buildings, vehicles, ruins, and training grounds. The virtual objects include virtual people, virtual animals, anime characters, and the like, and each virtual object has its own shape and volume in the three-dimensional virtual environment and occupies a part of the space in the three-dimensional virtual environment.
[0174] Based on the above situation, in one example, soldier A controls the master virtual character a to act in the virtual environment, and when soldier A controls the master virtual character a to aim in a first direction, a direction indicator corresponding to the aiming operation is displayed on the virtual environment screen. When the direction indicator exceeds the current display range of the virtual environment screen, the camera model is controlled to move a certain distance in the aiming direction, thereby displaying a more complete direction indicator on the virtual environment screen. When soldier A cancels the aiming operation or releases the skill, the military simulation program controls the camera model to gradually return to a default position. Exemplarily, the default position is a position corresponding to the observation center when the master virtual character a is the observation center.
[0175] To sum up, in this embodiment, when the virtual environment screen display method is applied to a military simulation program, a complete directional skill indicator can be displayed on the virtual environment screen, which can improve the aiming accuracy and provide better training for soldiers, while reducing the invalid calculations during the aiming of the client of the military simulation program, and improving the operating efficiency of the client.
[0176] The following provides an embodiment of the apparatus of the present application, and for details not described in detail in the embodiment of the apparatus, reference can be made to the above embodiment of the method.
[0177] FIG. 33 is a block diagram of a display device for a virtual environment provided by one exemplary embodiment of the present application. The device includes: a display module 901 for displaying a first virtual environment screen, the first virtual environment screen being a screen obtained by observing the virtual environment with a first observation position as an observation center, the first virtual environment screen displaying a master virtual character in the virtual environment; an interaction module 902 for receiving a first directed command generated by the first directed operation; the display module 901 is for displaying a directional skill indicator pointing in a first direction in response to receiving a first directional command generated by a first directional operation, the directional skill indicator being a directional mark pointing in the first direction starting from the position of the master virtual character; The display module 901 is for displaying a second virtual environment screen, which is a screen obtained by observing the virtual environment with a second observation position as the observation center, and includes a directional skill indicator, and the second observation position is in a first direction of the first observation position or in a peripheral area of the first direction.
[0178] In one optional embodiment, the display module 901 is for displaying a second virtual environment view in response when a length of the directional skill indicator is greater than a distance threshold, the distance threshold being a field of view threshold in a first direction originating from a position of the master virtual character in the first virtual environment view.
[0179] In one optional embodiment, the first virtual environment view and the second virtual environment view are views acquired by a camera model disposed in the virtual environment, and the observation center is an intersection point between the virtual environment and a half line extending from the position of the camera model in the observation direction, and the apparatus further comprises: an acquisition module 903 for acquiring an offset amount of a camera model in response to a length of the directional skill indicator being greater than a distance threshold, the offset amount being for determining a moving direction and a moving distance of the camera model; a control module 904 for controlling the camera model to move from the first camera position to the second camera position according to the offset amount, where a viewing center of the camera model at the first camera position is the first viewing position and a viewing center of the camera model at the second camera position is the second viewing position; The display module 901 is for displaying a second virtual environment screen including a directional skill indicator with a camera model at a second camera position.
[0180] In one optional embodiment, the offset is calculated using a field of view determination box to indicate a field of view of the camera model; The acquisition module 903 is for acquiring an offset amount of the camera model based on the distance by which the directional skill indicator exceeds the first field of view judgment box in response to the directional skill indicator exceeding the first field of view judgment box having the first observation position as its center point.
[0181] In one optional embodiment, the apparatus comprises: The acquisition module 903 for acquiring an offset calculation point of a directional skill indicator, the offset calculation point being determined based on an end of the directional skill indicator; a calculation module 905 for calculating an excess distance that the offset-calculation point has exceeded the first field of view judgment box in response to the offset-calculation point being outside the first field of view judgment box; and a determination module 906 for determining the excess distance as an offset amount of the camera model.
[0182] In one optional embodiment, the interaction module 902 is for receiving a second directed command generated by a second directed operation; The display module 901 is for displaying the directional skill indicator to change from a state pointing in the first direction to a state pointing in the second direction in response to receiving a second directional command generated by a second directional operation; The control module 904 is for controlling the camera model to move from the second camera position in the direction of the default camera position to reach the third camera position in response to an offset calculation point of a directional skill indicator pointing in the second direction being within a second field of view judgment box, the second field of view judgment box being a field of view judgment box having the second observation position as a center point, and the default camera position being a position of the camera model in the virtual environment when the camera model is not offset; the display module 901 is for displaying a third virtual environment screen including a directional skill indicator by a camera model at a third camera position; The observation center of the camera model at the third camera position is the third observation position, the offset calculation point of the directional skill indicator in the third virtual environment screen intersects with the boundary line of the third field of view judgment box, and the third field of view judgment box is a field of view judgment box having the third observation position as its center point.
[0183] In one optional embodiment, the offset amount is calculated according to a first direction, The acquisition module 903 is for acquiring an offset amount of the camera model according to a first direction and a fixed offset distance in response when the length of the directional skill indicator is greater than a distance threshold, where the fixed offset distance is an arbitrary value.
[0184] In one optional embodiment, the apparatus comprises: said acquisition module 903 for acquiring a first angle between a first direction and an x-axis of a ground coordinate system, the ground coordinate system being a rectangular coordinate system parallel to the ground created based on a viewing direction of a camera model with the position of the master virtual character as the origin; and a determination module 906 for determining a fixed offset distance corresponding to the first direction based on a quadrant or coordinate axis in which the first direction is located in the ground coordinate system; The determining module 906 is for determining an offset amount for the camera model based on a fixed offset distance corresponding to a first angle and a first orientation.
[0185] In one optional embodiment, the fixed offset distance includes at least one of a vertical fixed offset distance and a horizontal fixed offset distance, and the apparatus further comprises: further comprising a calculation module 905 for determining, in response to the fixed offset distance corresponding to the first direction including a lateral fixed offset distance, a product of the lateral fixed offset distance and a cosine value of the first angle as the lateral offset distance; the calculation module 905 is for determining, in response to the fixed offset distances corresponding to the first direction including a vertical fixed offset distance, a product of the vertical fixed offset distance and a sine of the first angle as a vertical offset distance; The determining module 906 is for determining at least one of a horizontal offset distance and a vertical offset distance as an offset amount of the camera model.
[0186] In one optional embodiment, the control module 904 is for controlling the camera model to move from the first camera position to the second camera position in a predetermined movement manner according to the offset amount, where the predetermined movement manner includes one of uniform motion, differential motion, and smooth damping motion.
[0187] In one optional embodiment, the apparatus comprises: The acquisition module 903 is for acquiring a skill offset amount and a global offset amount of a camera model, the skill offset amount being determined based on a control command of a directional skill indicator, and the global offset amount being determined based on at least one camera control command among a map drag command, a minimap check command, and a virtual unit viewpoint designation command; The determination module 906 further includes a sum of the skill offset amount and the global offset amount as an offset amount of the camera model.
[0188] The present application further provides a terminal including a processor and a memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to realize the method for displaying a screen of a virtual environment provided by each of the embodiments of the above methods. The terminal may be a terminal as shown in FIG.
[0189] 34 shows a block diagram of the structure of a terminal 2900 provided by one exemplary embodiment of the present application. The terminal 2900 may be a smartphone, a tablet PC, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal 2900 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.
[0190] In general, the terminal 2900 includes a processor 2901 and a memory 2902 .
[0191] The processor 2901 may include one or more processing cores, for example, a 4-core processor, an 8-core processor, etc. The processor 2901 may be realized in the form of at least one of hardware among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2901 may include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, and is also called a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2901 may incorporate a GPU (Graphics Processing Unit) for rendering and drawing content that needs to be displayed on a display. In some embodiments, the processor 2901 may include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
[0192] The memory 2902 may include one or more computer readable storage media. The computer readable storage media may be non-transitory. The memory 2902 may further include non-volatile memory, such as high speed random access memory, one or more magnetic disk storage devices, flash memory storage devices, etc. In some embodiments, the non-transitory computer readable storage media in the memory 2902 is for storing at least one instruction, which, when executed by the processor 2901, is for implementing a method for displaying a screen of a virtual environment provided by an embodiment of the method of the present application.
[0193] In some embodiments, the terminal 2900 may optionally further include a peripheral interface 2903 and at least one peripheral device. The processor 2901, the memory 2902, and the peripheral interface 2903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral interface 2903 via a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 2904, a touch display 2905, a camera unit 2906, an audio circuit 2907, a positioning unit 2908, and a power supply 2909.
[0194] The peripheral interface 2903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 2901 and the memory 2902. In some embodiments, the processor 2901, the memory 2902, and the peripheral interface 2903 are integrated on the same chip or circuit board. In some other embodiments, either or both of the processor 2901, the memory 2902, and the peripheral interface 2903 may be implemented on separate chips or circuit boards, although this is not a limitation of the present embodiments.
[0195] The radio frequency circuit 2904 is for transmitting and receiving RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 2904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 2904 converts electrical signals into electromagnetic signals for transmission or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 2904 includes an antenna system, an RF transceiver, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, SIM cards, etc. The radio frequency circuit 2904 may communicate with other terminals via at least one wireless communication protocol, including but not limited to the World Wide Web, metropolitan area networks, intranets, mobile communication networks of various generations (2G, 3G, 4G, and 5G), wireless LANs, and / or wireless fidelity (WiFi) networks. In some embodiments, the radio frequency circuitry 2904 may include circuitry related to Near Field Communication (NFC), although this application is not limited thereto.
[0196] The display 2905 is for displaying a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. If the display 2905 is a touch display, the display 2905 also has the function of collecting touch signals on or above its surface. The touch signals may be input as control signals to the processor 2901 for processing. In this case, the display 2905 may be used to provide virtual buttons and / or a virtual keyboard, also called soft buttons and / or a soft keyboard. In some embodiments, the display 2905 may include one display 2905 provided on a front panel of the terminal 2900. In some other embodiments, the display 2905 may include at least two displays 2905, each provided on a different surface of the terminal 2900 or designed to be folded. In still other embodiments, the display 2905 may be a flexible display provided on a curved or folding surface of the terminal 2900. Furthermore, the display 2905 may be a non-rectangular irregularly shaped, i.e., irregularly shaped screen. Display 2905 may be manufactured from materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
[0197] In some embodiments, the computing device 2900 further includes one or more sensors 2910, including, but not limited to, an acceleration sensor 2911, a gyro sensor 2912, a pressure sensor 2913, a fingerprint sensor 2914, an optical sensor 2915, and a proximity sensor 2916.
[0198] The pressure sensor 2913 may be provided on the side frame of the computer device 2900 and / or the lower layer of the touch display 2905. When the pressure sensor 2913 is provided on the side frame of the computer device 2900, a gripping signal by the user to the computer device 2900 can be detected, and the gripping signal can be used to identify left / right hand or perform shortcut operations. When the pressure sensor 2913 is provided on the lower layer of the touch display 2905, a pressure operation by the user to the touch display 2905 can be used to realize control of an operable widget in the UI interface. The operable widget includes at least one of a button widget, a scrollbar widget, an icon widget, and a menu widget.
[0199] Those skilled in the art will appreciate that the structure shown in FIG. 34 is not intended to limit terminal 2900, and that terminal 2900 may include more or fewer components than those shown in the figure, or may combine some components, or may employ a different arrangement of components.
[0200] The memory further includes one or more programs stored in the memory, the one or more programs including those for executing a screen display method for a virtual environment provided by an embodiment of the present application.
[0201] The present application provides a computer-readable storage medium having at least one instruction stored thereon, the at least one instruction being loaded and executed by the processor to realize a method for displaying a screen of a virtual environment as provided by each of the embodiments of the above methods.
[0202] The present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium, the computer instructions being read by a processor of a computing device from the computer readable storage medium and executed by the processor to cause the computing device to perform the method for displaying a screen of a virtual environment provided by any of the above method embodiments. [Explanation of symbols]
[0203] 901 Display module 902 Interaction Module 903 Acquisition Module 904 Control Module 905 Calculation Module 906 Decision Module
Claims
1. A method for displaying a screen of a virtual environment executed by a client, comprising: a step of displaying a first virtual environment view, the first virtual environment view being a view obtained by observing the virtual environment with a first observation position as an observation center, the first virtual environment view displaying a master virtual character in the virtual environment; In response to receiving a first directional command generated by a first directional operation, a step of displaying a directional skill indicator pointing in a first direction, the directional skill indicator being a directional mark pointing in the first direction starting from a position of the master virtual character; displaying a second virtual environment screen, the second virtual environment screen being a screen obtained by observing the virtual environment with a second observation position as an observation center, the second virtual environment screen including the directional skill indicator, the second observation position being in the first direction of the first observation position or in a peripheral area of the first direction; The end of the directional skill indicator is the farthest action distance of the skill, the second virtual environment screen displays the end of the directional skill indicator. A method for displaying a screen in a virtual environment.
2. The method described in claim 1, wherein the first virtual environment screen and the second virtual environment screen are screens of the virtual environment obtained by a camera model set in the virtual environment, the observation center of the camera model located at a first camera position is a first observation position, the observation center of the camera model located at a second camera position is a second observation position, and the second camera position is obtained by changing only the horizontal coordinate position of the camera model in the virtual environment.
3. The step of displaying the second virtual environment screen comprises:
2. The method of claim 1, further comprising: displaying the second virtual environment view in response to a length of the directional skill indicator being greater than a distance threshold, the distance threshold being a field of view threshold in the first direction from a position of the master virtual character within the first virtual environment view.
4. The first virtual environment screen and the second virtual environment screen are screens acquired by a camera model placed in the virtual environment, and the observation center is an intersection point between a half line extending from the position of the camera model in an observation direction and the virtual environment, displaying the second virtual environment view in response to a length of the directional skill indicator being greater than a distance threshold, acquiring an offset of the camera model in response to a length of the directional skill indicator being greater than the distance threshold, the offset being for determining a direction and distance of movement of the camera model; a step of controlling the camera model to move from a first camera position to a second camera position according to the offset amount, wherein an observation center of the camera model at the first camera position is the first observation position, and an observation center of the camera model at the second camera position is the second observation position; 4. The method of claim 1, further comprising: displaying the second virtual environment view including the directional skill indicator with the camera model at the second camera position.
5. The offset amount is calculated using a field of view determination box for indicating the field of view of the camera model, The step of acquiring an offset amount of the camera model in response to a length of the directional skill indicator being greater than the distance threshold includes: The method of claim 4, further comprising a step of obtaining the offset amount of the camera model based on the distance by which the directional skill indicator exceeds a first field of view judgment box in response to the directional skill indicator exceeding a first field of view judgment box, the first field of view judgment box being a field of view judgment box having a center point at the first observation position.
6. In response to the directional skill indicator exceeding a first field of view judgment box, the step of acquiring the offset amount of the camera model according to the distance by which the directional skill indicator exceeds the first field of view judgment box comprises: A step of obtaining an offset calculation point of the directional skill indicator, the offset calculation point being determined based on an end of the directional skill indicator; in response to the offset-calculation point being outside the first field of view judgment box, calculating an excess distance that the offset-calculation point exceeds the first field of view judgment box; and determining the excess distance as the offset of the camera model.
7. In response to receiving a second directional command generated by a second directional operation, displaying the directional skill indicator to change from a state pointing in the first direction to a state pointing in a second direction; In response to the offset calculation point of the directional skill indicator pointing to the second direction being within a second field of view judgment box, a step of controlling the camera model to move from the second camera position in a direction toward a default camera position to reach a third camera position, the second field of view judgment box being a field of view judgment box having the second observation position as a center point, and the default camera position being a position of the camera model in the virtual environment when the camera model is not offset; and displaying a third virtual environment view including the directional skill indicator with the camera model at the third camera position; The observation center of the camera model at the third camera position is a third observation position, the offset calculation point of the directional skill indicator in the third virtual environment screen intersects with a boundary line of a third field of view judgment box, and the third field of view judgment box is a field of view judgment box having the third observation position as a center point.
7. The method of claim 6.
8. The offset amount is calculated according to the first direction, The step of acquiring an offset amount for the camera model in response to a length of the directional skill indicator being greater than a distance threshold includes:
5. The method of claim 4, further comprising: in response to a length of the directional skill indicator being greater than the distance threshold, obtaining an offset of the camera model according to the first direction and a fixed offset distance, the fixed offset distance being an arbitrary value.
9. The step of acquiring an offset amount of the camera model according to the first direction and a fixed offset distance includes: acquiring a first angle between the first direction and an x-axis of a ground coordinate system, the ground coordinate system being a rectangular coordinate system parallel to the ground, the coordinate system being created based on a viewing direction of the camera model with the position of the master virtual character as its origin; determining a fixed offset distance corresponding to the first direction based on a quadrant or coordinate axis in which the first direction is located in the ground coordinate system; determining the offset of the camera model based on the fixed offset distance corresponding to the first angle and the first orientation.
10. The fixed offset distance includes at least one of a vertical fixed offset distance and a horizontal fixed offset distance, determining the offset of the camera model based on the fixed offset distance corresponding to the first angle and the first direction, in response to the fixed offset distances corresponding to the first direction including the lateral fixed offset distance, determining a lateral offset distance as a product of the lateral fixed offset distance and a cosine value of the first angle; in response to the fixed offset distances corresponding to the first direction including the longitudinal fixed offset distance, determining a longitudinal offset distance as a product of the longitudinal fixed offset distance and a sine of the first angle; 10. The method of claim 9, further comprising determining at least one of the lateral offset distance and the vertical offset distance as the offset of the camera model.
11. The step of controlling the camera model to move from a first camera position to a second camera position in accordance with the offset amount comprises:
5. The method according to claim 4, further comprising: a step of controlling the camera model to move from the first camera position to the second camera position in a predetermined movement manner according to the offset amount, the predetermined movement manner including any one of uniform motion, differential motion, and smooth damping motion.
12. The step of acquiring an offset amount of the camera model comprises: A step of acquiring a skill offset amount and a global offset amount of the camera model, the skill offset amount being determined based on a control command of a directional skill indicator, and the global offset amount being determined based on at least one camera control command among a map drag command, a minimap check command, and a virtual unit viewpoint designation command; The method according to claim 4 , further comprising the step of determining a sum of the skill offset amount and the global offset amount as an offset amount of the camera model.
13. A screen display device for a virtual environment, which executes a method according to any one of claims 1 to 12.
14. A computer device including a processor and a memory in which at least one instruction, at least one program, code set or instruction set is stored, wherein the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to realize a method for displaying a screen of a virtual environment as described in any one of claims 1 to 12.
15. A computer program that causes a processor to execute the screen display method for a virtual environment described in any one of claims 1 to 12.
Citation Information
Patent Citations
Information processing method and device, electronic equipment and storage medium
CN107754308A
Printer
JP1982067378A
Program, information storage medium and game device
JP2010252932A
Game program
JP2016093361A
Input processing device and program
JP2016126514A
