Method and apparatus for displaying virtual object, device, medium, and computer program
By subdividing the damage effect of virtual items based on object part positions, the method improves the accuracy and efficiency of virtual item interactions in video games, reducing the need for precise positioning and computer overhead.
Patent Information
- Application Number
- JP2023566963
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-05-30
- Filing Date
- 2023-04-20
- Publication Date
- 2025-07-30
- Estimated Expiration
- 2043-04-20
AI Technical Summary
Existing virtual grenade items in video games require precise positioning to effectively damage virtual objects, leading to increased game time and computer overhead due to simple damage mechanisms that only affect objects within a fixed explosion range.
A method and apparatus that subdivides the damage effect of virtual items by analyzing the positional relationship of object parts within the functional range, calculating individual sub-attribute influence results for each part, and synthesizing these to determine the overall attribute influence on the virtual object.
This approach enhances the accuracy and efficiency of virtual item damage by allowing finer granularity in damage calculation, reducing the need for repeated positioning adjustments and minimizing computer overhead.
Smart Images

Figure 0007714855000001 
Figure 0007714855000002 
Figure 0007714855000003
Abstract
Description
Technical Field
[0001] (Cross - reference to related applications) This application claims priority to a Chinese patent application filed on May 30, 2022, with application number 202210614755.5 and invention title "Method and Apparatus, Device, Medium, and Program Product for Displaying Virtual Objects", and all the contents of the Chinese patent application are incorporated herein by reference.
[0002] The embodiments of this application relate to the field of video generation, and in particular, to a method and apparatus, device, medium, and program product for displaying virtual objects.
Background Art
[0003] In applications that support virtual scenes, virtual items that can damage virtual objects are provided, such as virtual grenade items.
[0004] In related technologies, the mechanism by which a virtual grenade item damages a virtual object is as follows. When a virtual grenade item explodes at a specified position within a virtual scene, there is a corresponding explosion range. If a virtual object is within the explosion range, the HP (Health Point) of the virtual object decreases by a corresponding value.
[0005] The damage mechanism of the virtual grenade item in the above - mentioned related technologies is relatively simple. When a virtual object attacks using a virtual grenade item, after throwing the virtual grenade item at a specified throwing position, only the virtual objects located within the explosion range can be damaged. Therefore, the player needs to find an appropriate position to throw the virtual grenade item, resulting in a longer game time and an increase in computer overhead.
Summary of the Invention
Problems to be Solved by the Invention
[0006] An embodiment of the present application provides a method for displaying a virtual object, an apparatus, a device, a medium, and a program product thereof that improve the hit rate of virtual items that affect the virtual object, and the technical solution thereof is as follows.
Means for Solving the Problem
[0007] In one aspect, a method for displaying a virtual object is provided, and the method includes: When a first virtual object throws a virtual item in a virtual scene, triggering a specified function of the virtual item within the functional range of the virtual item, where the specified function is used to affect the attribute value of a virtual object located within the functional range; In response to a second virtual object being located within the functional range, obtaining sub-attribute influence results respectively corresponding to a plurality of object parts of the second virtual object based on the positional relationship between the plurality of object parts and the virtual item, where the sub-attribute influence results are influence results generated by each of the plurality of object parts under the specified function; Fusing the sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, where the attribute influence result indicates the overall influence result of the specified function of the virtual item on the second virtual object.
[0008] In another aspect, a method for displaying a virtual object is provided, and the method includes: Displaying a second virtual object, where the second virtual object includes a plurality of object parts, and the second virtual object is a virtual object controlled by a current terminal; A step of displaying a virtual item thrown into a virtual scene, wherein the virtual item is used to trigger a specified function within a functional range after being thrown into the virtual scene, and the specified function is used to affect an attribute value of a virtual object located within the functional range. A step of displaying the specified function of the virtual item triggered within the functional range. A step of displaying an attribute influence result of a second virtual object in response to the second virtual object being located within the functional range, where the attribute influence result is a result obtained by integrating sub-attribute influence results respectively corresponding to a plurality of object parts, and the sub-attribute influence result is an influence result generated by each of the plurality of object parts under the specified function.
[0009] In another aspect, a display device for a virtual object is provided, and the device includes A trigger module configured to trigger a specified function of the virtual item within a functional range of the virtual item when a first virtual object throws the virtual item in a virtual scene, wherein the specified function is used to affect an attribute value of a virtual object located within the functional range. An acquisition module configured to acquire sub-attribute influence results respectively corresponding to a plurality of object parts based on a positional relationship between the plurality of object parts of the second virtual object and the virtual item in response to the second virtual object being located within the functional range, where the sub-attribute influence result is an influence result generated by each of the plurality of object parts under the specified function. A fusion module configured to fuse the sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, where the attribute influence result indicates an overall influence result of the specified function of the virtual item on the second virtual object.
[0010] In another aspect, a display device for virtual objects is provided, and the device includes: a display module configured to display a second virtual object, the second virtual object including a plurality of object parts, and the second virtual object being a virtual object controlled by a current terminal; the display module is further configured to display a virtual item thrown into a virtual scene, the virtual item being used to trigger a specified function within a functional range after being thrown into the virtual scene, and the specified function being used to affect an attribute value of a virtual object located within the functional range; the display module is further configured to display the specified function of the virtual item triggered within the functional range; the display module is further configured to display an attribute influence result of the second virtual object in response to the second virtual object being located within the functional range, where the attribute influence result is a result obtained by integrating sub-attribute influence results respectively corresponding to a plurality of object parts, and the sub-attribute influence result is an influence result generated by the plurality of object parts respectively under the specified function.
[0011] In another aspect, a computer device including a processor and a memory is provided, where at least one instruction, at least one segment of a program, a code set, or an instruction set is stored in the memory, and the processor loads and executes the at least one instruction, the at least one segment of the program, the code set, or the instruction set to implement the method for displaying a virtual object according to any one of the embodiments of the present application.
[0012] In another aspect, there is provided a computer-readable storage medium storing at least one program code, and when the at least one program code is loaded and executed by a processor, the method for displaying a virtual object according to any one of the embodiments of the present application is implemented.
[0013] In another aspect, there is provided a computer program product or a computer program including computer instructions, where the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads and executes the computer instructions from the computer-readable storage medium to cause the computer device to execute the method for displaying a virtual object according to any one of the embodiments of the present application.
Advantages of the Invention
[0014] The technical solutions according to the embodiments of the present application may include the following beneficial effects.
[0015] The second virtual object includes a plurality of object parts. When the specified function of a virtual item thrown into the virtual scene is triggered within the function range and the second virtual object is within the function range, the virtual item affects each of the plurality of object parts of the second virtual object, thereby obtaining a plurality of sub-attribute influence results. Finally, the plurality of sub-attribute influence results are synthesized to determine the attribute influence result of the virtual item on the second virtual object. By subdividing the attribute influence result of the virtual item on the second virtual object, the granularity of the attribute influence result becomes finer. After the player throws the virtual item at various different positions, the player can apply an attribute influence to the second virtual object, eliminating the need for the player to repeatedly adjust the throwing position and saving the computer overhead for position calculation.
Brief Description of the Drawings
[0016]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Embodiments for Carrying Out the Invention
[0017] Hereinafter, taking the application of the virtual object display method according to the embodiment of the present application to a game scene as an example, an explanation will be given. Taking a shooting game as an example, in the game, virtual character A and virtual character B are in an adversarial relationship. When virtual character B throws a virtual grenade item near virtual character A, the explosion damage of the virtual grenade is triggered. At this time, the game interface of virtual character A displays the explosion video of the virtual grenade. At the same time, the server calculates the specific explosion damage received by virtual character A based on the position of virtual character A in the virtual scene and the explosion position of the virtual grenade item in the virtual scene.
[0018] Exemplarily, referring to FIG. 1, in game interface 100, the second virtual object is virtual character 101, and virtual character 101 includes a plurality of body parts such as both hands, both feet, head, waist, abdomen, and chest. When a virtual grenade item is thrown near virtual character 101, the explosion video of virtual grenade 111 is displayed on game interface 。At this time, since virtual character 112 (the same virtual character as virtual character 101) is within the explosion range of virtual grenade 111, virtual grenade 111 damages virtual character 112. Here, the damage mechanism is as follows. By summing up the sub-damage values of virtual grenade 111 for each body part of virtual character 112, the total damage value to virtual character 112 is determined, and the damage values of virtual grenade 111 for each body part are calculated individually. Optionally, finally, the total damage value 113 of virtual grenade 111 to virtual character 112 is displayed on game interface 110.
[0019] FIG. 2 is a schematic diagram of an implementation environment according to an exemplary embodiment of the present application. As shown in FIG. 2, the implementation environment includes a first terminal 201, a second terminal 202, and a server 210. The first terminal 201 and the server 210 are connected via a communication network 220, and the second terminal 202 and the server 210 are connected via the communication network 220.
[0020] On the first terminal 201, a first application 203 that supports virtual scenes is installed and executed. Optionally, on the first terminal 201, a first account corresponding to a second virtual object is logged in. When the first terminal 201 executes the first application 203, a virtual scene of the first application 203 is displayed on the screen of the first terminal 201, and the first terminal 201 can control the second virtual object. On the second terminal 202, a second application 204 that supports virtual scenes is installed and executed. Optionally, on the second terminal 202, a second account corresponding to a first virtual object is logged in. When the second terminal 202 executes the second application 204, a virtual scene of the second application 204 is displayed on the screen of the second terminal 202, and the second terminal 202 can control the first virtual object. In some alternative embodiments, when the first application 203 executed on the first terminal 201 and the second application 204 executed on the second terminal 202 are the same application, the second virtual object and the first virtual object can be displayed in the same virtual scene. Here, the first application 203 and the second application 204 may be any one of a virtual reality application, a first-person shooting (FPS) game, a third-person shooting (TPS) game, a multiplayer online battle arena game (MOBA), a massive multiplayer online role-playing game (MMORPG), etc., and the embodiments of the present application are not limited thereto.
[0021] Optionally, the first application 203 and the second application 204 provide a control function for virtual items and a display function for virtual objects. Taking as an example that the first application 203 and the second application 204 are the same first-person shooting game and the virtual item is a virtual grenade item, and that the first account and the second account are in the same round of the game match and the first account and the second account are in an adversarial relationship, as shown in FIG. 2: (1) Throwing operation of the virtual grenade item. In the virtual scene 205 of the first-person shooting game executed on the current second terminal 202, a virtual grenade item is provided. The second terminal 202 receives a throwing operation for the virtual grenade item and sends the throwing operation to the server 210. When the server 210 receives the throwing operation for the virtual grenade item, it feeds back the first throwing interface rendering data to the first terminal 201 and the second throwing interface rendering data to the second terminal 202. When the second terminal 202 receives the second throwing interface rendering data, it displays a virtual scene 206 on the interface of the second terminal 202. In the virtual scene 206, a video of the grenade being thrown and an explosion video triggered by the grenade are displayed.
[0022] (2) Display request for the attribute influence result. When the first terminal 201 receives the first throwing interface rendering data, it displays a virtual scene 207 on the interface of the first terminal 201. In the virtual scene 207, an explosion video triggered by the grenade is displayed. At the same time, the first terminal 201 sends a display request for the attribute influence result to the server 210. Here, the display request for the attribute influence result includes the position data of the second virtual object and the virtual grenade item at this time.
[0023] When the server 210 receives a request to display the attribute influence result, it obtains the function range corresponding to the virtual grenade item, and based on the position data of the second virtual object and the virtual grenade item at this time, determines whether the second virtual object is within the explosion range of the virtual grenade item. If the second virtual object is within the explosion range of the virtual grenade item, it respectively obtains the damage data received by multiple object parts of the second virtual object from the virtual grenade item. Finally, it synthesizes the damage data of the virtual grenade item received by multiple object parts of the second virtual object to obtain the total damage data of the virtual grenade item received by the second virtual object, obtains the attribute influence result display data of the second virtual object based on the total damage data, and transmits the attribute influence result display data to the first terminal 201. The first terminal 201 receives the attribute influence result display data and displays a screen 208 where the health value of the second virtual object decreases.
[0024] Optionally, the first terminal 201 and the second terminal 202 are a smartphone, a tablet computer, a desktop computer, a portable laptop computer, smart home appliances, an in-vehicle terminal, an aircraft, etc., but are not limited thereto. In some alternative embodiments, the server 210 is used to provide backend services to applications installed on the first terminal 201 and the second terminal 202. It should be noted that the server 210 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. In some alternative embodiments, the communication network 220 may be a wired network or a wireless network, and the embodiments of the present application are not limited thereto.
[0025] In addition, the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals related to this application are approved by the user or fully approved by all parties, and the collection, use and processing of related data should comply with the relevant laws, regulations and standards in the relevant region. For example, the attribute data related to this application is obtained under full approval.
[0026] Based on the implementation environment introduced above, taking the example of a first virtual object throwing a virtual item in a virtual scene, FIG. 3 is a flowchart of a method for displaying a virtual object according to an embodiment of the present application. This method will be described by taking the application to the terminal shown in FIG. 2 as an example, and the method includes the following steps.
[0027] In step 301, a second virtual object is displayed.
[0028] The second virtual object includes a plurality of object parts, and the second virtual object is a virtual object controlled by the current terminal. Optionally, an application is installed and running on the current terminal, a first account is logged in to the application, and the application is an application that supports a virtual scene. The virtual scene is a scene displayed when the target application is run on the terminal. Optionally, the virtual scene further includes at least one of a virtual sky, virtual land, virtual sea, etc., where the virtual land includes environmental elements such as deserts and cities. Optionally, taking the example that the application is a first-person shooting game, illustratively, the second virtual object may be a virtual character in a virtual scene controlled by the first account, or a virtual vehicle in a virtual scene controlled by the first account. The object part refers to a part of the structure of the second virtual object, and the second virtual object includes a plurality of object parts. Illustratively, when the second virtual object is a virtual character, the plurality of object parts includes at least one of the left arm, right arm, left leg, right leg, head, chest, abdomen, etc. of the virtual character. When the second virtual object is a virtual vehicle, the plurality of object parts includes at least one of the vehicle body, wheels, engine, fuel tank, etc. of the virtual vehicle.
[0029] Optionally, the number of object parts included in one second virtual object is two or more, that is, the second virtual object is composed of at least two object parts. Exemplarily, when the second virtual object is a virtual character, the virtual character is composed of at least an upper body and a lower body. Optionally, the first account can control the second virtual object to move in the virtual scene (for example, walk, run, jump, squat, stand up, fly, slide, etc.), and the first account can further control the second virtual object to release skills (for example, boxing, shooting, throwing, item switching, ammunition loading, etc.) in the virtual scene.
[0030] In step 302, display the virtual item thrown into the virtual scene.
[0031] The virtual item is used to trigger a specified function within its functional range after being thrown into the virtual scene, and the specified function is used to affect the attribute values of virtual objects located within the functional range.
[0032] Here, the attribute value includes at least one of the health value, energy value, attack power, attack speed, movement speed, etc., and the embodiments of the present application are not limited thereto. Optionally, the virtual scene further includes a first virtual object controlled by a second account, and the second account is an account logged in to the application of the second terminal. Here, the second account may be an account in an adversarial relationship with the first account, or the second account may be an account in a cooperative relationship with the first account. Exemplarily, taking the application as a first-person shooting game as an example, the first account and the second account are on the same team and cooperate with each other for the battle, or the first account and the second account belong to different teams and are in an adversarial relationship. Optionally, the virtual item is an item thrown by the second virtual object into the virtual scene, or the virtual item is an item thrown by the first virtual object into the virtual scene, and the embodiments of the present application are not limited thereto. Optionally, the virtual item is thrown onto the ground of the virtual scene, or into the air of the virtual scene, or onto the body of the virtual object.
[0033] The specified function refers to the functional effect exerted when the virtual item is triggered. Optionally, the specified function includes at least one of the following functions.
[0034] 1. The specified function is used to apply a debuff effect to the attribute value of the virtual object located within the functional range.
[0035] Exemplarily, the virtual item can be realized as a virtual grenade item. When the virtual grenade item triggers an explosion effect, i.e., the specified function, the attribute values of the virtual objects within the explosion range of the virtual grenade item are subject to debuffs, such as: a decrease in health value, a blockage of the line of sight, a decrease in hearing, a decrease in movement speed, a decrease in attack speed, a decrease in critical hit rate, etc. This can accelerate the progress of the game round, shorten the duration of the game round, and save computer overhead.
[0036] 2. The specified function is used to apply a Buff effect to the attribute values of virtual objects located within the function range.
[0037] Exemplarily, the virtual item can be realized as a virtual first aid item. When the virtual first aid item triggers a first aid effect, i.e., the specified function, the attribute values of the virtual objects within the first aid range of the virtual first aid item receive a gain, and the combat ability of the virtual objects can be improved, thereby accelerating the pace of the game and improving the efficiency of human-computer interaction (HCI).
[0038] 3. The specified function is also used to restrict the actions of virtual objects located within the function range.
[0039] Exemplarily, the virtual item can be implemented as a virtual anesthesia item. When the virtual anesthesia item triggers an anesthesia effect, i.e., a specified function, virtual objects within the anesthesia range of the virtual anesthesia item cannot move or release skills in the virtual scene. Optionally, the virtual anesthesia item has a corresponding anesthesia time, and the anesthesia effect includes at least one of the following situations: Situation 1, the timing starts when the virtual anesthesia item is triggered, and within the anesthesia time, the influence of the anesthesia effect on the virtual object is fixed. Situation 2, the timing starts when the virtual anesthesia item is triggered, and within the anesthesia time, the influence of the anesthesia effect on the virtual item gradually weakens. For example: the virtual anesthesia item is triggered at 0 seconds, the anesthesia duration is 2 seconds, from 0 seconds to 1 second after triggering, the virtual object cannot move or release skills at all, from 1 second to 2 seconds after triggering, the virtual object can recover the ability to move by walking and can release simple skills (such as boxing), and after 2 seconds after triggering, the virtual object returns to the state before anesthesia. Situation 3, the timing starts when the virtual anesthesia item is triggered, and within the anesthesia time, the influence of the anesthesia effect on the virtual item is gradually strengthened. For example: the virtual anesthesia item is triggered at 0 seconds, the anesthesia duration is 2 seconds, from 0 seconds to 1 second after triggering, the virtual object cannot move by running and cannot use item skills (such as not being able to use virtual drugs to recover health), from 1 second to 2 seconds after triggering, the virtual object cannot move at all and cannot release any skills, and after 2 seconds after triggering, the virtual object returns to the state before anesthesia. Thereby, the computer can perform screen rendering only at the position of the virtual object during this period, the rendering amount is small, and thereby, the rendering accuracy can be improved.
[0040] 4. The specified function is further used to change the representation form of virtual objects located within the function range.
[0041] Exemplarily, the virtual item can be realized as a virtual transformation item. When the virtual transformation item triggers a transformation effect, that is, a specified function, the expression form of the virtual object within the transformation range of the virtual transformation item in the virtual scene is changed. That is, by using the virtual item to transform, the computer can directly render the transformation screen of the virtual object with the virtual item, and can improve the rendering appropriateness.
[0042] Optionally, the function range refers to the range that the specified function triggered by the virtual item in the virtual scene can affect. The function range includes at least one of the following ranges: 1. The function range of the virtual item is a circular range centered on the position where the virtual item is triggered and with a preset distance as the radius. Exemplarily, as shown in FIG. 4, in the virtual scene 400, if the position where the virtual item 401 is triggered is point A on the ground, the function range of the virtual item 401 is circle 402. When the virtual object 403 is within circle 402, it indicates that the virtual object 403 is within the function range of the virtual item 401. 2. The function range of the virtual item is inside a cylinder centered on the position where the virtual item is triggered, with a first preset distance as the radius and a second preset distance as the height.
[0043] Exemplarily, as shown in FIG. 5, in the virtual scene 500, when the position where the virtual item 501 is triggered is point B in the air, the functional range of the virtual item 501 is inside the cylinder 502, and both the second virtual object 503 on the ground and the first virtual object 504 in the air are within the functional range of the virtual item 501. 3. The functional range of the virtual item is a sector range centered on the position where the virtual item is triggered, with the preset angle as the central angle and the preset distance as the radius. Exemplarily, as shown in FIG. 6, in the virtual scene 600, when the position where the virtual item 601 is triggered is point C on the ground, the functional range of the virtual item 601 is the sector 602, and when the virtual object 603 is within the sector 602, it indicates that the virtual object 603 is within the functional range of the virtual item 601. In some alternative embodiments, in the virtual scene, sub-attributes corresponding to a plurality of object parts of the second virtual object are further displayed, that is, each object part of the second virtual object has its corresponding attribute (such as hit points).
[0044] In step 303, display the specified function of the virtual item triggered within the functional range.
[0045] Optionally, when the virtual item triggers the specified function, display the specified video within the functional range, and the specified video matches the specified function. Exemplarily, when the virtual grenade item triggers explosion damage, display an explosion video within the functional range.
[0046] Optionally, the position at which the virtual item is triggered is the position at which the virtual item is thrown, or the position at which the virtual item is triggered is not the position at which the virtual item is thrown. Exemplarily, the position at which the virtual item is triggered may not be the position at which the virtual item is thrown. Specifically, when a virtual object throws a virtual item onto the ground of the virtual scene, it can be regarded as being thrown at the landing position, and the landing position is the position at which the virtual item is thrown. However, if the virtual item is not an item triggered immediately after landing, the virtual item is triggered after moving a certain distance forward. In this case, the trigger position of the virtual item is not the same as the position at which the virtual item was thrown.
[0047] Optionally, the triggering method of the specified function described above includes at least one of the following methods.
[0048] 1. When the virtual item is thrown at the specified position, the specified function is triggered.
[0049] Exemplarily, the first virtual character throws a virtual grenade item into the virtual scene, and immediately after the virtual grenade item contacts the ground of the virtual scene, explosion damage is triggered. Or, the first virtual character throws the virtual grenade item at the body of the second virtual character, and immediately after the virtual grenade item contacts the second virtual character, explosion damage is triggered.
[0050] 2. The virtual item has a corresponding trigger time. After the virtual item is thrown, the timing starts, and when the trigger time is reached, the specified function is triggered.
[0051] Exemplarily, the trigger time of the virtual grenade item is 3 seconds. At 0 seconds, the first virtual character throws the virtual grenade item, and at 3 seconds, the virtual grenade item triggers explosion damage.
[0052] 3. After the virtual item is thrown into the virtual scene, the virtual object selects whether to trigger or not. Exemplarily, the first virtual character throws a virtual grenade item into the virtual scene. When the first virtual character clicks the explosion button, the virtual grenade item triggers explosion damage. Or, when the first virtual object steps on the virtual grenade item, the virtual grenade item triggers explosion damage.
[0053] In some alternative embodiments, a functional range label is further displayed in the virtual scene. Exemplarily, as shown in FIG. 4, if the functional range of the virtual item 401 is the circle 402, the functional range label is the circumferential line 404. When the virtual item 401 is thrown to the ground but not yet triggered, the circumferential line 404 is highlighted to warn the virtual object 403 of the functional range of the virtual item 401.
[0054] In step 304, in response to the second virtual object being located within the functional range, an attribute influence result of the second virtual object is displayed.
[0055] Here, the attribute influence result is a result obtained by comprehensively combining sub-attribute influence results respectively corresponding to a plurality of object parts, and the sub-attribute influence result is an influence result generated by a plurality of object parts under a specified function.
[0056] In some alternative embodiments, the second virtual object has corresponding object landmark points, and the object landmark points represent the second virtual object. When the object landmark points are within the functional range, it indicates that the second virtual object is located within the functional range. Exemplarily, the above object landmark points are the central skeleton points of the second virtual object, and the central skeleton points of the second virtual object are within the functional range. In some alternative embodiments, the second virtual object includes a plurality of object parts, and the plurality of object parts each have corresponding object part skeleton points. When at least one object part skeleton point is within the functional range, it indicates that the second virtual object is located within the functional range. Exemplarily, when the head skeleton point of the second virtual object is within the functional range, it indicates that the second virtual object is located within the functional range.
[0057] In some alternative embodiments, the fusion result of the sub-attribute influence results corresponding to a plurality of object parts is displayed as the attribute influence result of the second virtual object, or the sub-attribute influence results corresponding to the plurality of object parts are each displayed as the attribute influence result of the second virtual object. Optionally, when the sub-attribute influence results corresponding to the plurality of object parts are each displayed as the attribute influence result of the second virtual object, the step of displaying the attribute influence result of the second virtual object as described above further includes: First, in response to the second virtual object being located within the functional range, when the first object part of the second virtual object and the virtual item have a first positional relationship, the first sub-attribute influence result of the first object part is displayed. Optionally, in response to the second virtual object being located within the functional range, when there is an obstacle between the first object part of the second virtual object and the virtual item, a sub-attribute influence result indicating that the first object part has avoided the function specified by the predetermined function is displayed. Exemplarily, when the virtual grenade item explodes, if the virtual character is within the explosion range and there is an obstacle between the left arm of the virtual character and the virtual item, a screen indicating that the left arm of the virtual character is not attacked is displayed, for example, a screen indicating that the left arm of the virtual character remains stationary, that is, a screen indicating that the left arm of the virtual character has avoided the influence of the explosion of the virtual grenade item is displayed. Second, in response to the second virtual object being located within the functional range, when the second object part of the second virtual object and the virtual item have a second positional relationship, the second sub-attribute influence result of the second object part is displayed. Here, the second positional relationship indicates that there is no obstacle between the object part and the virtual item. Optionally, when the second object part among the plurality of object parts and the virtual item are penetrated and connected, the sub-attribute influence result of the second object part due to the influence of the specified function is displayed.
[0058] Here, the display of the attribute influence result includes at least one of the following situations.
[0059] 1. Display the attribute value change result of the second virtual object as the attribute influence result.
[0060] The display method of the attribute value change result includes at least one of the following methods: In Method 1, directly display the changed numerical value of the attribute. Exemplarily, when a virtual character is located within the explosion range of a virtual grenade item, and the virtual grenade item causes 20 health point damages to the left arm of the virtual character, 10 health point damages to the right arm, 30 health point damages to the head, and no health point damages to the left foot, right foot, abdomen, and chest of the virtual character, the health point damages (i.e., the attribute influence result) caused by the virtual grenade item to the virtual character is 60 points, and a numerical prompt of "HP - 60" is displayed around the virtual character. Method 2: Display the changing attribute value box.
[0061] Exemplarily, as shown in FIG. 7, when a virtual character does not receive the explosion damage of a virtual grenade item, the ratio of the black filled area of the health point bar 701 corresponding to the virtual character is 100%, indicating that the health value of the virtual character is 100 points. When the virtual character is located within the explosion range of the virtual grenade item, and the virtual grenade item causes 20 health point damages to the left arm of the virtual character, 10 health point damages to the right arm, 30 health point damages to the head, and no health point damages to the left foot, right foot, abdomen, and chest of the virtual character, the health point damages (i.e., the attribute influence result) caused by the virtual grenade item to the virtual character is 60 points. In this case, the ratio of the black filled area of the health point bar 702 corresponding to the virtual character is 40%, indicating that the current health value of the virtual character is 40 points. It should be noted that when the second virtual object is located within the function range, only the changed numerical value of the attribute may be displayed, or only the changed attribute value box may be displayed, or both the changed numerical value of the attribute and the changed attribute value box may be displayed.
[0062] 2. Display the appearance change result of the second virtual object as the attribute influence result.
[0063] The display method of the appearance change result includes at least one of the following methods. In Method 1, the appearance change result of the second virtual object is directly displayed. Optionally, the appearance of the second virtual object here is displayed based on the attribute value of the second virtual object. Exemplarily, when the health value of the head of a virtual character is 100 points, the head is displayed normally. When the health value of the head of the virtual character is 50 points, the head is displayed as injured. Optionally, the above injury display has corresponding injury levels, and the injury displays for different injury levels are different. The health value of the second virtual object for the first injury level is in the range of [0, 10), the health value of the second virtual object corresponding to the second injury level is in the range of [10, 50), and the health value of the second virtual object corresponding to the third injury level is in the range of [50, 100). Exemplarily, when the virtual character has not received the explosion damage of the virtual grenade item, all parts of the virtual character are displayed normally, that is, the health value of each part is 100 points. When the virtual character is located within the explosion range of the virtual grenade item and the virtual grenade item has caused 20 points of health damage to the left arm of the virtual character, the left arm at the third injury level is displayed. When 10 points of health damage are caused to the right arm, the right arm at the third injury level is displayed. When 60 points of health damage are caused to the head, the head at the second injury level is displayed. When no health damage is caused to the left foot, right foot, abdomen, and chest of the virtual character, the left foot, right foot, and chest of the virtual character are displayed normally. In Method 2, the change result of the appearance label of the second virtual object is displayed. Optionally, the appearance label of the second virtual object is displayed corresponding to the appearance of the second virtual object.Exemplarily, as shown in FIG. 8, when the virtual character has not received the explosion damage of the virtual grenade item and the health values of all parts of the virtual character are 100 points, the virtual character label 801 only displays the outline of the virtual character without filling the color inside, indicating that the virtual character has not received health damage yet. When the virtual character is within the explosion range of the virtual grenade item and 20 points of health damage are given to the head of the virtual character, a red label blinks on the head of the virtual character label 802, indicating that the head of the virtual character has received damage. When 91 points of health damage are given to the head of the virtual character, a red label is directly displayed on the head of the virtual character label 802, indicating that the head has received a serious injury. Optionally, in this case, the virtual character will die within 10 seconds.
[0064] The second virtual object includes a plurality of object parts. When the virtual item thrown into the virtual scene triggers the specified function within the function range and the second virtual object is within the function range, the virtual item affects each of the plurality of object parts of the second virtual object, thereby obtaining a plurality of sub-attribute influence results. Finally, the plurality of sub-attribute influence results are integrated to determine the attribute influence result of the virtual item on the second virtual object. By subdividing the attribute influence result of the virtual item on the second virtual object, the granularity of the attribute influence result becomes finer, thereby improving the accuracy of the influence of the virtual item on the virtual object.
[0065] FIG. 9 is a flowchart of a method for displaying a virtual object according to an embodiment of the present application. The method may be applied to the terminal shown in FIG. 2 or may be applied to the server shown in FIG. 2. Taking the case where the method is applied to the server shown in FIG. 2 as an example, the method includes the following steps.
[0066] In step 901, when the first virtual object throws a virtual item in the virtual scene, it triggers the specified function of the virtual item within the function range of the virtual item.
[0067] In some alternative embodiments, the specified function is an instantaneous function, that is, the specified function affects virtual objects within the function range at the moment it is triggered and does not affect them after the trigger ends. In some alternative embodiments, the specified function is a persistent function, that is, the specified function affects virtual objects within the function range for a certain period of time during which it persists, and after a certain period of time, the specified function becomes invalid. Optionally, when the specified function is a persistent function, the specified function includes a first-stage function and a second-stage function, and the effects of the first-stage function and the second-stage function are different. Exemplarily, taking the virtual item being realized as a virtual grenade item as an example, when the virtual grenade item explodes, it causes first-stage damage, which is the first-stage function, and the duration of the first-stage damage is 1 second. Within 0 to 1 second after the virtual grenade item explodes, virtual objects within the explosion range receive the first-stage damage, which is generally health damage. 1 second after the virtual grenade item explodes, it causes second-stage damage, and the duration of the second-stage damage is 2 seconds. If the virtual object does not leave the explosion range 2 seconds after the explosion, it receives the second-stage damage, which is the second-stage function. The second-stage damage may be relatively small health damage, or the second-stage damage can reduce the speed of the virtual object, invalidate skills, and cause equipment to drop (in this state, the virtual object cannot passively pick up the dropped equipment). Note that the explosion effect of the virtual grenade item is persistent. 2 seconds after the explosion, if another virtual object enters the explosion range, the virtual object receives the second-stage damage.
[0068] In step 902, in response to the second virtual object being located within the function range, based on the positional relationship between the multiple object parts of the second virtual object and the virtual item, sub-attribute influence results corresponding to the multiple object parts are obtained respectively.
[0069] Here, the sub-attribute influence result is the influence result respectively generated by a plurality of object parts under the specified function.
[0070] Optionally, the second virtual object described above is a virtual object within the function range of the virtual item. Exemplarily, when the explosion effect of a virtual grenade item is triggered, if a virtual character is within the explosion range, it is necessary to analyze the positional relationship between each part of the virtual character's body and the virtual item to obtain the injury status of multiple body parts of the virtual character. In some alternative embodiments, the above-mentioned positional relationship includes a first positional relationship and a second positional relationship, where the first positional relationship indicates that there is an obstacle between the virtual item and the object part, and the second positional relationship indicates that there is no obstacle between the virtual item and the object part.
[0071] Exemplarily, as shown in FIG. 10, currently, when the virtual grenade item 1001 explodes on the ground and the virtual character 1002 is within the explosion range 1003, it is determined whether there is an obstacle between the multiple body parts of the virtual character 1002 and the virtual grenade item. If there is an obstacle, the body part and the virtual grenade item have a first positional relationship. If there is no obstacle, the body part and the virtual grenade item have a second positional relationship.
[0072] In step 903, the sub-attribute influence results corresponding to the multiple object parts are fused respectively to obtain the attribute influence result of the second virtual object.
[0073] In some alternative embodiments, the method for obtaining the attribute influence result of the second virtual object described above includes at least one of the following methods: 1. Add the sub-attribute influence results corresponding to multiple object parts respectively to obtain the attribute influence result of the second virtual object. 2. Perform weighted addition on the sub-attribute influence results corresponding to multiple object parts respectively to obtain the attribute influence result of the second virtual object. Optionally, the sub-attribute influence result has a corresponding weight coefficient, the value range of the weight coefficient is [0, 1), and the value range of the sum of the weight coefficients of multiple object parts is (0, 1]. That is, by calculating the sub-attribute influence results corresponding to multiple object parts using different calculation methods, the overall attribute influence result of the second virtual object is obtained, and the credibility of the overall attribute influence result is improved.
[0074] FIG. 11 is a flowchart of a method for displaying a virtual object according to an embodiment of the present application. The method may be applied to the terminal shown in FIG. 2 or the server shown in FIG. 2. Taking the case where the method is applied to the server shown in FIG. 2 as an example, the method includes the following steps.
[0075] In step 1101, when the first virtual object throws a virtual item in the virtual scene, the designated function of the virtual item is triggered within the function range of the virtual item.
[0076] In step 1102, in response to the second virtual object being located within the function range, if there is an obstacle between the first object part among the multiple object parts and the virtual item, the first object part determines to avoid the sub-attribute influence caused by the designated function.
[0077] Optionally, avoiding the sub-attribute influence by the designated function of the virtual item indicates that the influence of the sub-attribute value by the designated function of the virtual item is 0. In some alternative embodiments, the method of determining that there is an obstacle between the object part and the virtual item includes the steps of creating connection lines from the position where the virtual item is thrown to the skeleton points corresponding to the plurality of object parts respectively, and determining that there is an obstacle between the first object part and the virtual item in response to the connection line to the skeleton point corresponding to the first object part being blocked. Exemplarily, as shown in FIG. 12, the virtual character 1201 includes seven main body parts, the position where the virtual grenade item is thrown is point A, the connection line 1202 from point A to the left arm skeleton point, the connection line 1203 from point A to the right arm skeleton point, the connection line 1204 from point A to the head skeleton point, the connection line 1205 from point A to the chest skeleton point, the connection line 1206 from point A to the left foot skeleton point, the connection line 1207 from point A to the right foot skeleton point, and the connection line 1208 from point A to the abdomen skeleton point are created respectively. Here, the connection lines 1202, 1203, 1204, 1205, 1208 are blocked by obstacles, which indicates that there are obstacles between the left arm, right arm, head, chest, abdomen of the virtual character 1201 and the virtual grenade item.
[0078] In some alternative embodiments, the obstacle between the first object part and the virtual item has a corresponding obstacle attribute, and the process of determining the sub-attribute influence of the first object part further includes the following steps.
[0079] In the first step, when there is an obstacle between the first object part and the virtual item, obtain the obstacle attribute of the obstacle.
[0080] In some alternative embodiments, the obstacle includes a virtual wall that shields the first object site, and the obstacle attribute of the virtual wall includes an upper limit of wall damage blocking. Exemplarily, taking the example that the upper limit of wall damage blocking is realized as the current firmness value of the virtual wall, the firmness value is used to indicate the firmness of the virtual wall, and the higher the firmness value, the more difficult it is for the virtual wall to be penetrated or broken.
[0081] In the second step, determine the attribute influence of the specified function of the virtual item on the obstacle attribute. Optionally, based on the distance between the virtual item and the obstacle, determine the attribute influence of the specified function of the virtual item on the obstacle attribute. Exemplarily, taking the example that the obstacle is realized as a virtual wall and the upper limit of wall damage blocking is realized as the current firmness value of the virtual wall, first determine whether the distance between the virtual item and the virtual wall is greater than a preset distance threshold. If it is greater than the preset distance threshold, the virtual item does not affect the firmness value. If the distance between the virtual item and the virtual wall is less than or equal to the preset distance threshold, multiply the distance coefficient corresponding to the distance between the virtual item and the virtual wall by the reference influence value of the virtual item on the virtual wall to obtain the influence result of the specified function of the virtual item on the firmness value of the virtual wall. Determine the distance coefficient based on the distance between the virtual item and the virtual wall and a specified distance base number. The specified distance base number is greater than 0 and less than 1, and the calculation formula of the distance coefficient is as follows: Formula 1: Y = W D , where Y represents the distance coefficient, W (W ∈ (0, 1)) represents the preset distance base number, and D represents the distance. Optionally, the reference influence value of the virtual item on the virtual wall is the influence that the virtual item exerts on the virtual wall firmness value at a very close distance, and the calculation formula of the influence result of the specified function of the virtual item on the firmness value of the virtual wall is as follows: Formula 2: E = Y * Z, where E represents the influence result, Y represents the distance coefficient, and Z represents the reference influence value.
[0082] In the third step, in response to the attribute impact of the specified function on the obstacle attribute meeting the penetration requirement, determine the sub-attribute impact exerted by the obstacle on the first object part under the influence of the specified function. That is, after the attribute impact of the specified function on the obstacle attribute meets the penetration requirement, the obstacle exerts a sub-attribute impact on the object part, enriching the diversity of the attribute impact. Optionally, when the obstacle is realized as a virtual wall, in response to the attack value of the specified function on the wall reaching the upper limit of the wall's damage block, determine the sub-attribute impact exerted on the first object part during the process of the wall breaking and exploding. Here, the attack value of the specified function on the wall is the impact result represented by E in Equation 2, and the upper limit of the wall's damage block is the current firmness value of the virtual wall. When E is greater than or equal to the current firmness value of the virtual wall, the virtual wall explodes, and the exploded virtual wall affects the first object part and determines the impact of the virtual wall on the first object part based on the initial damage value of the virtual wall to the first object part and the distance between the virtual wall and the first object part. Exemplarily, the virtual wall has a corresponding wall level, and the higher the level, the higher the initial damage value of the virtual wall to the first object part. Based on the distance coefficient between the virtual wall and the first object part, adjust the initial damage value, and its calculation formula is as follows: Equation 3: T = C * O P , where T represents the adjusted initial damage value, C represents the initial damage value, and O P represents the distance coefficient between the virtual wall and the first object part. Here, O (O ∈ (0, 1)) represents the adjustment base number, and P represents the distance between the virtual wall and the first object part. T in Equation 3 represents the impact of the virtual wall on the first object part, that is, the sub-attribute impact of the obstacle on the first object part. That is, when the obstacle is a virtual wall that shields the object part, even during the process of the virtual wall breaking and exploding after being attacked by a virtual item, it can exert a sub-attribute impact on the object part, enriching the diversity of the attribute impact method.
[0083] In step 1103, in response to the second virtual object being located within the functional range, when the second object part among the plurality of object parts and the virtual item are penetrated and connected, based on the influencing factor between the second object part and the virtual item, a sub-attribute influence result corresponding to the second object part is determined.
[0084] Here, the influencing factor includes at least one of a distance factor, an armor factor, a projection relationship factor, an attitude factor of the main control virtual object, a resistance factor, and a duration factor. In some alternative embodiments, connection lines are created from the position where the virtual item is thrown to the skeleton points respectively corresponding to the plurality of object parts, and in response to the connection line to the skeleton point corresponding to the second object part penetrating and connecting the second object part and the virtual item, it is determined that there is no obstacle between the second object part and the virtual item. Exemplarily, as shown in FIG. 12, the virtual character 1201 includes seven main body parts, the position where the virtual grenade item is thrown is point A, the connection line 1202 from point A to the left arm skeleton point, the connection line 1203 from point A to the right arm skeleton point, the connection line 1204 from point A to the head skeleton point, the connection line 1205 from point A to the chest skeleton point, the connection line 1206 from point A to the left foot skeleton point, the connection line 1207 from point A to the right foot skeleton point, and the connection line 1208 from point A to the abdomen skeleton point are created respectively. The connection lines 1206 and 1207 are not blocked by obstacles, which indicates that there is no obstacle between the left foot and right foot of the virtual character 1201 and the virtual grenade item. That is, by the method of creating connection lines from the throwing position of the virtual item to the skeleton points respectively corresponding to the plurality of object parts, based on the connection status of the connection lines to the skeleton points, it is possible to determine whether there is an obstacle between the object part and the virtual item, and improve the accuracy of determining whether there is an obstacle between the virtual item and the object part.
[0085] In some alternative embodiments, the process of determining the sub-attribute influence result corresponding to the second object part further includes the following steps.
[0086] S1: In response to the second virtual object being located within the functional range, when the second object part among the plurality of object parts and the virtual item are penetrated and connected, obtain the reference attribute value corresponding to the second object part. Optionally, the reference attribute value indicates the attribute influence result given by the preset virtual item to the object part under the ideal state. Exemplarily, the ideal state indicates that there is no obstacle between the virtual item and the object part, and the distance between the two is infinitely close to 0. Taking the virtual item being realized as a virtual grenade item as an example, when the position where the virtual grenade item is triggered is at the object part where the virtual object is located, the damage value of the virtual grenade item to the object part is the reference damage value. In some alternative embodiments, the reference attribute values of different object parts of the second virtual object are different. Exemplarily, in a shooting game, the reference damage values of the virtual grenade item for the head and chest of the virtual character can be set high, and the reference damage values for the hands and legs of the virtual character can be set low.
[0087] S2: Determine an adjustment coefficient for adjusting the reference attribute value based on the influencing factor between the second object part and the virtual item.
[0088] In the following, the process of determining the adjustment coefficient for adjusting the reference attribute value based on the above influencing factor will be described respectively.
[0089] 1. When the influence factor includes a distance factor, the distance between the second object part and the virtual item is used as an exponential coefficient, and the power result of the adjusted base number with the exponential coefficient as the exponent is used as the first adjustment coefficient. Here, the adjusted base number is greater than 0 and less than 1, and the first adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying with the reference attribute value. When the influence factor includes a distance factor, exemplarily, taking the case where the virtual item is realized as a virtual grenade item, the second virtual object is realized as a virtual character, and the second object part is realized as the head of the virtual character as an example. A connection line is created from the coordinate point where the virtual grenade item explodes to the skeleton point of the head of the virtual character, the distance of the connection line is obtained. When the distance is greater than the distance threshold, it is determined that the sub-attribute influence value given by the virtual grenade item to the head of the virtual character is 0. When the distance is less than or equal to the distance threshold, it means that the virtual grenade item damages the head of the virtual character. The distance is obtained, and at the same time, the adjusted base number is obtained. Here, the adjusted base number is greater than 0 and less than 1. Taking the adjusted base number as the base number and the distance as the exponent, the first adjustment coefficient is calculated. The specific calculation formula is as follows: Formula 4: X1 = K L , where X1 represents the first adjustment coefficient, K (K ∈ (0, 1)) represents the adjusted base number, and L represents the distance. In some alternative embodiments, L in the above Formula 4 can be further realized as a distance level. Exemplarily, the distance threshold of the virtual grenade item is 12 meters. Distance level 1 means that the distance is within the range of (0 meter, 1 meter], and L in the above Formula 1 is 1. Distance level 2 means that the distance is within the range of (1 meter, 5 meters], and L in the above Formula 1 is 2. Distance level 3 means that the distance is within the interval of (5 meters, 10 meters], and L in the above Formula 1 is 3. Distance level 4 means that the distance is within the range of (10 meters, 12 meters), and L in the above Formula 1 is 4. That is, by using the distance between the object part and the virtual item as an exponential coefficient, and using the power result of the adjusted base number with the exponential coefficient as the exponent as the first adjustment coefficient to adjust the reference attribute value based on the first adjustment coefficient, the adjustment range of the reference attribute value with respect to the distance changes exponentially.
[0090] 2. When the influencing factor includes an armor factor, determine a second adjustment coefficient based on the product result of the armor level corresponding to the armor factor and the adjustment coefficient. Here, the adjustment coefficient is greater than 0 and less than 1, and the second adjustment coefficient is used to adjust the reference attribute value using the product result obtained by multiplying it with the reference attribute value. In some alternative embodiments, armor is equipped on multiple object parts of the second virtual object, and the armor has a corresponding armor level. Exemplarily, in a first-person shooting game, when playing the game, the virtual character can obtain items such as helmets and bulletproof vests in the game. Helmets and bulletproof vests have corresponding level numbers, and the higher the level, the stronger the protective ability of the helmet or bulletproof vest. When the influencing factor includes an armor factor, first, it is necessary to determine whether armor is equipped on the second object part of the second virtual object. Exemplarily, taking the case where the virtual item is realized as a virtual grenade item and the second object part is realized as the head of the virtual character as an example, when the virtual grenade item is triggered, if there is no protective item such as a helmet equipped on the head of the virtual character, the influencing factor does not consider the armor factor. If a helmet is equipped on the head of the virtual character, obtain the level of the helmet. At the same time, obtain the preset coefficient. Here, the preset coefficient is greater than 0 and less than 1. Take the level of the helmet as the armor level and the preset coefficient as the adjustment coefficient, and calculate the second adjustment coefficient. The specific calculation formula is as follows: Formula 5: X2 = 1 - G * Q, where X2 represents the second adjustment coefficient, Q (Q ∈ (0, 1)) represents the preset coefficient, and G represents the armor level. In some alternative embodiments, the above-mentioned armor level decreases according to the number of uses. Exemplarily, when not receiving any attacks, the level of the above-mentioned helmet is level 4, the armor level is 4. When receiving one attack, the level of the helmet drops to level 3, and the armor level becomes level 3. Optionally, the degree of decrease in the helmet level is not fixed. In one attack, the greater the damage received, the greater the degree of decrease.In some alternative embodiments, the above-mentioned armor level does not decrease according to the number of uses, but the number of uses of the armor is limited. Exemplarily, when not receiving any attacks, the number of uses of a level 4 helmet is 4 times. After receiving 4 attacks, the helmet loses its protective ability, and the armor level of the helmet in each attack is all level 4. That is, based on the product result of the armor level and the adjustment coefficient, the second adjustment coefficient is determined, and the second adjustment coefficient is multiplied by the reference attribute value to adjust the reference attribute value, so that when the armor levels are different, the adjustment effects can also be different.
[0091] 3. When the influencing factor includes a projection relationship factor, obtain the projection of the second virtual object in the functional range, and use the ratio coefficient between the projected area of the second virtual object in the functional range and the reference projected area of the second virtual object as the third adjustment coefficient. Here, the ratio coefficient is greater than 0 and less than 1, and the third adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying it with the reference attribute value. In some alternative embodiments, when the attribute influencing function of the virtual item is triggered, the current pose of the second virtual object is different. Exemplarily, taking the virtual item being realized as a virtual grenade item as an example, when the virtual grenade item is triggered to explode, the fragments released from the explosion point damage the virtual character. Therefore, when the pose of the virtual character is different, the number of fragments hitting the virtual character is also different. In this case, determine the third adjustment coefficient by obtaining the projection of the virtual character within the explosion range. Optionally, to obtain the third adjustment coefficient, it is necessary to obtain the projected area of the second virtual object within the functional range and the reference projected area of the second virtual object. Below, the process of obtaining the above two projected areas will be described: First, obtain the projected area of the second virtual object within the functional range.
[0092] In some alternative embodiments, the method of obtaining the projection of the second virtual object within the functional range includes creating a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determining a projection plane perpendicular to the connection line to the central skeleton point; and determining the projection of the second object part among the plurality of object parts on the projection plane as the projection of the second virtual object within the functional range. Optionally, the central skeleton point of the second virtual object described above can be realized as the intermediate position skeleton point of the second virtual object. Optionally, calculate the projected area of the second object part of the second virtual object within the projection plane, thereby obtaining the projected area of the second virtual object within the functional range. Exemplarily, when there is no obstacle between each object part of the second virtual object and the virtual item, as shown in FIG. 13, the explosion point of the virtual grenade item is point A, the central skeleton point of the virtual person 1301 is point B, connect point A and point B, create a plane 1302 perpendicular to the straight line segment AB, the plane 1302 is the projection plane, create connection lines from point A to the skeleton points of each body part of the virtual person 1301 respectively (it should be noted that it is necessary to create as many connection lines as possible from point A to the skeleton points of each body part of the virtual person 1301, FIG. 13 only shows a part of the connection lines), extend the connection lines to the skeleton points of each body part described above to the plane 1302 respectively, the formed closed image is the projection of the virtual person 1301, and the area of the closed image in the plane 1302 is calculated as the projected area of the virtual person within the explosion range, that is, the projected area of the second virtual object within the functional range.Exemplarily, when there is no obstacle between a part of the object site of the second virtual object and the virtual item, and there is an obstacle between another part of the object site and the virtual item, as shown in FIG. 14, the explosion point of the virtual grenade item is point a, the central skeleton point of the virtual character 1401 is point b, connecting point a and point b to form a plane 1402 perpendicular to the straight line segment ab, the plane 1402 is the projection plane. When the connection line between the lower body part skeleton point of the virtual character 1401 and point a is blocked and the connection line between the upper body part skeleton point of the virtual character 1401 and point a is not blocked, the connection line between the upper body part skeleton point and point a is extended to the plane 1402 respectively. The area of the closed image in the plane 1402 is calculated as the projected area of the virtual character within the explosion range, that is, the projected area of the second virtual object within the functional range. That is, by determining the projection plane based on the connection line between the throwing position of the virtual item and the central skeleton point of the second virtual object, and determining the projected area of the object site within the projection plane as the projected area within the functional range, the accuracy of obtaining the projected area can be improved.
[0093] Second, obtain the reference projected area of the second virtual object.
[0094] In some alternative embodiments, the method for obtaining the reference projected area of the second virtual object includes at least one of the following methods: In Method 1, the reference projected area is a preset area and is the front surface area of the second virtual object in the virtual scene. Exemplarily, the reference projected area of a virtual person is the area surrounded by the outer contour of the virtual person in a standard standing posture, and the reference projected area of a virtual vehicle is the area of the exposed vehicle body of the virtual vehicle. In Method 2, the reference projected area is the projected area of the second virtual object within the target projection plane. Exemplarily, referring to FIG. 15, the virtual person stands in the virtual scene, the explosion point of the virtual grenade item is point c, the central skeleton point of the virtual person 1501 is point d. Connect point c and point d, and create a plane 1502 perpendicular to the straight line segment cd. The plane 1502 is the projection plane. Connect point c and each body part skeleton point respectively, and extend each of the above straight line segments to the plane 1502, and calculate the area of the closed image in the plane 1502 as the reference projected area of the virtual person, that is, the reference projected area of the second virtual object. After obtaining the projected area of the second virtual object within the functional range and the reference projected area of the second virtual object, a third adjustment coefficient can be determined. Exemplarily, calculate the ratio coefficient (i.e., the third adjustment coefficient) between the projected area of the second virtual object within the functional range and the reference projected area of the second virtual object. Here, the ratio coefficient is greater than 0 and less than 1, and the specific calculation formula is as follows: Formula 6: X3 = M / N, where X3 (X3 ∈ (0, 1)) represents the third adjustment coefficient, M represents the projected area of the second virtual object within the functional range, and N represents the reference projected area of the second virtual object. That is, when the poses of the second virtual object in the functional range are different, the corresponding projected areas within the functional range are also different. Therefore, different adjustments can be made to the reference attribute values according to different poses of the second virtual object.
[0095] 4. When the influence factor includes the pose factor of the second virtual object, obtain the current pose of the second virtual object, and use the pose coefficient corresponding to the pose as the fourth adjustment coefficient. Here, the pose coefficient is greater than 0 and less than 1, and the fourth adjustment coefficient is used to adjust the reference attribute value using the product result obtained by multiplying the reference attribute value. In some alternative embodiments, when the attribute influence function of the virtual item is triggered, the current pose of the second virtual object is also different, and different poses have corresponding different pose coefficients. Exemplarily, when the virtual item is realized as a virtual grenade item, the relationship between the magnitudes of the pose coefficients corresponding to different poses is standing pose > squatting pose > prone pose. The pose coefficient corresponding to the pose of the second virtual object when the attribute influence function of the virtual item is triggered can be obtained to determine the fourth adjustment coefficient. Here, the pose coefficient is greater than 0 and less than 1, and the specific calculation formula is as follows: Formula 7: X4 = Z, where X4 (X4 ∈ (0, 1)) represents the fourth adjustment coefficient, and Z represents the pose coefficient of the second virtual object. Through the above steps, the fourth adjustment coefficient is calculated, and the reference attribute value can be adjusted by multiplying the fourth adjustment coefficient by the reference attribute value. That is, the adjustment effect of the reference attribute value varies depending on the pose of the virtual object.
[0096] 5. When the influencing factor includes a resistance factor, obtain the resistance coefficient of the environment where the second object part of the second virtual object is located. Here, the resistance coefficient is greater than 0 and less than 1, and the resistance coefficient is used to adjust the reference attribute value by multiplying it with the reference attribute value. In some alternative embodiments, the virtual scene includes a virtual water flow, and when the specified function of the virtual item is triggered, the resistance coefficient includes the resistance coefficient in the virtual water flow. Exemplarily, when the explosion point of the virtual grenade item is within the virtual water flow and can damage the virtual character, since the resistance of the explosion fragments of the virtual grenade in the air is different from that in the water flow, it is also necessary to calculate the resistance of the water flow to the virtual grenade item. Here, the resistance has a corresponding resistance coefficient, and the greater the resistance, the smaller the corresponding resistance coefficient. That is, obtain the resistance coefficient when the specified function of the virtual item is triggered, multiply the resistance coefficient with the reference attribute value, and the reference attribute value can be adjusted, thereby improving the adjustment accuracy.
[0097] 6. When the influencing factor includes a duration factor, obtain the duration of the specified function of the virtual item, and determine the duration influence coefficient based on the duration. Here, the duration influence coefficient is greater than 0 and less than 1, and the duration influence coefficient is used to adjust the reference attribute value by multiplying it with the reference attribute value. In some alternative embodiments, the specified function of the virtual item has a corresponding function duration. During the function period, the virtual item can continuously affect the attribute value of the virtual object located within the function range, but the above-mentioned attribute value influence gradually decays or gradually increases with time. That is, obtain the duration influence coefficient when the specified function of the virtual item is triggered, multiply the duration influence coefficient with the reference attribute value, and the reference attribute value can be adjusted to improve the adjustment accuracy.
[0098] 7. In some alternative embodiments, the influencing factor further includes a residual attribute value factor. When the influencing factor includes the residual attribute value factor of the second object part, the product of the number of levels corresponding to the residual attribute value of the second object part and the adjustment coefficient is obtained as the fifth adjustment coefficient. Here, the adjustment coefficient is greater than 0 and less than 1, and the fifth adjustment coefficient is used to adjust the reference attribute value by multiplying it with the reference attribute value. In some alternative embodiments, taking the example where the virtual item is realized as a virtual first aid item, the less the residual attribute value is, the greater the restored attribute value is, and the recovery effect of the virtual first aid item is also improved. Exemplarily, taking the example where the attribute value is realized as the health value, assuming that the full-health state health value is 100, when the health value is in the range (0, 30], it is the first level, the number of levels is 1, and the recovery effect is the best; when the health value is in the range (30, 60], it is the second level, the number of levels is 2; when the health value is in the range (60, 90], it is the third level, the number of levels is 3; when the health value is in the range (90, 100], it is the fourth level, the number of levels is 4, and the recovery effect is the worst. Note that in the full-health state, when the health value is 100, the health value can only be restored to 100 at most. When the attribute influencing function of the virtual item is triggered, the residual attribute value of the second object part can be obtained, and at the same time, the adjustment coefficient can be obtained to determine the fifth adjustment coefficient. Here, the adjustment coefficient is greater than 0 and less than 1, and the specific calculation formula is as follows: Formula 8: X5 = H * Z, where X5 represents the fifth adjustment coefficient, Z (Z ∈ (0, 1)) represents the adjustment coefficient, and H represents the number of levels of the residual attribute value of the second object part. By the above steps, the fifth adjustment coefficient can be calculated, and the fifth adjustment coefficient can be multiplied with the reference attribute value to adjust the reference attribute value. That is, depending on whether there is an obstacle between the object part and the virtual item, the sub-attribute influence result on the object part is also different. Furthermore, when the object part and the virtual item are connected in a penetrating manner, different influencing factors between the object part and the virtual item also bring different sub-attribute influence results, thereby improving the credibility of the attribute influencing function of the virtual item on the virtual object.
[0099] S3: Adjust the reference attribute value based on the adjustment coefficient to obtain the sub-attribute influence result corresponding to the second object part. Optionally, one or more of the above adjustment coefficients can be selected to adjust the reference attribute value to obtain the sub-attribute influence result corresponding to the second object part. When selecting the first adjustment coefficient, the second adjustment coefficient, and the fourth adjustment coefficient to adjust the reference attribute value, the calculation formula is as follows: Formula 9: S' = S * X1 * X2 * X4, where S represents the reference attribute value and S' represents the adjusted reference attribute value. Optionally, here, when the second object part includes two or more object parts, the reference attribute values of each object part are adjusted respectively to obtain a plurality of adjusted reference attribute values. That is, by setting the reference attribute value generated by the virtual item for the object part in an ideal state, the adjustment coefficient is determined based on the influence factor between the object part and the virtual item, and finally, the reference attribute value is adjusted based on the adjustment coefficient to obtain the sub-attribute influence result of the object part, thereby enabling different object parts with different reference attribute values to have different adjustment ranges and improving the adaptability of the attribute result influence change for the object part.
[0100] In step 1104, fuse the sub-attribute influence results corresponding to a plurality of object parts respectively to obtain the attribute influence result of the second virtual object.
[0101] In some alternative embodiments, when the virtual item is a virtual attack item, the attribute influence function of the virtual item generates a debuff attribute influence result for the second virtual object. Taking the virtual attack item being realized as a virtual grenade item as an example, FIG. 16 is a flowchart of a method for displaying a virtual object according to an embodiment of the present application. The method may be applied to the terminal shown in FIG. 2 or may be applied to the server shown in FIG. 2. Taking the method being applied to the server shown in FIG. 2 as an example, the method includes the following steps.
[0102] In step 1601, when the first virtual object throws a virtual grenade item in the virtual scene, the explosion damage of the virtual grenade item is triggered within the explosion range of the virtual grenade item.
[0103] Here, the explosion damage is used to inflict a debuff effect on the attribute value of a virtual object located within the explosion range. In some alternative embodiments, the above virtual scene is realized as a game battle screen between a second virtual object and a first virtual object, and the virtual grenade item is an item thrown by the first virtual object at the second virtual object, where the relationship between the first virtual object and the second virtual object may be an adversarial relationship or a cooperative relationship. Optionally, when the first virtual object and the second virtual object are in a cooperative relationship, the virtual grenade item has a corresponding no-harm effect. Illustratively, when a teammate of the second virtual object on the same team throws a virtual grenade item in the virtual scene and the second virtual object is within the explosion range of the virtual grenade item, the second virtual object does not receive damage. In some alternative embodiments, the above virtual scene can further be realized as a throwing practice scene for a second virtual object. For example, in a shooting game, the second virtual object can practice throwing a virtual grenade item in the throwing practice scene. The second virtual object can further experience explosion damage from the virtual grenade item in the throwing practice scene. Optionally, the virtual grenade item thrown by the second virtual object can damage the second virtual object itself. Here, the attribute values include the life value, line of sight, and hearing of the virtual object. For example, when a virtual grenade item explodes near the virtual object, the life value of the virtual object decreases and the line of sight of the virtual object is narrowed by emitting smoke, dust, debris, etc. At the same time, the explosion sound emitted by the virtual grenade item reduces the hearing of the virtual object, making it impossible for the virtual object to hear the gunfire or footsteps of a nearby first virtual object. In some alternative embodiments, the virtual grenade item is an instantaneous damage item, illustratively the virtual grenade item damages virtual objects within the explosion radius at the moment of explosion and does not damage after explosion, hi some alternative embodiments, the virtual grenade item is a continuous damage item, the virtual grenade item has a corresponding damage duration.Optionally, the damage intensity and explosion range of the virtual grenade item gradually decrease during the damage duration. Exemplarily, the damage duration of the virtual grenade item is 3 seconds, the explosion damage of the virtual grenade item is triggered at 0 seconds, and from 0 second to 1 second after the trigger, the damage level of the virtual grenade item is level 3 (i.e., the maximum damage level of the virtual grenade item), and the explosion range is a circular range with a diameter of 24 meters. From 1 second to 2 seconds after the trigger, the damage level of the virtual grenade item is level 2, and the explosion range is a circular range with a diameter of 12 meters. From 2 seconds to 3 seconds after the trigger, the damage level of the virtual grenade item is level 1, and the explosion range is a circular range with a diameter of 6 meters. After 3 seconds after the trigger, the explosion damage of the virtual grenade item becomes invalid.
[0104] In step 1602, in response to the second virtual object being located within the explosion range, based on the positional relationship between the multiple object parts of the second virtual object and the virtual grenade item, sub-attribute influence results corresponding to the multiple object parts are obtained respectively.
[0105] Here, the sub-attribute influence result is a debuff result respectively generated by the multiple object parts due to the explosion damage.
[0106] Exemplarily, first, it is determined whether the second virtual object is located within the explosion range. If the second virtual object is located within the explosion range, it indicates that the virtual grenade item damages the main control virtual object. In this case, sub-attribute influence results corresponding to a plurality of object parts are obtained. In some alternative embodiments, connection lines from the explosion center to the skeleton points of a plurality of object parts are created. If the connection line to at least one skeleton point is within the explosion range, it indicates that the second virtual object is located within the explosion range. If the connection lines to all skeleton points are not within the explosion range, it indicates that the second virtual object is not located within the explosion range. In some alternative embodiments, by creating connection lines between the explosion center and the skeleton points of a plurality of object parts respectively, the positional relationship between the plurality of object parts and the virtual grenade item is determined, thereby obtaining sub-attribute influence results corresponding to the plurality of object parts respectively. Optionally, the position of the virtual grenade item thrown into the virtual scene is the explosion center of the virtual grenade item, and connection lines from the explosion center to the skeleton points of a plurality of object parts are created respectively. The plurality of object parts can be classified according to the situation of the connection lines to the skeleton points: If the connection line between the explosion center and the object part is blocked, it indicates that the object part belongs to the first object part, and the virtual grenade item does not damage the first object part, that is, the attribute value of the first object part does not decrease. If the connection line between the explosion center and the object part is not blocked, it indicates that the object part belongs to the second object part, and the virtual grenade item may damage the second object part. In this case, based on the influence factor between the second object part and the virtual grenade item, it is necessary to determine whether to damage the second object part and the sub-attribute influence result corresponding to the second object part. First, based on the distance factor, it is determined whether the virtual grenade item damages the second object part.Optionally, it is determined whether or not the connection line between the second object part skeleton point and the explosion center exceeds a distance threshold. If it exceeds the distance threshold, it indicates that the virtual grenade item does not damage the second object part, that is, the attribute value of the second object part does not decrease. Second, when the connection line between the second object part skeleton point and the explosion center does not exceed the distance threshold, it indicates that the virtual grenade item damages the second object part.
[0107] Exemplarily, when the second object parts that do not exceed the distance threshold include the left foot and the head: 1. First, obtain the reference damage value of the virtual grenade item for the initially set left foot and head. For example, the reference damage value of the left foot is 20, and the reference damage value of the head is 50.
[0108] 2. Next, obtain the first adjustment coefficient corresponding to the distance factor. For example, when the distance to the left foot is 4 meters, the distance to the head is 5 meters, and the preset adjustment base number is 0.9, the reference damage value adjusted based on the first adjustment coefficient is as follows: left foot = 40 * 0.9^4 = 13.122, head = 50 * 0.9^5 = 29.525.
[0109] 3. Then, obtain the second adjustment coefficient corresponding to the armor factor. Before obtaining the second adjustment coefficient, it is first necessary to determine whether or not armor items are equipped on the left foot and head of the second virtual object. For example, when a level 2 armor item is equipped on the left foot and no armor item is equipped on the head, and the specified adjustment coefficient is 0.1, the reference damage value adjusted based on the first adjustment coefficient and the second adjustment coefficient is as follows: left foot = 13.122 * 0.8 = 10.4976, head = 29.525 (when no armor item is equipped on the head, there is no need to adjust the head).
[0110] 4. Finally, obtain the third adjustment coefficient corresponding to the projection relationship factor. To do so, it is necessary to obtain the reference projected area and the projected area of the second virtual object within the explosion range. The method for obtaining the reference projected area and the projected area of the second virtual object within the explosion range is described in detail in step 1103 and will not be repeated here. For example, if the reference projected area is 10 and the projected area of the second virtual object within the explosion range is 5, it can be seen that the third adjustment coefficient is 0.5. The reference damage value adjusted based on the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient is as follows: left foot = 10.4976 * 0.5 = 5.2488, head = 29.525 * 0.5 = 14.7625.
[0111] In some alternative embodiments, it is also possible to directly detect the pose of the second virtual object that is about to be damaged by the explosion and reduce the damage based on the pose. For example, when a virtual grenade item explodes, the damage received by a virtual object in a crouched pose is lower than the damage received by a virtual object in a standing pose. Exemplarily, referring to FIG. 17, virtual object 1701 is in a standing pose, virtual object 1703 is in a crouched pose, virtual object 1701 and virtual object 1703 belong to the same virtual object, and the distance from both to point A, the center of the explosion, is the same. As shown in FIG. 17, the area of the projection 1702 of virtual object 1701 is significantly larger than the area of the projection 1704 of virtual object 1703, which indicates that when facing the center of the explosion, the exposed area of virtual object 1701 is larger and the damage received is also greater. The above-mentioned third adjustment coefficient can further be realized as a pose coefficient corresponding to the pose of the second virtual object when the virtual grenade item explodes. For example, when the pose of the second virtual object when the virtual grenade explodes is a crouched pose, the pose coefficient is 0.5. The reference damage value adjusted based on the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient is as follows: left foot = 10.4976 * 0.5 = 5.2488, head = 29.525 * 0.5 = 14.7625.
[0112] In step 1603, the sub-attribute influence results corresponding to a plurality of object parts are fused respectively to obtain the debuff attribute influence result of the second virtual object.
[0113] Exemplarily, if the sub-attribute influence results given by the above virtual grenade item to the second virtual object are that the health value of the left foot decreases by 5.2488 and the health value of the head decreases by 14.7625, the damage values of the left foot and the head can be added to obtain the attribute influence result of the second virtual object, that is, the total health value of the virtual object decreases by 20.0113. That is, depending on the type of virtual item, the generated attribute influence results are also different, improving the diversity of items that affect the attributes. In some alternative embodiments, when the virtual item is a virtual medical item, the designated function of the virtual item generates a buff attribute influence result for the second virtual object. Taking the virtual medical item being realized as a virtual first aid item as an example, FIG. 18 is a flowchart of a method for displaying a virtual object according to an embodiment of the present application. The method may be applied to the terminal shown in FIG. 2 or may be applied to the server shown in FIG. 2. Taking the method being applied to the server shown in FIG. 2 as an example, the method includes the following steps.
[0114] In step 1801, when the first virtual object throws a virtual first aid item in the virtual scene, the first aid effect of the virtual first aid item within the first aid range of the virtual first aid item is triggered.
[0115] Here, the first aid effect is used to apply a buff effect to the attribute values of virtual objects located within the first aid range. Optionally, the recovery ability and the first aid range of the virtual first aid item gradually decrease during the recovery period. Exemplarily, the recovery duration of the virtual first aid item is 3 seconds, the first aid effect of the virtual first aid item is triggered at 0 seconds, and from 0 seconds to 1 second after the trigger, the recovery level of the virtual first aid item is level 3 (i.e., the maximum recovery level of the virtual first aid item), and the first aid range is a circular range with a diameter of 24 meters. From 1 second to 2 seconds after the trigger, the recovery level of the virtual first aid item is level 2, and the first aid range is a circular range with a diameter of 12 meters. From 2 seconds to 3 seconds after the trigger, the recovery level of the virtual first aid item is level 1, and the first aid range is a circular range with a diameter of 6 meters. After 3 seconds after the trigger, the first aid effect of the virtual first aid item becomes invalid. In some alternative embodiments, within the first aid range, the display of the first aid effect label and the first aid range label of the virtual first aid item is also triggered. Exemplarily, the virtual first aid item has a corresponding first aid duration. After the first aid effect of the virtual first aid item is triggered, if the second virtual object is not located within the first aid range, it is not treated. However, since the first aid effect of the virtual first aid item lasts for a certain period of time, if the second virtual object moves into the first aid range within this time, it can receive treatment. Referring to FIG. 19, when the display of the first aid effect label and the first aid range label of the virtual first aid item is triggered, the first aid effect label 1901 is displayed in the virtual scene. The second virtual object can quickly find the triggered virtual first aid item based on the first aid effect label and can know the type of the virtual first aid item. By highlighting the first aid range label 1902, the second virtual object can know the current first aid range of the virtual first aid item.
[0116] In step 1802, in response to the second virtual object being located within the first aid range, based on the positional relationship between the multiple object parts of the second virtual object and the virtual first aid item, sub-attribute influence results corresponding to the multiple object parts are obtained respectively.
[0117] Here, the sub-attribute influence result is the buff result generated by multiple object parts due to the first aid effect. Exemplarily, first, it is determined whether the second virtual object is located within the first aid range. If the second virtual object is located within the first aid range, it indicates that the virtual first aid item gives the first aid effect to the second virtual object, and the sub-attribute influence results corresponding to multiple object parts are obtained respectively. In some alternative embodiments, connection lines are created from the trigger position of the virtual first aid item to the skeleton points of multiple object parts. If there is a connection line to at least one skeleton point within the first aid range, it indicates that the second virtual object is located within the first aid range. If the connection lines to all skeleton points are not within the first aid range, it indicates that the second virtual object is not located within the first aid range. In some alternative embodiments, by creating connection lines from the trigger position of the virtual first aid item to the skeleton points of multiple object parts respectively, the positional relationship between the multiple object parts and the virtual first aid item is determined, and thereby, the sub-attribute influence results corresponding to multiple object parts are obtained respectively.
[0118] Optionally, multiple object parts can be classified according to the situation of the connection lines to the skeleton points: If the connection line between the trigger position of the virtual first aid item and the object part is blocked, it indicates that the object part belongs to the first object part, and the virtual first aid item does not affect the first object part, that is, the attribute value of the first object part does not increase. If the connection line between the trigger position of the virtual first aid item and the object part is not blocked, it indicates that the object part belongs to the second object part, and the virtual first aid item may affect the second object part. In this case, it is necessary to determine whether to affect the second object part and the sub-attribute influence result corresponding to the second object part based on the influence factor between the second object part and the virtual first aid item.
[0119] First, based on the distance factor, it is determined whether the virtual first aid item affects the second object part. Optionally, it is determined whether the connection line between the skeleton point of the second object part and the trigger position of the virtual first aid item exceeds a distance threshold. If it exceeds the distance threshold, it indicates that the virtual first aid item does not affect the second object part, that is, the attribute value of the second object part does not increase.
[0120] Second, if the connection line between the skeleton point of the second object part and the trigger position of the virtual first aid item does not exceed the distance threshold, it indicates that the virtual first aid item affects the second object part. In some alternative embodiments, based on at least one of the distance factor and the remaining attribute value factor of the second object part, a sub-attribute influence result corresponding to the first virtual object part is determined.
[0121] Exemplarily, when the second object parts that do not exceed the distance threshold include the left foot and the head: 1. First, obtain the reference recovery values of the virtual first aid item for the initially set left foot and head. For example, the reference recovery value of the left foot is 20, and the reference recovery value of the head is 50.
[0122] 2. Next, obtain the first adjustment coefficient corresponding to the distance factor. For example, if the distance to the left foot is 4 meters, the distance to the head is 5 meters, and the preset base number is 0.9, the reference recovery values adjusted based on the first adjustment coefficient are as follows: left foot = 40 * 0.9^4 = 13.122, head = 50 * 0.9^5 = 29.525.
[0123] 3. Then, obtain the second adjustment coefficient corresponding to the remaining attribute value factor of the second object part. For example, if the remaining health value of the left foot is 38 points, the corresponding level number is level 2, and if the remaining health value of the head is 85, the corresponding level number is level 3, and if the specified coefficient is 0.1, the reference recovery values adjusted based on the first adjustment coefficient and the second adjustment coefficient are as follows: left foot = 13.122 * 0.2 = 2.6244, head = 29.525 * 0.1 = 2.9525.
[0124] Optionally, the reference recovery value adjusted based on the above first adjustment coefficient and second adjustment coefficient is a reference recovery reduction value. In this case, the recovery value for the second object site is the value obtained by subtracting the reference recovery reduction value from the reference recovery value, and the final recovery value of the object site is as follows: Left foot = 20 - 2.6244 = 17.3756, Head = 50 - 2.9525 = 47.0475. That is, the sub-attribute influence result can be obtained.
[0125] In step 1803, the sub-attribute influence results corresponding to a plurality of object sites are fused to obtain the buff attribute influence result of the second virtual object.
[0126] In some alternative embodiments, the sub-attribute influence results corresponding to a plurality of object sites are added together to obtain the buff attribute influence result of the second virtual object.
[0127] In some alternative embodiments, the virtual item described above is implemented as a virtual grenade. FIG. 20 is a complete flowchart of a method for displaying a virtual object according to an exemplary embodiment of the present application. As shown in FIG. 20, the method includes the following steps.
[0128] In step 2001, the virtual grenade explodes.
[0129] Exemplarily, referring to FIG. 21, a video of the virtual grenade exploding is displayed in the virtual scene 2100, where the explosion center when the virtual grenade explodes is point A.
[0130] The virtual scene further includes a virtual character 2101. The pose of the virtual character 2101 in the virtual scene 2100 is a prone position, and the side of the virtual character 2101 faces the explosion center point A.
[0131] Optionally, the virtual grenade is thrown into the virtual scene 2100 by the virtual character 2101, or the virtual grenade is thrown into the virtual scene 2100 by a virtual character or a non-player character (NPC) controlled by another player.
[0132] In step 2002, it is determined whether there is a virtual character within the explosion range.
[0133] That is, it is detected whether there is a virtual character within the explosion range of the virtual grenade.
[0134] Optionally, the explosion range of the virtual grenade includes at least one of the following ranges: 1. A circular range divided with the explosion center of the virtual grenade as the center and a preset distance as the radius is the explosion range of the virtual grenade; 2. A sector range divided with the explosion center of the virtual grenade as the center, a preset angle as the central angle, and a preset distance as the radius is the explosion range of the virtual grenade.
[0135] In step 2003, if there is no virtual character within the explosion range, the process ends.
[0136] Exemplarily, referring to FIG. 22, in the virtual scene 2200, when the virtual grenade explodes, if the distance from the virtual character 2201 to the explosion center 2202 in the drawing is too far, the calculation of the damage of the virtual grenade to the virtual character 2201 ends, that is, the process ends.
[0137] In step 2004, if there is a virtual character within the explosion range, connection lines from the explosion center to seven main part skeleton points are created.
[0138] Exemplarily, referring to FIG. 21, region 2102 is the explosion range of the virtual grenade, and region 2102 is a circle with the explosion center as the center and a radius of 12 meters. The virtual character 2101 being in region 2102 indicates that the virtual character receives the explosion damage of the virtual grenade.
[0139] In response to the virtual character existing within the explosion range of the virtual grenade, connection lines from the explosion center to seven main skeletal points of the virtual character are created. As shown in FIG. 21, the explosion center is point A, and from point A, a connection line to the left arm skeletal point of the virtual character 2101, a connection line to the right arm skeletal point, a connection line to the head skeletal point, a connection line to the chest skeletal point, a connection line to the abdominal skeletal point, a connection line to the left leg skeletal point, and a connection line to the right leg skeletal point are created respectively.
[0140] In step 2005, it is determined whether the connection line is blocked.
[0141] That is, it is respectively determined whether the connection lines between the explosion center and the seven main part skeletal points are blocked.
[0142] Exemplarily, it is determined whether the created connection lines between the explosion center point A and the skeletal points of each body part of the virtual character 2101 are blocked by obstacles.
[0143] In step 2006, if the connection line is blocked, no damage is given.
[0144] If the connection line between the explosion center and the head skeletal point is blocked, it indicates that the explosion does not damage the head of the virtual character.
[0145] As shown in FIG. 21, the upper body of the virtual character 2101 is behind the surrounding wall 2103, and the black connection lines in the figure are the connection lines blocked by the surrounding wall 2103, which indicates that the left arm, right arm, head, and chest do not receive explosion damage.
[0146] In step 2007, if the connection line is not interrupted, based on the damage attenuation based on distance, calculate the theoretical maximum damage to the said part.
[0147] Exemplarily, as shown in FIG. 21, the white connection line is a connection line not interrupted by the surrounding wall 2103. Thus, the left foot, right foot, and abdomen of the virtual character receive explosion damage. Next, calculate the theoretical maximum damage of the virtual grenade to the left foot, right foot, and abdomen of the virtual character respectively. Here, the theoretical maximum damage is determined based on the initial explosion damage value and the damage attenuation based on distance. First, determine the initial damage value of the virtual grenade for each body part of the virtual character. Optionally, the damage magnification of the virtual grenade applied to different body parts of the virtual character is different, and the damage ratio to each part can be set. For example, if you want to emphasize "head protection", set a higher ratio of the head receiving explosion damage, and vice versa. Exemplarily, set the initial explosion damage value of the virtual grenade, and due to the explosion damage of the virtual grenade at ultra-close range, give 60 points of damage to the head, 40 points of damage to the left / right arm, 50 points of damage to the chest / abdomen, and 40 points of damage to the left foot / right foot. Next, determine the distance-based damage attenuation of the virtual grenade for each body part of the virtual character. Optionally, the calculation formula for distance-based damage attenuation is as follows: Formula 10: F(X)=0.9^X, X∈(0, 12], F(X)=0, X∈(12, +∞), that is, within 12 meters, the damage attenuates at a magnification of 0.9^X (X represents the distance), and when it exceeds 12 meters, the damage becomes 0.
[0148] According to the above description, exemplarily, the distance between each body part of the virtual character and the explosion center is calculated individually for each part. In FIG. 21, according to the distance from the two feet and the abdomen to the explosion center, the left foot is the closest at 4 meters, the abdomen is the second closest at 5 meters, and the right foot is the third closest at 6 meters. The damage attenuated based on the distance to each part is as follows: left foot = 40 * 0.9^4 = 26.244, abdomen = 50 * 0.9^5 = 29.525, right foot = 40 * 0.9^6 = 21.25764. These are the theoretical maximum damages to each part.
[0149] In step 2008, determine whether the part is covered by protective gear.
[0150] That is, determine whether the body part of the virtual character is covered by protective gear.
[0151] Optionally, detect whether the head, chest, abdomen, both hands, and both feet of the virtual character are covered by protective gear respectively, and only the parts covered by protective gear will have the damage reduced.
[0152] In step 2009, if the part is not covered by protective gear, do not calculate the protective gear damage reduction coefficient and calculate the damage as usual.
[0153] Exemplarily, as shown in FIG. 21, since the left foot and the right foot of the virtual character 2101 are not covered by protective gear, there is no protective gear damage reduction, and there is no need to calculate the protective gear damage reduction coefficient. Calculate the damage as usual. That is, the damage received by the left foot is 26.244, and the damage received by the right foot is 21.25764, and step 2011 is executed.
[0154] In step 2010, if the part is covered by protective gear, calculate the protective gear damage reduction coefficient based on the protective gear level of the part.
[0155] Optionally, the protective gear has a corresponding protective gear level, and the protective gear damage reduction coefficients corresponding to different protective gear levels are different. The protective gear damage reduction coefficient is determined by the protective gear damage attenuation multiple, and the calculation formula of the protective gear damage attenuation multiple is as follows: Formula 11: O = 0.1 * Y, where Y represents the level of the protective gear, and the protective gear damage reduction coefficient is 1 - O. Exemplarily, as shown in Figure 21, the abdomen of the virtual character 2101 is covered with protective gear of level 5. The protective gear damage reduction coefficient of the level 5 protective gear is 1 - 0.1 * 5 = 0.5. Therefore, the damage of the virtual grenade to the abdomen, after calculating the protective gear damage reduction, is 29.525 * 0.5 = 14.7625.
[0156] In some alternative embodiments, after receiving damage reduction, the durability of the protective gear decreases to a certain extent, and the protective gear damage reduction coefficient increases in response to the decrease in the durability of the protective gear. That is, as the durability of the protective gear decreases, the protective gear damage reduction effect decreases.
[0157] In step 2011, calculate the projection damage reduction coefficient based on the projected area exposed by the character's pose.
[0158] The explosion damage of the virtual grenade is calculated based on the projection of the virtual character exposed to the virtual grenade. The smaller the exposed projection, the smaller the damage of the grenade to the virtual character.
[0159] Optionally, the ratio of the projected area of the virtual character exposed to the explosion center to the reference projected area of the virtual character is the projection damage reduction coefficient. First, obtain the projected area of the virtual character exposed to the explosion center. First, it is necessary to determine the projection plane. Exemplarily, as shown in FIG. 23, in the virtual scene 2300, the explosion center of the virtual grenade is point B. Create a connection line between point B and the central skeleton point of the virtual character 2301, and create a plane 2302 perpendicular to the connection line, and use the plane 2302 as the projection plane. Next, create connection lines from the explosion center point B to the skeleton points of the head, legs, and other body parts of the virtual character 2301. The projection of the extension line of the connection line on the plane is the first projected area corresponding to the current pose of the virtual character 2301. As can be seen from FIG. 23, half of the body part of the virtual character 2301 is blocked by the surrounding wall 2303. Therefore, it can be obtained that the projected area of the exposed virtual character 2301 is one-half of the first projected area. Second, obtain the reference projected area of the virtual character. Optionally, when the virtual character is in the standing pose state, the reference projected area of the virtual character is obtained by creating connection lines from the explosion center B to the skeleton points of the head, legs, and other body parts of the virtual character, and the projection of the extension line of the connection line on the plane is the reference projected area of the virtual character. Exemplarily, referring to FIG. 23, it can be seen that the side of the virtual character 2301 faces the explosion center and lies prone on the ground. In this case, the projected area of the prone pose virtual character 2301 is not much different from the projected area of the standing pose virtual character 2301, and the reference projected area of the virtual character 2301 is the first projected area. Therefore, the projection damage reduction coefficient is approximately 0.5.
[0160] In step 2012, output the final damage combined with the distance damage reduction coefficient, the armor damage reduction coefficient, and the projection damage reduction coefficient to the player side.
[0161] Since the virtual scenes in FIGS. 21 and 23 are the same virtual scene, the projected damage reduction coefficient of the virtual character 2301 calculated in FIG. 23 is also the projected damage reduction coefficient of the virtual character 2201 in FIG. 22.
[0162] In steps 2007 to 2010, the distance damage reduction coefficient and the armor damage reduction coefficient are calculated. Finally, the final damage to each part of the virtual character 2101 obtained by combining the damage reduction coefficients is as follows: left foot: 26.244 * 0.5 = 13.122, right foot: 21.25764 * 0.5 = 13.122, abdomen: 14.7625 * 0.5 = 7.38125. Then, the total damage received by the virtual character 2101 is 13.122 + 13.122 + 7.38125 = 33.62525. Optionally, the total damage received by the virtual character 2101 is displayed in the virtual scene 2101.
[0163] FIG. 24 shows a block diagram of the structure of a display device for virtual objects according to an exemplary embodiment of the present application. The device includes a trigger module 2410 configured to trigger a specified function of the virtual item within the functional range of the virtual item when a first virtual object throws the virtual item in the virtual scene, where the specified function is used to affect the attribute value of the virtual object located within the functional range, the trigger module 2410; an acquisition module 2420 configured to acquire sub-attribute influence results corresponding to the plurality of object parts respectively based on the positional relationship between the plurality of object parts of the second virtual object and the virtual item in response to the second virtual object being located within the functional range, where the sub-attribute influence results are influence results generated by each of the plurality of object parts under the specified function, the acquisition module 2420; A fusion module 2430 configured to fuse sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, where the attribute influence result indicates an overall influence result of the specified function of the virtual item on the second virtual object, and the fusion module 2430 is provided.
[0164] In some alternative embodiments, the fusion module 2430 is further configured to add the sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, or to perform weighted addition on the sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object.
[0165] Referring to FIG. 25, in some alternative embodiments, when there is an obstacle between a first object part among the plurality of object parts and the virtual item, the acquisition module 2420 includes a decision sub-module 2421 configured to determine that the first object part avoids sub-attribute influence caused by the specified function. The decision sub-module 2421 is further configured to, when a second object part among the plurality of object parts and the virtual item are penetrated and connected, determine a sub-attribute influence result corresponding to the second object part based on an influence factor between the second object part and the virtual item. The influence factor includes at least one of a distance factor, an armor factor, a projection relationship factor, an attitude factor of the second virtual object, a resistance factor, and a duration factor.
[0166] In some alternative embodiments, the apparatus further comprises a creation module 2440 configured to create connection lines from the position where the virtual item is thrown to the skeleton points corresponding to the plurality of object parts respectively, and a determination module 2450 configured to determine that there is an obstacle between the first object part and the virtual item in response to the connection line to the skeleton point corresponding to the first object part among the plurality of object parts being blocked. The determination module 2450 is further configured to determine that there is no obstacle between the second object part and the virtual item in response to the connection line to the skeleton point corresponding to the second object part among the plurality of object parts penetrating and connecting the second object part and the virtual item.
[0167] In some alternative embodiments, the determination sub-module 2421 comprises an acquisition unit 2422 configured to acquire a reference attribute value corresponding to the second object part, where the reference attribute value indicates an attribute influence result given to the second object part when there is no obstacle between the virtual item and the second object part, a determination unit 2423 configured to determine an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the second object part and the virtual item, and an adjustment unit 2424 configured to adjust the reference attribute value based on the adjustment coefficient to obtain a sub-attribute influence result corresponding to the second object part.
[0168] In some alternative embodiments, when the influencing factor includes a distance factor, the determination unit 2423 uses the distance between the second object part and the virtual item as an exponential coefficient, and uses the result of raising an adjusted base number with the exponential coefficient as the exponent as a first adjustment coefficient, where the adjusted base number is greater than 0 and less than 1, and the first adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying the reference attribute value. When the influencing factor includes an armor factor, the determination unit 2423 is further configured to determine a second adjustment coefficient based on the product of the armor level corresponding to the armor factor and an adjustment coefficient, where the adjustment coefficient is greater than 0 and less than 1, and the second adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying the reference attribute value.
[0169] In some alternative embodiments, when the influencing factor includes a projection relationship factor, the determination unit 2423 obtains the projected area of the second virtual object in the functional range, and is configured to use the ratio coefficient between the projected area of the second virtual object in the functional range and the reference projected area of the second virtual object as a third adjustment coefficient, where the ratio coefficient is greater than 0 and less than 1, and the third adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying the reference attribute value.
[0170] In some alternative embodiments, the determination unit 2423 is configured to create a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determine a projection plane perpendicular to the connection line to the central skeleton point. The determination unit 2423 is further configured to determine the projected area of the second object part among the plurality of object parts in the projection plane as the projected area of the second virtual object in the functional range.
[0171] In some alternative embodiments, when the influencing factor includes the posture factor of the second virtual object, the determination unit 2423 is configured to obtain the current pose of the second virtual object, and use the pose coefficient corresponding to the pose as the fourth adjustment coefficient, where the pose coefficient is greater than 0 and less than 1, and the fourth adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying the reference attribute value.
[0172] In some alternative embodiments, when the influencing factor includes a resistance factor, the determination unit 2423 obtains a resistance coefficient of the environment where the second object part of the second virtual object is located, where the resistance coefficient is greater than 0 and less than 1, and the resistance coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying the reference attribute value; when the influencing factor includes a duration factor, the determination unit 2423 is configured to obtain the duration of time for triggering the specified function of the virtual item, and determine a time length influencing coefficient based on the duration of time, where the time length influencing coefficient is greater than 0 and less than 1, and the time length influencing coefficient is used to multiply the reference attribute value to adjust the reference attribute value.
[0173] In some alternative embodiments, the acquisition unit 2422 is further configured to obtain an obstacle attribute of the obstacle when there is an obstacle between the first object part and the virtual item; the determination unit 2423 is further configured to determine an attribute influence of the specified function of the virtual item on the obstacle attribute; and the determination unit 2423 is further configured to determine a sub-attribute influence of the obstacle on the first object part under the influence of the specified function in response to the attribute influence of the specified function on the obstacle attribute satisfying a penetration requirement.
[0174] In some alternative embodiments, the obstacle includes a virtual wall shielding the first object part, and the obstacle attribute of the virtual wall includes an upper limit of wall damage blocking, and the determining unit 2423 is further configured to determine the sub-attribute effect on the first object part in the process of the wall breaking and exploding in response to the attack value of the specified function against the wall reaching the upper limit of wall damage blocking.
[0175] In some alternative embodiments, if the virtual item is a virtual attack item, the specified function of the virtual item generates a debuff attribute effect result on the second virtual object, and if the virtual item is a virtual medical item, the specified function of the virtual item generates a buff attribute effect result on the second virtual object.
[0176] FIG. 26 shows a block diagram of a structure of a virtual object display device according to another exemplary embodiment of the present application, the device comprising: a display module 2610 configured to display a second virtual object, the second virtual object including a plurality of object parts, and the second virtual object being a virtual object currently controlled by the terminal.
[0177] The display module 2610 is further configured to display a virtual item thrown into the virtual scene, the virtual item being used to trigger a specified function within a function range after being thrown into the virtual scene, the specified function being used to affect an attribute value of a virtual object located within the function range.
[0178] The display module 2610 is further configured to display the specified function of the virtual item that is triggered within the function range.
[0179] The display module 2610 is further configured to display the attribute influence result of the second virtual object in response to the second virtual object being located within the function range, where the attribute influence result is a result obtained by integrating sub-attribute influence results respectively corresponding to a plurality of object parts, and the sub-attribute influence result is an influence result generated by the plurality of object parts under the specified function respectively.
[0180] In some alternative embodiments, the display module 2610 is further configured to display a sub-attribute influence result indicating that the first object part has avoided the specified function when an obstacle exists between the first object part of the second virtual object and the virtual item in response to the second virtual object being located within the function range, and the display module 2610 is further configured to display a sub-attribute influence result of the second object part due to the influence of the specified function when the second object part among the plurality of object parts and the virtual item are connected in a penetrating manner.
[0181] FIG. 27 shows a block diagram of the structure of a computer device 2700 according to an exemplary embodiment of the present application. The computer device 2700 can be a smartphone, a tablet computer, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, or a desktop computer. The computer device 2700 can also be referred to by other names such as a user device, a portable computer device, a laptop computer device, or a desktop computer device. Usually, the computer device 2700 includes a processor 2701 and a memory 2702. The processor 2701 can include one or more processing cores (such as a 4-core processor or an 8-core processor). The processor 2701 can be implemented in at least one hardware form of a Digital Signal Processing (DSP), a Field-Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA). The processor 2701 can also include a main processor and a coprocessor. The main processor is a processor used to process data in a wake-up state and is also called a Central Processing Unit (CPU). The coprocessor is a low-power processor used to process data in a standby state. In some embodiments, the processor 2701 may be integrated with a Graphics Processing Unit (GPU), and the GPU is used to render and draw the content that needs to be displayed on the display screen.In some embodiments, the processor 2701 can further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning. The memory 2702 can include one or more computer-readable storage media, and the computer-readable storage media can be non-transitory storage media. The memory 2702 can also include high-speed random access memory and non-volatile memory, and can include, for example, one or more magnetic disk memories, flash memories, etc. In some embodiments, the non-transitory computer-readable storage media in the memory 2702 is configured to store at least one instruction, and when the at least one instruction is executed by the processor 2701, a method for displaying virtual objects according to embodiments of the present application is realized.
[0182] Exemplarily, the computer device 2700 further includes other components. It is obvious to those skilled in the art, and the structure shown in FIG. 27 does not constitute a limitation to the computer device 2700. The computer device 2700 can include more or fewer components than those shown in the figure, or combine some components, or use different component arrangements.
Claims
1. A method for displaying virtual objects executed by a computer device, comprising: When a first virtual object throws a virtual item in a virtual scene, triggering a specified function of the virtual item within a functional range of the virtual item, wherein the specified function is used to affect an attribute value of a virtual object located within the functional range; In response to a second virtual object being located within the functional range, obtaining a plurality of sub-attribute influence results respectively corresponding to a plurality of object parts of the second virtual object based on a positional relationship between the plurality of object parts of the second virtual object and the virtual item, wherein the plurality of sub-attribute influence results are a plurality of influence results simultaneously given to each of the plurality of object parts by the specified function; Fusing the plurality of sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, wherein the attribute influence result indicates an overall influence result of the specified function of the virtual item on the second virtual object; including: Based on a positional relationship between a plurality of object parts of the second virtual object and the virtual item, the step of obtaining a plurality of sub-attribute influence results respectively corresponding to the plurality of object parts includes: Determining a sub-attribute influence result corresponding to the object part based on an influence factor between the object part and the virtual item, wherein the influence factor includes a projection relationship factor; Based on an influence factor between the object part and the virtual item, the step of determining a sub-attribute influence result corresponding to the object part includes: Obtaining a reference attribute value corresponding to the object part, wherein the reference attribute value indicates an attribute influence result given to the object part when there is no obstacle between the virtual item and the object part; Determining an adjustment coefficient for adjusting the reference attribute value based on the influence factor between the object part and the virtual item; Adjusting the reference attribute value based on the adjustment coefficient to obtain a sub-attribute influence result corresponding to the object part. The step of determining an adjustment coefficient for adjusting the reference attribute value based on an influencing factor between the object part and the virtual item is as follows: The step includes obtaining a projected area of the second virtual object in the functional range, and using a ratio coefficient between the projected area of the second virtual object in the functional range and a reference projected area of the second virtual object as a third adjustment coefficient. The ratio coefficient is greater than 0 and less than 1, and the third adjustment coefficient is used to adjust the reference attribute value by using a product result obtained by multiplying the reference attribute value. Obtaining the projected area of the second virtual object in the functional range includes: Creating a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determining a projection plane perpendicular to the connection line to the central skeleton point; Determining a projected area of the object part in the projection plane as the projected area of the second virtual object in the functional range. Obtaining the reference projected area of the second virtual object includes: A method for displaying a virtual object, including determining, as the reference projected area, a projected area of the second virtual object in a front surface area of the second virtual object in the virtual scene, where the projected area is determined in a projection plane determined as a plane perpendicular to a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object.
2. The step of fusing a plurality of sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object includes: Adding the plurality of sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, or weighted-adding the plurality of sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object. The method for displaying a virtual object according to claim 1, including the above steps.
3. The step of obtaining a plurality of sub-attribute influence results respectively corresponding to the plurality of object parts based on a positional relationship between the plurality of object parts of the second virtual object and the virtual item is as follows: determining that a first object part among the plurality of object parts avoids a sub-attribute influence of the specified function when an obstacle exists between the first object part and the virtual item; When a second object part among the plurality of object parts and the virtual item are through-connected, determining a sub-attribute influence result corresponding to the second object part based on the influence factors between the second object part and the virtual item, wherein the influence factors further include at least one of a distance factor, an armor factor, a posture factor of the second virtual object, a drag factor, or a duration factor, and the drag factor is a drag in virtual air or virtual water current in the virtual scene; The method for displaying a virtual object according to claim 1 , comprising:
4. The method for displaying a virtual object includes: creating connection lines from the position where the virtual item is thrown to skeleton points corresponding to the plurality of object parts; determining that an obstacle exists between a first object part and the virtual item in response to a connection line to a skeleton point corresponding to a first object part of the plurality of object parts being interrupted; determining that no obstacle exists between the second object part and the virtual item in response to a connection line to a skeleton point corresponding to a second object part among the plurality of object parts penetrating and connecting the second object part and the virtual item; The method for displaying a virtual object according to claim 1 , further comprising:
5. determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the second object portion and the virtual item; If the influencing factor includes a distance factor, a step of using the distance between the second object part and the virtual item as an exponent coefficient, and using the exponent coefficient as an exponent of an adjustment base number as a first adjustment coefficient, wherein the adjustment base number is greater than 0 and less than 1, and the first adjustment coefficient is used to adjust the reference attribute value using a product obtained by multiplying the reference attribute value by the first adjustment coefficient; When the influencing factor includes a protective factor, a step of determining a second adjustment coefficient based on the product result of the protection level corresponding to the protective factor and an adjustment coefficient, where the adjustment coefficient is greater than 0 and less than 1, and the second adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying with the reference attribute value, the step and, The method for displaying a virtual object according to claim 3, including.
6. The step of determining an adjustment coefficient for adjusting the reference attribute value based on the influencing factor between the second object part and the virtual item is, When the influencing factor includes the posture factor of the second virtual object, the step includes obtaining the current pose of the second virtual object and using the pose coefficient corresponding to the pose as the fourth adjustment coefficient, where the pose coefficient is greater than 0 and less than 1, and the fourth adjustment coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying with the reference attribute value, The method for displaying a virtual object according to claim 3.
7. The step of determining an adjustment coefficient for adjusting the reference attribute value based on the influencing factor between the second object part and the virtual item is, When the influencing factor includes the resistance factor, the step is to obtain the resistance coefficient of the environment where the second object part of the second virtual object is located, where the resistance coefficient is greater than 0 and less than 1, and the resistance coefficient is used to adjust the reference attribute value by using the product result obtained by multiplying with the reference attribute value, the step and, When the influencing factor includes a duration factor, the step is to obtain the time length for triggering the specified function of the virtual item and determine a time length influencing coefficient based on the time length, where the time length influencing coefficient is greater than 0 and less than 1, and the time length influencing coefficient is used to multiply with the reference attribute value to adjust the reference attribute value, the step and, The method for displaying a virtual object according to claim 3, including.
8. When an obstacle exists between the first object part among the plurality of object parts and the virtual item, the step of determining that the first object part avoids the sub-attribute influence by the specified function is, When an obstacle exists between the first object part and the virtual item, the step of obtaining the obstacle attribute of the obstacle and, determining an attribute impact of a specified function of the virtual item on the obstacle attribute; determining the sub-attribute influence of the obstacle on the first object portion under the influence of the specified function in response to the attribute influence of the specified function on the obstacle attribute satisfying a penetration requirement; The method for displaying a virtual object according to claim 3 , comprising:
9. the obstacle includes a virtual wall that shields the first object part, and the obstacle attribute of the virtual wall includes an upper limit of damage blocking of the wall; In response to the attribute influence of the specified function on the obstacle attribute satisfying the penetration requirement, determining the sub-attribute influence that the obstacle exerts on the first object part under the influence of the specified function, determining the sub-attribute effect to be applied to the first object part in the process of the wall breaking and exploding in response to the attack value of the specified function against the wall reaching an upper limit of the damage cutoff of the wall; The method for displaying a virtual object according to claim 8 , comprising:
10. If the virtual item is a virtual attack item, the specified function of the virtual item generates a debuff attribute effect result on the second virtual object; If the virtual item is a virtual medical item, the specified function of the virtual item generates a buff attribute effect result on the second virtual object. The method for displaying a virtual object according to claim 1 .
11. 1. A method for displaying a virtual object, implemented by a computing device, comprising: displaying a second virtual object, the second virtual object including a plurality of object parts, the second virtual object being a virtual object currently controlled by the terminal; displaying a thrown virtual item into a virtual scene, wherein the virtual item is used to trigger a specified function within a function range after being thrown into the virtual scene, and the specified function is used to affect an attribute value of a virtual object located within the function range; displaying the specified function of the virtual item triggered within the function range; In response to the second virtual object being located within the functional range, a step of displaying an attribute influence result of the second virtual object, wherein the attribute influence result is a result obtained by synthesizing a plurality of sub-attribute influence results respectively corresponding to a plurality of object parts, and the plurality of sub-attribute influence results are a plurality of influence results simultaneously applied to the plurality of object parts by the specified function, the step; including; The sub-attribute influence result is obtained based on an influence factor between the object part and the virtual item; The influence factor includes a projection relationship factor; Determining a sub-attribute influence result corresponding to the object part based on an influence factor between the object part and the virtual item is; Obtaining a reference attribute value corresponding to the object part, wherein the reference attribute value indicates an attribute influence result applied to the object part when there is no obstacle between the virtual item and the object part; Determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object part and the virtual item; including adjusting the reference attribute value based on the adjustment coefficient to obtain a sub-attribute influence result corresponding to the object part; Determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object part and the virtual item is; Obtaining a projected area of the second virtual object in the functional range, and using a ratio coefficient between the projected area of the second virtual object in the functional range and a reference projected area of the second virtual object as a third adjustment coefficient, the ratio coefficient being greater than 0 and less than 1, and the third adjustment coefficient being used to adjust the reference attribute value using a product result obtained by multiplying the reference attribute value; Obtaining a projected area of the second virtual object in the functional range is; Creating a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determining a projection plane perpendicular to the connection line to the central skeleton point; including determining a projected area of the object part in the projection plane as the projected area of the second virtual object in the functional range; Obtaining a reference projected area of the second virtual object is; A method for displaying a virtual object, including determining, as the reference projected area, the projected area of a second virtual object in the virtual scene on a projection plane determined as a plane perpendicular to a connection line from a position where the virtual item is thrown to a central skeleton point of the second virtual object, which is the front surface area of the second virtual object in the virtual scene.
12. The step of displaying an attribute influence result of the second virtual object in response to the second virtual object being located within the function range is as follows: In response to the second virtual object being located within the function range, when there is an obstacle between a first object part of the second virtual object and the virtual item, the step of displaying a sub-attribute influence result indicating that the first object part has avoided the specified function; When a second object part among the plurality of object parts is penetration-connected to the virtual item, the step of displaying a sub-attribute influence result of the second object part due to the influence of the specified function; The method for displaying a virtual object according to claim 11.
13. A display device for a virtual object, comprising: A trigger module configured to trigger a specified function of the virtual item within a function range of the virtual item when a first virtual object throws the virtual item in a virtual scene, where the specified function is used to affect an attribute value of a virtual object located within the function range; An acquisition module configured to acquire a plurality of sub-attribute influence results respectively corresponding to the plurality of object parts based on a positional relationship between the plurality of object parts of the second virtual object and the virtual item in response to the second virtual object being located within the function range, where the plurality of sub-attribute influence results are a plurality of influence results simultaneously given to each of the plurality of object parts by the specified function; a fusion module configured to fuse a plurality of sub-attribute influence results respectively corresponding to the plurality of object parts to obtain an attribute influence result of the second virtual object, wherein the attribute influence result indicates an overall influence result of the specified function of the virtual item on the second virtual object; Equipped with The acquisition module: Determine a sub-attribute influence result corresponding to the object part according to an influence factor between the object part and the virtual item; The influencing factors include projection-related factors; The acquisition module: obtaining a reference attribute value corresponding to the object part, the reference attribute value indicating an attribute influence result given to the object part when there is no obstacle between the virtual item and the object part; determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object portion and the virtual item; adjust the reference attribute value according to the adjustment coefficient to obtain a sub-attribute influence result corresponding to the object part; When determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object part and the virtual item, acquiring a projection area of the second virtual object in the functional range, and using a ratio coefficient between the projection area of the second virtual object in the functional range and a reference projection area of the second virtual object as a third adjustment coefficient, the ratio coefficient being greater than 0 and less than 1, and the third adjustment coefficient being used to adjust the reference attribute value using a product obtained by multiplying the third adjustment coefficient by the reference attribute value; Obtaining the projection area of the second virtual object in the functional range includes: creating a connection line from the position where the virtual item was thrown to a central skeleton point of the second virtual object, and determining a projection plane perpendicular to the connection line to the central skeleton point; determining a projection area of the object portion on the projection plane as a projection area of the second virtual object in the functional range, Obtaining the reference projection area of the second virtual object includes: The front surface area of the second virtual object in the virtual scene, creating a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determining the projected area of the second virtual object in the projection plane determined as a plane perpendicular to the connection line to the central skeleton point as the reference projected area, a display device for a virtual object.
14. A display device for a virtual object, comprising a display module configured to display a second virtual object, the second virtual object including a plurality of object parts, the second virtual object being a virtual object controlled by a current terminal, the display module is further configured to display a virtual item thrown into the virtual scene, the virtual item being used to trigger a specified function within a functional range after being thrown into the virtual scene, and the specified function is used to affect the attribute values of virtual objects located within the functional range, the display module is further configured to display the specified function of the virtual item triggered within the functional range, the display module is further configured to display an attribute influence result of the second virtual object in response to the second virtual object being located within the functional range, the attribute influence result being a result of integrating a plurality of sub-attribute influence results respectively corresponding to a plurality of object parts, and the plurality of sub-attribute influence results being a plurality of influence results simultaneously given to the plurality of object parts by the specified function, the sub-attribute influence result is obtained based on an influence factor between the object part and the virtual item, the influence factor includes a projection relationship factor, determining a sub-attribute influence result corresponding to the object part based on an influence factor between the object part and the virtual item includes: obtaining a reference attribute value corresponding to the object part, the reference attribute value indicating an attribute influence result given to the object part when there is no obstacle between the virtual item and the object part, determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object part and the virtual item, Adjusting the reference attribute value based on the adjustment coefficient to obtain a sub-attribute influence result corresponding to the object part, Determining an adjustment coefficient for adjusting the reference attribute value based on an influence factor between the object part and the virtual item, Obtaining a projected area of the second virtual object in the functional range, and using a ratio coefficient between the projected area of the second virtual object in the functional range and a reference projected area of the second virtual object as a third adjustment coefficient, where the ratio coefficient is greater than 0 and less than 1, and the third adjustment coefficient is used to adjust the reference attribute value by using a product result obtained by multiplying the reference attribute value, Obtaining the projected area of the second virtual object in the functional range, Creating a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, and determining a projection plane perpendicular to the connection line to the central skeleton point, Determining the projected area of the object part in the projection plane as the projected area of the second virtual object in the functional range, Obtaining the reference projected area of the second virtual object, Determining, as the reference projected area, a projected area of the second virtual object in a projection plane determined as a plane perpendicular to a connection line from the position where the virtual item is thrown to the central skeleton point of the second virtual object, which is a front surface area of the second virtual object in the virtual scene, A display device for a virtual object.
15. A computer device comprising a processor and a memory, wherein at least one segment of a program is stored in the memory, and the processor loads and executes the at least one segment of the program to implement the method for displaying a virtual object according to any one of Claims 1 to 3, 5 to 9, or any one of Claims 11 to 12. A computer device.
16. A computer-readable storage medium storing at least one program code, A computer-readable storage medium that realizes the method for displaying a virtual object according to any one of claims 1 to 3, 5 to 9, or any one of 11 to 12 when the at least one program code is loaded and executed by a processor.
17. A computer program for causing a computer to execute the method for displaying a virtual object according to any one of claims 1 to 3, 5 to 9, or any one of 11 to 12.
Citation Information
Patent Citations
Game apparatus, and apparatus and method for image processing
JP2003334382A
Game device, game control program and recording medium recorded with program
JP2005006913A
Game device, image processing device and image processing method
JP2006318510A
Video type gun game device
JP2007000488A
Electronic game device, control method for electronic game and game program
JP2008093309A