Virtual character control method, medium, electronic equipment and program product

By responding to the trigger of the virtual object in the virtual scene, displaying the displacement of the virtual character within the preset range of the virtual object, the problem of virtual characters being unable to effectively cross obstacles or avoid attacks is solved, and the game experience is improved.

CN119548825APending Publication Date: 2025-03-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411612463.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In a virtual scene, the virtual character cannot effectively cross obstacles or avoid attacks due to player operation restrictions and/or character attribute restrictions, resulting in a reduced game experience.

Method used

By displaying the virtual scene and responding to the trigger of the virtual object, it is displayed that the virtual role located within the preset range of the virtual object is shifted. The displacement direction is related to the orientation of the virtual role relative to the virtual object, and the displacement distance is related to the distance between the virtual role and the virtual object.

Benefits of technology

It realizes a virtual character displacement method that is not limited by player operations and character attributes, enriches the virtual character displacement method and improves the player's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119548825A_ABST
    Figure CN119548825A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual character control method, a medium, electronic equipment and a program product, in particular to the technical field of man-machine interaction, and the method comprises the steps: displaying a virtual scene, responding to the triggering of a virtual object in the virtual scene, and displaying the displacement of a virtual character located in a preset range of the virtual object. The displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object, so that a player can control the displacement of the virtual character through the virtual object in the virtual scene, the displacement modes of the virtual character are enriched, and the user experience is improved. And moreover, players can perform richer game interaction actions by means of the virtual object, so that the game experience is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of human-computer interaction technology, and in particular to a virtual character control method, medium, electronic device and program product. Background Art

[0002] There are usually various obstacles in a virtual scene. When a player controls a virtual character to play in the virtual scene, the player often needs to cross the obstacles in the virtual scene, which requires the player to control the virtual character to move. Or when a player controls a virtual character to fight in a virtual scene, the player needs to control the virtual character to move to avoid attacks.

[0003] In the related art, the displacement of the virtual character is determined by the character attributes of the virtual character and / or the operation of the player. However, due to the limitations of the player's operation and / or the attributes of the virtual character, the displacement of the virtual character cannot cross obstacles or avoid attacks. Therefore, it is urgent to provide a displacement method that is not limited by the player's operation and / or the character's attributes to improve the player's gaming experience. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a virtual character control method, comprising: Display virtual scenes; In response to a virtual object in the virtual scene being triggered, a virtual character within a preset range of the virtual object is displayed to be displaced, wherein the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object.

[0006] In a second aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] In a third aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fourth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Based on the above technical solution, by displaying a virtual scene, and in response to a virtual object in the virtual scene being triggered, a virtual character within a preset range of the virtual object is displayed to be displaced, and the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object. This allows players to control the displacement of the virtual character through virtual objects in the virtual scene, which not only enriches the displacement methods of the virtual character, but also enables players to perform richer game interaction actions with the help of virtual objects, greatly improving the gaming experience.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flow chart of a virtual character control method according to some embodiments.

[0012] Figure 2 is a schematic diagram showing displacement of a virtual character according to some embodiments.

[0013] Figure 3 is a flow chart illustrating a method of determining a displacement direction according to some embodiments.

[0014] Figure 4 is a schematic diagram of direction vectors according to some embodiments.

[0015] Figure 5 is a flow chart illustrating a method of determining a displacement distance according to some embodiments.

[0016] Figure 6 is a schematic structural diagram of a virtual character control device according to some embodiments.

[0017] Figure 7 is a schematic diagram of the structure of an electronic device according to some embodiments. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0020] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0024] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0029] Figure 1 FIG. 1 is a flow chart of a method for controlling a virtual character according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a virtual character control method, which can be executed by an electronic device, specifically by a virtual character control device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.

[0030] In step 110 , a virtual scene is displayed.

[0031] Here, the virtual scene is a virtual scene displayed or provided when the application is running on the electronic device, wherein the virtual scene may refer to a game scene, such as a two-dimensional game scene, a three-dimensional game scene, a virtual reality scene, and the like.

[0032] It should be understood that displaying a virtual scene may refer to displaying a virtual scene picture obtained by capturing the virtual scene. In other words, the electronic device displays the virtual scene by displaying the virtual scene picture.

[0033] In step 120, in response to a virtual object in a virtual scene being triggered, a virtual character within a preset range of the virtual object is displayed to be displaced, wherein the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object.

[0034] Here, the virtual object in the virtual scene may refer to a virtual item. Exemplarily, the virtual object may be a virtual throwing object. For example, the virtual throwing object may be a virtual bomb, etc. Accordingly, when the virtual object is a virtual bomb, the triggering of the virtual object may be understood as the explosion of the virtual bomb.

[0035] In some embodiments, a virtual object may be displayed in a virtual scene in response to a skill release request. That is, a player character in a virtual scene may release a skill, and a virtual object corresponding to the skill may be set in the virtual scene. For example, the virtual object may be a virtual throwing object, and the player may release a game skill to throw the corresponding virtual throwing object in the virtual scene.

[0036] It is worth noting that the virtual object referred to in the embodiments of the present disclosure may refer to a virtual throwing object that mainly causes displacement to the virtual character, rather than a virtual throwing object that mainly causes damage to the virtual character. The virtual object may not cause damage to the virtual character or cause a small amount of damage to the virtual character.

[0037] A virtual character may refer to an movable object in a virtual scene, and the movable object may be a virtual person, a virtual animal, etc. Exemplarily, a virtual object may be a player-controlled character or a non-player-controlled character (NPC) in a virtual scene.

[0038] It should be noted that the triggering of the virtual object in the virtual scene can be actively triggered or passively triggered. For example, when the duration of the virtual object being set in the virtual scene reaches a preset duration (such as 5 seconds), the control of the virtual object is triggered. For another example, when a skill release request for the virtual object is detected again, the control of the virtual object is triggered. That is to say, the player can throw the virtual object in the virtual scene through a skill release request, and control the virtual object to be triggered in advance through a second skill release request. When the virtual object in the virtual scene is triggered, the virtual character within the preset range of the virtual object will be affected by the impact force generated by the triggering of the virtual object, thereby causing the virtual character to be displaced. In the embodiment of the present disclosure, when the virtual object is triggered, the virtual character within the preset range of the virtual object is displayed to be displaced by the impact force generated by the explosion of the virtual object. Of course, in other embodiments, the virtual object in the virtual scene can also be triggered by the game character of the same camp. For example, the virtual object released by the virtual character A in the virtual scene can be actively triggered by the virtual character B belonging to the same game camp as the virtual character A.

[0039] The preset range may refer to an explosion range of the virtual object, and the preset range may be an explosion range with the explosion center of the virtual object as the center point and the explosion radius of the virtual object as the radius.

[0040] It should be understood that the virtual character outside the preset range of the virtual object will not be affected by the impact force generated by the triggering of the virtual object. In other words, the virtual character in the virtual scene that exceeds the preset range of the virtual object will not be displaced by the impact force generated by the virtual object.

[0041] Among them, the displacement direction of the virtual character is related to the position of the virtual character relative to the virtual object. Exemplarily, the displacement direction of the virtual character can be to displace along the direction of the line connecting the virtual character and the virtual object. Of course, when the position of the virtual character relative to the virtual object is different, the displacement direction may also be different. For example, when the position of the virtual character relative to the virtual object is biased towards the vertical direction of the virtual scene, the displacement direction of the virtual character may be the vertical direction of the virtual scene. When the position of the virtual character relative to the virtual object is biased towards the horizontal direction of the virtual scene, the displacement direction of the virtual character may be the horizontal direction of the virtual scene. In other words, the displacement direction of the virtual character may be the vertical direction or the horizontal direction of the virtual scene.

[0042] The displacement distance of the virtual character is related to the distance between the virtual character and the virtual object. Exemplarily, the displacement distance of the virtual character may be inversely proportional to the distance between the virtual character and the virtual object. That is, the closer the distance between the virtual character and the virtual object, the greater the displacement distance. It should be understood that when the virtual character is closer to the virtual object, the greater the impact force received by the virtual character, and the greater the displacement distance of the virtual character, when the virtual character is farther from the virtual object, the smaller the impact force received by the virtual character, and the smaller the displacement distance of the virtual character.

[0043] When a virtual object in a virtual scene is triggered, the virtual character located within a preset range of the virtual object is displayed to be displaced by the above displacement distance along the displacement direction.

[0044] Figure 2 FIG. 1 is a schematic diagram showing the displacement of a virtual character according to some embodiments. Figure 2 As shown, the virtual scene 201 includes a virtual object 202 and a virtual character 203. When the virtual object 202 is triggered, the virtual character 203 is subjected to the impact force generated by the virtual object 202, and the virtual character 203 moves along a displacement direction 204, and the displacement distance of the virtual character 203 is a distance calculated based on the distance between the virtual character and the virtual object.

[0045] Thus, by displaying a virtual scene, and in response to a virtual object in the virtual scene being triggered, the virtual character within the preset range of the virtual object is displayed to be displaced, and the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object, so that the player can control the virtual character to move through the virtual object in the virtual scene, which not only enriches the displacement mode of the virtual character, but also enables the player to perform richer game interactive actions with the help of virtual objects, greatly improving the game experience. In some scenes, when the player needs to control the virtual character to cross an obstacle, the player can control the virtual character to release the virtual object in the virtual scene, and cross the obstacle with the help of the displacement caused by the virtual object. In other scenes, when the player controls the virtual character to fight, the player can control the virtual character to release the virtual object in the virtual scene to repel the enemy or provide displacement for the virtual character itself and teammates through the displacement generated by the virtual object.

[0046] In some practicable implementations, in step 120, in response to a virtual object in the virtual scene being triggered, a virtual character within a preset range of the virtual object may be displayed to be displaced, and damage may be caused to the virtual character within the preset range of the virtual object.

[0047] Here, after the virtual object is triggered, it can cause displacement to the virtual character within the preset range of the virtual object, and can also cause damage to the virtual character within the preset range of the virtual object. Taking a virtual bomb as an example, when the virtual bomb explodes, the virtual character within the preset range of the virtual bomb will be bounced away and also be damaged by the virtual bomb.

[0048] It should be understood that the damage caused to the virtual character within the preset range of the virtual object can be determined according to the distance between the virtual character and the virtual object. For example, the size of the damage value can be inversely proportional to the distance between the virtual character and the virtual object. In other words, the closer the virtual character is to the virtual object, the greater the damage it will suffer.

[0049] In some embodiments, damage may be caused to a target virtual character within a preset range of the virtual object, wherein the target virtual character is a virtual character belonging to a different game camp from the virtual character that releases the virtual object.

[0050] Game camps refer to the different teams or factions that virtual characters belong to in the game. For example, virtual characters belonging to the same game camp are teammates, while virtual characters belonging to different game camps are enemies.

[0051] When the virtual object is triggered, if there is a target virtual character belonging to a different game camp from the virtual character releasing the virtual object among the virtual characters located within the preset range of the virtual object, the target virtual character will be displaced and damaged at the same time.

[0052] That is, in the embodiment of the present disclosure, when a virtual object is triggered, it will cause damage to the target virtual character that is in a hostile relationship with the virtual character that releases the virtual object, but will not cause damage to teammates.

[0053] Therefore, through the above implementation, the virtual object can not only cause displacement to the virtual character, but also cause damage to the virtual character, which greatly enriches the gameplay and fun of the game.

[0054] Figure 3 FIG. 4 is a flow chart showing a method of determining a displacement direction according to some embodiments. Figure 3 As shown, in some practicable implementations, the displacement direction may be determined by the following steps.

[0055] In step 310, a direction vector between the virtual character and the virtual object is determined according to the first position of the virtual object and the second position of the virtual character.

[0056] Here, the first position of the virtual object refers to the coordinate information of the virtual object in the virtual scene, and the second position of the virtual character refers to the coordinate information of the virtual character in the virtual scene. The direction vector between the virtual character and the virtual object can be determined through the first position and the second position.

[0057] It should be understood that the direction vector between the virtual character and the virtual object may be a direction vector from the virtual character to the virtual object, or may be a direction vector from the virtual object to the virtual character.

[0058] In step 320, the displacement direction of the virtual character is determined according to the direction vector.

[0059] Here, the direction vector may be used as the displacement direction of the virtual character, that is, the direction of the line between the virtual object and the virtual character may be used as the displacement direction of the virtual character.

[0060] In some embodiments, when the angle between the direction vector and the vertical direction of the virtual scene is within a first angle range, the direction vector is determined as the displacement direction.

[0061] The vertical direction of the virtual scene may refer to the Z axis of the coordinate axis used to construct the virtual scene. The angle between the direction vector and the vertical direction of the virtual scene may refer to the angle between the direction vector and the positive direction or negative direction of the Z axis.

[0062] The first angle range may be an angle range set by the developer according to actual conditions. For example, the first angle range may be [0°, 30°]. It should be understood that the maximum value in the first angle range is not greater than 45°. When the maximum value in the first angle range is not greater than 45°, it indicates that the current orientation of the virtual character and the virtual object tends to move in the vertical direction of the virtual scene.

[0063] The angle between the direction vector and the vertical direction of the virtual scene is within the first angle range, indicating that the virtual character is displacing in the vertical direction of the virtual scene. For example, assuming that the first angle range is [0°, 30°], if the angle between the direction vector and the vertical direction of the virtual scene is 15°, it indicates that the virtual character is currently displacing in the vertical direction of the virtual scene.

[0064] Accordingly, when the angle between the direction vector and the vertical direction of the virtual scene is within the first angle range, the direction vector may be determined as the displacement direction.

[0065] In some other embodiments, when the angle between the direction vector and the horizontal direction of the virtual scene is within a second angle range, the direction vector is determined as the displacement direction.

[0066] The horizontal direction of the virtual scene may refer to the X-axis of the coordinate axis used to construct the virtual scene. The angle between the direction vector and the horizontal direction of the virtual scene may refer to the angle between the direction vector and the positive direction or negative direction of the X-axis.

[0067] The second angle range can be an angle range set by the developer according to actual conditions. For example, the second angle range can be [0°, 30°]. It should be understood that the maximum value in the second angle range is not greater than 45°. When the maximum value in the second angle range is not greater than 45°, it means that the current orientation of the virtual character and the virtual object tends to move in the horizontal direction of the virtual scene. It should be noted that the first angle range and the second angle range can be the same or different in value, and can be set according to actual conditions.

[0068] The angle between the direction vector and the horizontal direction of the virtual scene is within the second angle range, indicating that the virtual character is currently displacing in the horizontal direction of the virtual scene. For example, assuming that the second angle range is [0°, 30°], if the angle between the direction vector and the horizontal direction of the virtual scene is 10°, it indicates that the virtual character is currently displacing in the horizontal direction of the virtual scene.

[0069] Correspondingly, when the angle between the direction vector and the horizontal direction of the virtual scene is within the second angle range, the direction vector can be determined as the displacement direction.

[0070] In some other embodiments, when the angle between the direction vector and the vertical direction of the virtual scene is not within the first angle range and the angle between the direction vector and the horizontal direction of the virtual scene is not within the second angle range, the movement trend of the virtual character is determined based on the direction vector, and based on the movement trend, the direction vector is corrected to a target direction vector, and the target direction vector is determined as the displacement direction.

[0071] Here, the angle between the target direction vector and the vertical direction of the virtual scene is within a first angle range, or the angle between the target direction vector and the horizontal direction of the virtual scene is within a second angle range.

[0072] Exemplarily, the movement trend of the virtual character includes a first movement trend or a second movement trend, the first movement trend represents that the virtual character tends to move in the vertical direction of the virtual scene, and the second movement trend represents that the virtual character tends to move in the horizontal direction of the virtual scene. Accordingly, the target direction vector includes a first target direction vector or a second target direction vector. The angle between the first target direction vector and the vertical direction of the virtual scene is within a first angle range, and the angle between the second target direction vector and the horizontal direction of the virtual scene is within a second angle range.

[0073] When the movement trend is the first movement trend, the direction vector is corrected to the first target direction vector, and the first target direction vector is determined as the displacement direction. When the movement trend is the second movement trend, the direction vector is corrected to the second target direction vector, and the second target direction vector is determined as the displacement direction.

[0074] Among them, when the angle between the direction vector and the vertical direction of the virtual scene is not within the first angle range and the angle between the direction vector and the horizontal direction of the virtual scene is not within the second angle range, it means that the virtual character tends to move neither in the vertical direction nor in the horizontal direction.

[0075] In this case, the movement trend of the virtual character can be determined according to the direction vector, and the movement trend indicates that the virtual character tends to move in the vertical direction or tends to move in the horizontal direction. For example, the movement trend of the virtual character can be determined according to the size of the angle between the virtual character and the horizontal direction or the size of the angle between the virtual character and the vertical direction. For example, when the angle between the virtual character and the horizontal direction is less than 45°, the movement trend of the virtual character tends to move in the horizontal direction.

[0076] The movement trend of the virtual character includes a first movement trend or a second movement trend. The first movement trend indicates that the virtual character tends to move in a vertical direction of the virtual scene, and the second movement trend indicates that the virtual character tends to move in a horizontal direction of the virtual scene.

[0077] When the motion trend is the first motion trend, the direction vector is corrected to a first target direction vector, and the first target direction vector is determined as the displacement direction, wherein the angle between the first target direction vector and the vertical direction of the virtual scene is within a first angle range.

[0078] It is worth noting that the corrected first target direction vector can make the angle between the first target direction vector and the vertical direction of the virtual scene equal to the upper limit of the first angle range. For example, if the first angle range is [0°, 30°], the angle between the first target direction vector and the vertical direction can be equal to 30°. Of course, the corrected first target direction vector can make the angle between the first target direction vector and the vertical direction of the virtual scene less than the upper limit of the first angle range. For example, the angle between the first target direction vector and the vertical direction can be equal to 15°, which can be set according to needs.

[0079] When the motion trend is the second motion trend, the direction vector is corrected to a second target direction vector, and the second target direction vector is determined as the displacement direction, wherein the angle between the second target direction vector and the horizontal direction of the virtual scene is within a second angle range.

[0080] It is worth noting that the corrected second target direction vector can make the angle between the second target direction vector and the horizontal direction of the virtual scene equal to the upper limit of the second angle range. For example, if the second angle range is [0°, 30°], the angle between the second target direction vector and the horizontal direction can be equal to 30°. Of course, the corrected second target direction vector can make the angle between the second target direction vector and the horizontal direction of the virtual scene less than the upper limit of the second angle range. For example, the angle between the second target direction vector and the horizontal direction can be equal to 15°, which can be set according to needs.

[0081] It should be understood that by correcting the direction vector to the first target direction vector or the second target direction vector, the virtual character can be displaced more along the vertical direction or horizontal direction of the virtual scene, so that the virtual character is displaced higher or farther, rather than displacing the virtual character in an oblique direction.

[0082] Figure 4 is a schematic diagram of a direction vector according to some embodiments. Figure 4 As shown, when the angle between the first direction vector 403 of the virtual character and the virtual object 202 and the Z axis is within the first angle range 401, the first direction vector 403 is used as the displacement direction of the virtual character. When the angle between the second direction vector 404 of the virtual character and the virtual object 202 and the X axis is within the second angle range 402, the second direction vector 404 is used as the displacement direction of the virtual character.

[0083] When the angle between the third direction vector 405 of the virtual character and the virtual object 202 and the Z axis is not within the first angle range 401 and the angle between the third direction vector 405 and the X axis is not within the second angle range 402, the movement trend of the virtual character can be determined according to the distance between the third direction vector 405 and the Z axis and the X axis. Figure 4 As shown, the third direction vector 405 is closer to the Z axis, and the movement trend of the virtual character is the first movement trend. Accordingly, the third direction vector 405 can be corrected within the first angle range 401 to enable the virtual character to move more toward the Z axis, thereby enabling the virtual character to move higher.

[0084] When the angle between the fourth direction vector 406 of the virtual character and the virtual object 202 and the Z axis is not within the first angle range 401 and the angle between the fourth direction vector 406 and the X axis is not within the second angle range 402, the movement trend of the virtual character can be determined according to the distance between the fourth direction vector 406 and the Z axis and the X axis. Figure 4 As shown, the fourth direction vector 406 is closer to the X axis, and the movement trend of the virtual character is the second movement trend. Accordingly, the fourth direction vector 406 can be placed within the second angle range 402 to allow the virtual character to move more toward the X axis, thereby allowing the virtual character to move farther.

[0085] Therefore, through the above implementation, the displacement direction of the virtual character when the virtual object is triggered can be accurately determined. Moreover, by correcting the direction vector, the virtual character can be displaced to a higher or farther direction, so that the player can control the virtual character to achieve richer displacement effects, greatly improving the player's gaming experience.

[0086] In some practicable implementations, before the virtual object is triggered, the virtual object can be attached to a virtual scene or to a virtual character in the virtual scene.

[0087] Here, the virtual object has stickiness, so that the virtual object can be attached to the virtual scene, or attached to the virtual character of the virtual scene. For example, for a virtual throwing object, the virtual throwing object can be attached to the body of the virtual character to move with the virtual character. The virtual throwing object can also be attached to any virtual object in the virtual scene, such as a virtual wall, a virtual ground, a virtual tree, and the like.

[0088] It is worth noting that, when a virtual object is displayed in a virtual scene in response to a skill release request, the virtual object can be attached to the virtual scene or to the virtual character in the virtual scene if the virtual character that releases the virtual object learns the target skill.

[0089] For example, when the virtual character has learned the game skill of sticky virtual bombs, the virtual object released by the virtual character in the virtual scene by releasing the skill can be attached to the virtual scene or to the virtual character in the virtual scene. If the virtual character has not learned the game skill of sticky virtual bombs, the virtual object released by the virtual character in the virtual scene by releasing the skill may not be attached to the virtual scene or to the virtual character in the virtual scene.

[0090] Therefore, through the above implementation, the player can control the virtual object to attach to the virtual scene or virtual character, so that the player can perform different game actions, which greatly improves the player's gaming experience.

[0091] Figure 5 FIG. 4 is a flow chart of determining a displacement distance according to some embodiments. Figure 5 As shown, in some practicable implementations, the displacement distance may be determined by the following steps.

[0092] In step 510, the target force of the virtual character is determined according to the distance between the virtual object and the virtual character and the impact force generated by the virtual object.

[0093] Here, the distance between the virtual object and the virtual character can be determined by the first position of the virtual object in the virtual scene and the second position of the virtual character in the virtual scene. The impact force generated by the virtual object can refer to the maximum impact force generated by the virtual object at the explosion center point and the minimum impact force generated by the virtual object at the farthest explosion range.

[0094] Exemplarily, the impact range of the virtual object is a preset range. At the center point of the preset range, the explosion of the virtual object generates a maximum impact force, and at the minimum point of the preset range, the explosion of the virtual object generates a minimum impact force.

[0095] According to the distance between the virtual object and the virtual character, the maximum impact force and the minimum impact force, linear interpolation can be performed to obtain the target force received by the virtual character at the distance. It should be noted that the closer the virtual character is to the virtual object, the greater the target force received by the virtual character.

[0096] In step 520, the displacement distance of the virtual character is determined according to the target force of the virtual character.

[0097] Here, the target force of the virtual character is positively correlated with the displacement distance of the virtual character. That is, the greater the target force, the greater the displacement distance of the virtual character.

[0098] It is worth noting that, when the distances are the same, the target forces on the virtual characters in different directions of the virtual object may be the same. Of course, when the distances are the same, the target forces on the virtual characters in different directions of the virtual object may be different.

[0099] In some embodiments, the initial force on the virtual character may be determined based on the distance between the virtual object and the virtual character and the impact force generated by the virtual object, and then the target force on the virtual character may be determined based on the initial force and the displacement direction of the virtual character.

[0100] The initial force can be understood as the impact force received by the virtual character at a specific distance. The initial force and the displacement direction of the virtual character can be used to calculate the target force of the virtual character in the displacement direction, thereby obtaining the displacement distance of the virtual character in the displacement direction.

[0101] It should be understood that the displacement direction may be obtained through the above embodiments. For example, the displacement direction may be a direction vector, the displacement direction may be a first target direction vector, or the displacement direction may be a second target displacement direction.

[0102] In some embodiments, when the virtual object is in the air of the virtual scene, the initial force of the virtual character can be determined according to the distance between the virtual object and the virtual character, the impact force generated by the virtual object, and a preset air force coefficient.

[0103] When the virtual character within the preset range of the virtual object is in the air, the impact force on the virtual character will be attenuated to a certain extent. The product of the interpolation result obtained according to the distance between the virtual object and the virtual character, the impact force generated by the virtual object and the air force coefficient can be determined as the initial force on the virtual character in the air.

[0104] It is worth noting that by obtaining the initial force of the virtual character through the air force coefficient, the air displacement effect of the real world can be more realistically simulated in the virtual scene, making the game more realistic and immersive.

[0105] As some examples, when the angle between the displacement direction and the vertical direction of the virtual scene is within a first angle range, the target force of the virtual character is determined based on the initial force, the angle between the displacement direction and the vertical direction of the virtual scene, and the unit vector corresponding to the displacement direction.

[0106] Exemplarily, the target force may be calculated by a first calculation formula, which is:

[0107] in, To target force, is the initial force, is the angle between the displacement direction and the vertical direction of the virtual scene, is the unit vector corresponding to the displacement direction.

[0108] As some further examples, when the angle between the displacement direction and the horizontal direction of the virtual scene is within the second angle range, the target force of the virtual character is determined based on the initial force, the angle between the displacement direction and the horizontal direction of the virtual scene, and the unit vector corresponding to the displacement direction.

[0109] Exemplarily, the target force can be calculated by a second calculation formula, and the second calculation formula is:

[0110] in, To target force, is the initial force, is the angle between the displacement direction and the horizontal direction of the virtual scene, is the unit vector corresponding to the displacement direction.

[0111] Therefore, through the above implementation, the impact force on the virtual character can be accurately calculated, so as to accurately determine the displacement distance corresponding to the virtual character within the preset range of the virtual object, so as to make the game more realistic and immersive.

[0112] Figure 6 FIG. 1 is a schematic diagram of a virtual character control device according to some embodiments. Figure 6 As shown, the embodiment of the present disclosure provides a virtual character control device 600, and the virtual character control device 600 includes: A first display module 601 is configured to display a virtual scene; The second display module 602 is configured to display, in response to a virtual object in the virtual scene being triggered, a displacement of a virtual character within a preset range of the virtual object, wherein the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object.

[0113] Optionally, the virtual character control device 600 further includes: A first determining module is configured to determine a direction vector between the virtual character and the virtual object according to a first position of the virtual object and a second position of the virtual character; The second determination module is configured to determine the displacement direction of the virtual character according to the direction vector.

[0114] Optionally, the second determining module is specifically configured to: When the angle between the direction vector and the vertical direction of the virtual scene is within a first angle range, determining the direction vector as the displacement direction; When the angle between the direction vector and the horizontal direction of the virtual scene is within a second angle range, the direction vector is determined as the displacement direction.

[0115] Optionally, the second determining module is further configured to: When the angle between the direction vector and the vertical direction of the virtual scene is not within the first angle range and the angle between the direction vector and the horizontal direction of the virtual scene is not within the second angle range, determining the movement trend of the virtual character according to the direction vector; According to the movement trend, the direction vector is corrected to a target direction vector, and the target direction vector is determined as the displacement direction, and the angle between the target direction vector and the vertical direction of the virtual scene is within the first angle range, or the angle between the target direction vector and the horizontal direction of the virtual scene is within the second angle range.

[0116] Optionally, before the virtual object is triggered, the virtual object can be attached to the virtual scene or to a virtual character in the virtual scene.

[0117] Optionally, the second display module 602 is specifically configured as: In response to a virtual object in the virtual scene being triggered, the virtual character located within a preset range of the virtual object is displayed to be displaced, and damage is caused to the virtual character located within the preset range of the virtual object.

[0118] Optionally, the second display module 602 is specifically configured as: Causing damage to a target virtual character within a preset range of the virtual object, wherein the target virtual character is a virtual character belonging to a different game camp from the virtual character that releases the virtual object.

[0119] Optionally, the virtual character control device 600 further includes: A third determination module is configured to determine a target force on the virtual character according to a distance between the virtual object and the virtual character and an impact force generated by the virtual object; The fourth determination module is configured to determine the displacement distance of the virtual character according to the target force of the virtual character.

[0120] Optionally, the fourth determining module is specifically configured to: determining an initial force applied to the virtual character according to a distance between the virtual object and the virtual character and an impact force generated by the virtual object; A target force of the virtual character is determined according to the initial force and the displacement direction of the virtual character.

[0121] Optionally, the fourth determining module is specifically configured to: When the angle between the displacement direction and the vertical direction of the virtual scene is within a first angle range, determining a target force of the virtual character according to the initial force, the angle between the displacement direction and the vertical direction of the virtual scene, and a unit vector corresponding to the displacement direction; When the angle between the displacement direction and the horizontal direction of the virtual scene is within the second angle range, the target force of the virtual character is determined according to the initial force, the angle between the displacement direction and the horizontal direction of the virtual scene, and the unit vector corresponding to the displacement direction.

[0122] Optionally, the third determining module is specifically configured to: When the virtual object is in the air of the virtual scene, the initial force of the virtual character is determined according to the distance between the virtual object and the virtual character, the impact force generated by the virtual object, and a preset air force coefficient.

[0123] The logic of the method executed by each functional module in the above-mentioned virtual character control device 600 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.

[0124] Reference below Figure 7 , which shows a schematic diagram of the structure of an electronic device (e.g., terminal device) 700 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0125] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0126] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0127] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0128] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0129] In some embodiments, the electronic devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0130] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0131] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: displays a virtual scene; in response to a virtual object in the virtual scene being triggered, displays a displacement of a virtual character within a preset range of the virtual object, wherein the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object.

[0132] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0134] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0135] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0136] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0137] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0138] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0139] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A virtual character control method, characterized in that: include: Display virtual scenes; In response to a virtual object in the virtual scene being triggered, a virtual character within a preset range of the virtual object is displayed to be displaced, wherein the displacement direction of the virtual character is related to the orientation of the virtual character relative to the virtual object, and the displacement distance of the virtual character is related to the distance between the virtual character and the virtual object.

2. The method according to claim 1, characterized in that The displacement direction of the virtual character is determined by the following steps: Determining a direction vector between the virtual character and the virtual object according to a first position of the virtual object and a second position of the virtual character; The displacement direction of the virtual character is determined according to the direction vector.

3. The method according to claim 2, characterized in that Determining the displacement direction of the virtual character according to the direction vector includes: When the angle between the direction vector and the vertical direction of the virtual scene is within a first angle range, determining the direction vector as the displacement direction; When the angle between the direction vector and the horizontal direction of the virtual scene is within a second angle range, the direction vector is determined as the displacement direction.

4. The method according to claim 3, characterized in that The method further comprises: When the angle between the direction vector and the vertical direction of the virtual scene is not within the first angle range and the angle between the direction vector and the horizontal direction of the virtual scene is not within the second angle range, determining the movement trend of the virtual character according to the direction vector; According to the movement trend, the direction vector is corrected to a target direction vector, and the target direction vector is determined as the displacement direction, and the angle between the target direction vector and the vertical direction of the virtual scene is within the first angle range, or the angle between the target direction vector and the horizontal direction of the virtual scene is within the second angle range.

5. The method according to claim 1, characterized in that Before the virtual object is triggered, the virtual object can be attached to the virtual scene or to a virtual character in the virtual scene.

6. The method according to claim 1, characterized in that In response to the virtual object in the virtual scene being triggered, displaying the displacement of the virtual character within the preset range of the virtual object includes: In response to a virtual object in the virtual scene being triggered, the virtual character located within a preset range of the virtual object is displayed to be displaced, and damage is caused to the virtual character located within the preset range of the virtual object.

7. The method according to claim 6, characterized in that The causing harm to the virtual character within the preset range of the virtual object includes: Causing damage to a target virtual character within a preset range of the virtual object, wherein the target virtual character is a virtual character belonging to a different game camp from the virtual character that releases the virtual object.

8. The method according to any one of claims 1 to 7, characterized in that The displacement distance is determined by the following steps: determining a target force on the virtual character according to a distance between the virtual object and the virtual character and an impact force generated by the virtual object; The displacement distance of the virtual character is determined according to the target force of the virtual character.

9. The method according to claim 8, characterized in that The step of determining a target force on the virtual character according to the distance between the virtual object and the virtual character and the impact force generated by the virtual object includes: determining an initial force applied to the virtual character according to a distance between the virtual object and the virtual character and an impact force generated by the virtual object; A target force of the virtual character is determined according to the initial force and the displacement direction of the virtual character.

10. The method according to claim 9, characterized in that The step of determining a target force on the virtual character according to the initial force and the displacement direction of the virtual character includes: When the angle between the displacement direction and the vertical direction of the virtual scene is within a first angle range, determining a target force of the virtual character according to the initial force, the angle between the displacement direction and the vertical direction of the virtual scene, and a unit vector corresponding to the displacement direction; When the angle between the displacement direction and the horizontal direction of the virtual scene is within the second angle range, the target force of the virtual character is determined according to the initial force, the angle between the displacement direction and the horizontal direction of the virtual scene, and the unit vector corresponding to the displacement direction.

11. The method according to claim 9, characterized in that The determining the initial force of the virtual character according to the distance between the virtual object and the virtual character and the impact force generated by the virtual object includes: When the virtual object is in the air of the virtual scene, the initial force of the virtual character is determined according to the distance between the virtual object and the virtual character, the impact force generated by the virtual object, and a preset air force coefficient.

12. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 11 are implemented.

13. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.