Methods and devices for controlling virtual props, storage media and electronic devices
By using virtual props to control the device, and by utilizing collision detection within the explosion range and aerial maneuvers, the problem of low displacement efficiency of virtual characters has been solved, thus improving operational efficiency and enhancing user interaction.
Patent Information
- Application Number
- CN202211017831.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-08-23
AI Technical Summary
In existing technologies, it is difficult to efficiently force virtual characters to move using virtual props, especially when passing through obstacles, resulting in low operational efficiency.
By controlling a virtual character to throw target virtual props, collision detection is performed within a preset range when the props explode to determine the target direction and distance, the virtual character is controlled to move, and preset operations or virtual buildings are performed while in the air.
It enables virtual characters to move efficiently in the presence of obstacles, enhances operational efficiency, and provides more possibilities for aerial maneuvers and social interaction.
Smart Images

Figure CN117654040B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for controlling virtual props, a storage medium, and an electronic device. Background Technology
[0002] Currently, users can only damage some virtual characters or generate smoke in specific areas by throwing virtual items. When it is necessary to force certain virtual characters to move, they can only attack through virtual skills. However, virtual skill attacks generally cannot pass through obstacles, making it difficult and unlikely to force certain virtual characters to move. Consequently, this leads to the technical problem of low operational efficiency when users force virtual characters to move.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a method and apparatus for controlling virtual props, a storage medium and an electronic device, to at least solve the technical problem in the related art that virtual characters cannot be forced to move through virtual props.
[0005] According to one aspect of the embodiments of this application, a method for controlling a virtual prop is provided, comprising: responding to a first operation command, controlling a first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; when the target virtual prop explodes at a target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, controlling the first virtual character to displace; when the first virtual character displaces into the air, displaying the first virtual character in an airborne state; responding to a second operation command, controlling the first virtual character to create a first virtual building, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0006] According to another aspect of the embodiments of this application, a control device for virtual props is also provided, comprising: a first control module, configured to control a first virtual character to throw a target virtual prop in response to a first operation command, wherein the target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; a second control module, configured to control the first virtual character to displace when the target virtual prop explodes at a target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion; a display module, configured to display the first virtual character in an air state when the first virtual character displaces into the air; and a creation module, configured to control the first virtual character to create a first virtual building in response to a second operation command, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0007] Optionally, the device is configured to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: performing collision detection on the target virtual prop during its movement; detecting whether the first virtual character exists within the preset range of the target explosion location when the target virtual prop is detected to collide with a target virtual object at the target explosion location, wherein the target virtual object is a virtual object that is allowed to be detected by collision; and controlling the first virtual character to move in the preset range of the target virtual prop when the first virtual character is detected to exist.
[0008] Optionally, the device is configured to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: determining a target direction based on the position of the first virtual character and the target explosion location, wherein the target direction is the direction of the extension line connecting the center of the first virtual character with the target explosion location as the starting point; obtaining a target distance between the position of the first virtual character and the target explosion location; and controlling the first virtual character to move in the target direction at a target speed according to the target distance, wherein the value of the target speed and the value of the target distance are negatively correlated.
[0009] Optionally, the device is configured to determine the target direction based on the position of the first virtual character and the target explosion position in the following manner: when it is detected that the target virtual prop collides with the target virtual object at the target explosion position, and the target virtual object is a virtual object, the target direction is determined based on the center of the first virtual character and the target explosion position on the surface of the virtual object; when it is detected that the target virtual prop collides with the target virtual object at the target explosion position, and the target virtual object is a target part of the first virtual character, the target direction is determined based on the center of mass of the first virtual character and the center of mass of the target part.
[0010] Optionally, the device is configured to control the first virtual character to move toward the target direction at a target speed according to the target distance in the following ways: when the first virtual character is in a virtual planar space, control the first virtual character to move in a planar direction at the target speed; or when the first virtual character is in a virtual three-dimensional space, control the first virtual character to move in a planar direction at the target speed; or when the first virtual character is in a virtual three-dimensional space, control the first virtual character to move in a parabolic direction at the target speed.
[0011] Optionally, the device is configured to detect whether the first virtual character exists within the preset range of the target explosion location when the target virtual prop is detected to have exploded at the target explosion location, in the following manner: when the target virtual prop is detected to have exploded at the target explosion location, determine whether the first virtual character exists in a spherical detection area centered on the target explosion location; when the first virtual character is detected in the spherical detection area, determine that the first virtual character exists within the preset range.
[0012] Optionally, the device is configured to display the first virtual character in an air state when the first virtual character is displaced into the air by at least one of the following methods: displaying the first virtual character in the air state and the virtual skills that the first virtual character is allowed to release when in the air state; or displaying the first virtual character in the air state and the virtual items that the first virtual character is allowed to use when in the air state; or displaying the first virtual character in the air state and the virtual actions that the first virtual character is allowed to perform when in the air state.
[0013] Optionally, the device is further configured to: respond to a third operation command, control the first virtual character at a first height in the air to throw the target virtual prop again; when the second-thrown target virtual prop explodes and the first virtual character exists within the preset range of the target virtual prop, control the first virtual character to move according to the explosion position of the second-thrown target virtual prop; when the first virtual character moves to a second height in the air, display the first virtual character at the second height, wherein the second height is higher than the first height; when the second-thrown target virtual prop explodes and the first virtual building exists within the preset range of the target virtual prop, control the first virtual character to move according to the explosion position of the second-thrown target virtual prop; when the first virtual character moves to a second height in the air, display the first virtual character at the second height, wherein the second height is higher than the first height; when the second-thrown target virtual prop explodes and the first virtual building exists within the preset range of the target virtual prop, control the first virtual character to move according to the explosion position of the second-thrown target virtual prop. The simulated building shifts according to the explosion location of the target virtual prop when it is thrown again; when the first virtual building shifts into the air, the first virtual building in the air is displayed; when the target virtual prop is thrown again and explodes, and the first virtual character and the first virtual building exist within the preset range of the target virtual prop, the first virtual building and the first virtual character are controlled to shift according to the explosion location of the target virtual prop when it is thrown again; when the first virtual building shifts to a third height in the air and the first virtual character shifts to a fourth height in the air, the first virtual building at the third height and the first virtual character at the fourth height are displayed, wherein the fourth height is higher than the third height.
[0014] Optionally, the device is further configured to: after controlling the first virtual character to create a first virtual building in response to a second operation command, when the target virtual prop thrown by the first virtual character explodes on the first virtual building, and there is a first virtual character staying in the first virtual building within the preset range of the target virtual prop, control the first virtual character to move according to the explosion position of the target virtual prop thrown again; when the first virtual character moves from the first virtual building to the air, display the first virtual character in the air state; and control the first virtual character to create a second virtual building in response to a fourth operation command, wherein the second virtual building is a virtual building that allows the first virtual character to stay.
[0015] Optionally, the device is further configured to: when the virtual character in the air state also includes a second virtual character, in response to a fifth operation command, control the first virtual character in the air state to perform a preset operation on the second virtual character in the air state.
[0016] Optionally, the device is further configured to: when the first virtual character and the second virtual character are in the same faction, in response to the fifth operation instruction, control the first virtual character in the air state to perform a first preset operation on the second virtual character in the air state, wherein the first preset operation is an operation allowed between virtual characters in the same faction; when the first virtual character and the second virtual character are in different factions, in response to the fifth operation instruction, control the first virtual character in the air state to perform a second preset operation on the second virtual character in the air state, wherein the second preset operation is an operation allowed between virtual characters in different factions.
[0017] Optionally, the device is further configured to: when the duration of displacement of the first virtual character in the air exceeds a preset threshold and the first virtual character has not yet stopped displacing, in response to a sixth operation command, control the first virtual character to adjust the direction of displacement, wherein the first virtual character is set to be prohibited from adjusting the direction of displacement when the duration of displacement does not exceed the preset threshold.
[0018] Optionally, the device is further configured to perform at least one of the following methods: when the first virtual character is in the air state, in response to a first interaction operation, controlling the first virtual character to shoot using a shooting prop in the air; when the first virtual character is in the air state, in response to a second interaction operation, controlling the first virtual character to select the first virtual building from a set of virtual buildings; when the first virtual character is in the air state, in response to a third interaction operation, controlling the first virtual character to create the first virtual building in a preset area in a virtual scene; when the first virtual character is in the air state, in response to a fourth interaction operation, controlling the first virtual character and a target interaction object to perform an interaction operation, wherein the distance between the target interaction object and the first virtual character in the air state satisfies a preset condition.
[0019] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described control method for virtual props when running.
[0020] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual prop control method described above.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described virtual prop control method through the computer program.
[0022] In this embodiment, a first virtual character is controlled to throw a target virtual prop in response to a first operation command. The target virtual prop is a virtual prop that moves along a parabola starting from the first virtual character. The target virtual prop is used to control the displacement of virtual characters within a preset range. When the target virtual prop moves to a point where it collides with a target virtual object and the first virtual character is present within the preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move according to the target explosion position. The target explosion position is the collision position when the target virtual prop collides with the target virtual object. When the first virtual character moves into the air, the first virtual character in the air state is displayed. The first virtual character is set to be allowed to perform preset operations in the air state. By throwing the target virtual prop, even if there are obstacles along the way, the purpose of forcing the virtual character to move can be achieved, thereby improving the technical effect of improving the operation efficiency of forcing the virtual character to move. This solves the technical problem in related technologies that it is impossible to force the virtual character to move using virtual props.
[0023] Furthermore, by configuring preset operations for virtual characters in the air, users can cooperate with each other, enhancing their willingness to socialize and providing them with more operational space and richer operational possibilities. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of an application environment for an optional virtual prop control method according to an embodiment of this application; Figure 2 This is a flowchart illustrating an optional virtual prop control method according to an embodiment of this application; Figure 3This is a schematic diagram of an optional virtual prop control method according to an embodiment of this application; Figure 4 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 5 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 6 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 7 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 8 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 9 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 10 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 11 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 12 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 13 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 14 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 15 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 16 This is a schematic diagram of another optional virtual prop control method according to an embodiment of this application; Figure 17 This is a schematic diagram of the structure of an optional virtual prop control device according to an embodiment of this application; Figure 18 This is a schematic diagram of the structure of an optional virtual prop control product according to an embodiment of this application; Figure 19 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows: Shooting games: including first-person shooters, third-person shooters, and all games that use firearms for ranged attacks, including but not limited to these.
[0028] Displacement: refers to the process in which the position coordinates of a player or target change during gameplay.
[0029] Bouncing Item: A type of virtual item that is similar in use and shape to throwing items, and will be referred to as a throwing item in the following text.
[0030] The present application will be described below with reference to embodiments: According to one aspect of the embodiments of this application, a method for controlling virtual props is provided. Optionally, in the embodiments of this application, the above-mentioned method for controlling virtual props can be applied to, for example... Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1As shown, server 101 is connected to terminal 103 via a network and can be used to provide services for terminal devices or applications installed on terminal devices. Applications can be video applications, instant messaging applications, browser applications, educational applications, game applications, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a game data storage server. The network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, and other computer devices. The server can be a single server, a server cluster consisting of multiple servers, or a cloud server. The application 107 using the virtual prop control method described above is displayed through terminal device 103 or other connected display devices.
[0031] Combination Figure 1 As shown, the control method for the above-mentioned virtual props can be implemented in the terminal device 103 through the following steps: S1, in response to the first operation command, the terminal device 103 controls the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along the throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of the virtual character within a preset range. S2, when the target virtual prop explodes at the target explosion location and a first virtual character exists within the preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move on the terminal device 103; S3, when the first virtual character moves into the air, the first virtual character in the air state is displayed on the terminal device 103; S4, in response to the second operation instruction, control the first virtual character to create a first virtual building on the terminal device 103, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0032] Optionally, in this embodiment of the application, the above-mentioned method for controlling virtual props can also be implemented through a server, for example, Figure 1 It is implemented in server 101 shown; or it is implemented jointly by the terminal device and the server.
[0033] The above is merely an example, and this embodiment does not impose any specific limitations.
[0034] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the control methods for the aforementioned virtual props include: S202, in response to the first operation command, control the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along the throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; S204, when the target virtual prop explodes at the target explosion location and a first virtual character exists within the preset range of the target virtual prop at the time of the explosion, control the first virtual character to move; S206, When the first virtual character moves into the air, display the first virtual character in the air state; S208, in response to the second operation instruction, control the first virtual character to create a first virtual building, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0035] Optionally, in this embodiment, the aforementioned method for controlling virtual items can be applied to various game applications, including but not limited to multiplayer online battle arena (MOBA) games or single-player games (SPG). No specific limitations are made here; the target game application can include, but is not limited to, shooting applications, role-playing applications, and real-time strategy applications. The shooting applications can include, but are not limited to, first-person shooter applications, third-person shooter applications, and shooting applications capable of switching between first-person and third-person perspectives.
[0036] For example, Figure 3 This is a schematic diagram of a virtual prop control method according to an embodiment of the present invention, such as... Figure 3 As shown, the application display interface can be divided into a first-person view display interface 301 and a third-person view display interface 303, as well as a display interface that allows switching between first-person and third-person views using a view switching interaction button.
[0037] It should be noted that the aforementioned game applications may also include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications. The above is merely an example, and this embodiment does not impose any limitations on it.
[0038] Optionally, in this embodiment, the first virtual character may include, but is not limited to, virtual characters controlled by logging into the current game application through a preset account, such as character objects controlled by different players. The preset account may be a registered account or a temporary guest account. Furthermore, it may also include, but is not limited to, non-player characters (NPCs).
[0039] For example, Figure 4 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 4 As shown, by setting the target virtual item to the currently used virtual item in the preset configuration interface outside the game, and by... Figure 4 The content shown provides a brief explanation of the aforementioned target virtual item: S402, perform an interactive operation on the interactive object 404 in the configuration interface 402 to select the aforementioned target virtual prop; S404 After selecting the target virtual item, perform an interaction operation on the interaction object 406 in the configuration interface 402 to configure the target virtual item as the currently used virtual item.
[0040] Optionally, in this embodiment, the target virtual item may include, but is not limited to, virtual items pre-allocated by the server, or virtual items set by the operator in a pre-configured settings interface on the server. The target virtual item can be configured on a virtual attack item in a preset manner, or may be configured as a virtual skill, thereby triggering the target virtual item. This can be triggered through, but is not limited to, preset interactive buttons in the game interface.
[0041] Optionally, in the embodiments of this application, the first operation instruction may include, but is not limited to, clicking, swiping, long pressing, releasing, etc., and may also include, but is not limited to, one or more combinations of voice recognition, motion capture, etc.
[0042] For example, the first operation instruction can be set to click, so that by clicking the interactive button used to trigger the target virtual prop, the first virtual character can be controlled to throw the target virtual prop. Alternatively, the first operation instruction can be set to a combination of multiple interaction methods, such as a combination of long press and release. When the virtual button used to start throwing is long-pressed, the parabolic trajectory of the target virtual prop is displayed. When the virtual button is released, the target virtual prop is controlled to move along the parabolic trajectory when it is released.
[0043] For example, Figure 5 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 5 As shown, it includes a first virtual character 502 and a target virtual item 504. When the first virtual character is equipped with the target virtual item, by performing a long press operation on the virtual button "throw", a parabolic trajectory is displayed. By performing a release operation on the virtual button "throw", the target virtual item moves along the parabolic trajectory starting from the first virtual character.
[0044] Optionally, in this embodiment, the preset range may include, but is not limited to, the preset range generated after the target virtual item is detonated. The preset range can be pre-configured by the server. Different preset range sizes can be configured when the types of target virtual items are different. For example, it can be combined with the amount of virtual resources consumed. When item A requires 100 virtual coins, its preset range is a sphere with a diameter of 5 meters. When item B requires 1000 virtual coins, its preset range is a sphere with a diameter of 20 meters. That is, the size of the preset range can be positively or negatively correlated with the amount of virtual resources consumed.
[0045] It should be noted that the above-mentioned preset range can also be configured to be related to the distance between the target explosion location and the first virtual character. When the distance between the target explosion location and the first virtual character is greater than the preset value, it can be understood that the power of the target virtual item is small. In this case, the preset range is set to a smaller value. When the distance between the target explosion location and the first virtual character is less than another preset value, it can be understood that the power of the target virtual item is large. In this case, the preset range is set to a larger value.
[0046] Optionally, in this embodiment, the trajectory of the target virtual prop is parabolic. During the movement, the user can theoretically find suitable positions and angles to throw it at more desired throwing points. The target virtual prop is equipped with a corresponding collision detection box, which can determine whether the target virtual prop collides with a target virtual object by judging whether the target virtual prop's collision detection box is in contact with other models. The target virtual object is a virtual object that can be collision detected, such as a virtual character, virtual object, invisible wall, virtual ground, etc.
[0047] It should be noted that the collision detection described above can be real-time or periodic.
[0048] Optionally, in this embodiment of the application, when a collision between a target virtual prop and a target virtual object is detected, the exploded target virtual prop is displayed. At this time, the detection begins to detect whether there is a first virtual character within a preset range of the target virtual prop. Specifically, a spherical area of fixed diameter is generated with the position coordinates of the target virtual prop at the time of the collision as the center, and the detection is performed to determine whether there is a virtual character in the area, as well as the position coordinates of the virtual character, the distance information from the target virtual prop, the direction information, etc.
[0049] Optionally, in the embodiments of this application, the aforementioned target explosion location may include, but is not limited to, the contact location between the target virtual prop and the target virtual object. The contact location may be the location of the first contact or the location of the contact after a preset number of contacts. The contact location is located on the surface or inside of the target virtual object.
[0050] Optionally, in the embodiments of this application, the above-mentioned control of the first virtual character to move according to the target explosion position can be understood as controlling the first virtual character to move along the direction of the ray emitted from the target explosion position to the center of the first virtual character. The speed of the displacement depends on the distance between the center of the first virtual character and the target explosion position. When the distance is smaller, the speed of the displacement is faster. That is, the distance between the center of the first virtual character and the target explosion position is negatively correlated with the speed of the displacement.
[0051] For example, Figure 6 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 6 As shown, it includes a first virtual character 602, a target explosion location 604, a virtual ground 606, and a first virtual character 608. When the target virtual prop collides with the virtual ground, it detects whether there is a first virtual character within a preset range of the target explosion location. When there is a first virtual character, it controls the first virtual character to move along the direction of a ray emitted from the target explosion location towards the center of the first virtual character, that is, the first virtual character 602 is moved to the first virtual character 608.
[0052] Optionally, in this embodiment of the application, the first virtual character can be moved into the air. When the first virtual character leaves the virtual ground, it is considered that the first virtual character is in the air. When the first virtual character is in the air, the first virtual character is allowed to perform preset operations in the air.
[0053] It should be noted that the above preset operations can be configured to be performed only in the air state, or they can be configured to be performed in both the air state and the non-air state. When the first virtual character is in the air state, the cooperation between the virtual character and the first virtual character can be completed by performing the preset operations.
[0054] Furthermore, the aforementioned preset operation can be triggered by the first virtual character through operation commands, or it can be triggered by other virtual characters besides the first virtual character, or by the first virtual character through operation commands.
[0055] For example, Figure 7 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 7 As shown, it includes a first virtual character 702, a virtual ground 704, and a first virtual character 706. When a target virtual object collides with the virtual ground, the first virtual character 702 is controlled to move. When the first virtual character 702 moves and is in the air (corresponding to...), it is in a more stable, airborne state. Figure 7 When the first virtual character 706 is away from the virtual ground, a set of preset operations is displayed. The preset operation set includes preset operation A, preset operation B and preset operation C. The preset operations in the preset operation set are operations that are allowed to be executed when the first virtual character is in the air. The preset operation can be executed by the first virtual character, or it can be executed by the first virtual character controlling the second virtual character.
[0056] The above is merely an example, and this application does not impose any specific limitations.
[0057] In this embodiment, in response to a first operation command, a first virtual character is controlled to throw a target virtual prop. The target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character. The target virtual prop is used to control the displacement of virtual characters within a preset range. When the target virtual prop explodes at a target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move. When the first virtual character moves into the air, the first virtual character in an air state is displayed. In response to a second operation command, the first virtual character is controlled to create a first virtual building. The first virtual building is a virtual building that allows the first virtual character to stay. By throwing the target virtual prop, even if there are obstacles along the way, the purpose of forcing the virtual character to move can be achieved, thereby improving the technical effect of improving the operational efficiency of forcing the virtual character to move. This solves the technical problem in related technologies that it is impossible to force the virtual character to move using virtual props.
[0058] Furthermore, by configuring preset operations for virtual characters in the air to perform in the air, and by creating a first virtual building through a second operation command, users are provided with more operational space and richer operational possibilities.
[0059] As an optional solution, when a target virtual prop explodes at the target explosion location and a first virtual character exists within a preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move, including: performing collision detection on the target virtual prop during its movement; when a collision is detected between the target virtual prop and a target virtual object at the target explosion location, detecting whether a first virtual character exists within a preset range of the target explosion location, wherein the target virtual object is a virtual object that is allowed to be detected by collision; and when a first virtual character is detected within a preset range of the target virtual prop, controlling the first virtual character to move.
[0060] Optionally, in this embodiment of the application, the aforementioned target virtual prop may include, but is not limited to, a virtual prop that moves along a parabolic trajectory. When it is detected that the target virtual prop collides with the target virtual object at the target explosion location, the system begins to detect whether there is a first virtual character within a preset range, so as to determine whether it is necessary to control the first virtual character to move. The number of virtual characters that are allowed to move within the preset range may include, but is not limited to, one or more.
[0061] As an optional solution, when the target virtual prop explodes at the target explosion location and a first virtual character exists within a preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move, including: determining the target direction based on the position of the first virtual character and the target explosion location, wherein the target direction is the direction of the extension line connecting the center of the first virtual character to the target explosion location; obtaining the target distance between the position of the first virtual character and the target explosion location; and controlling the first virtual character to move in the target direction at a target speed according to the target distance, wherein the value of the target speed and the value of the target distance are negatively correlated.
[0062] Optionally, in this embodiment of the application, the position of the first virtual character can be determined by obtaining the position coordinates of the first virtual character, and the direction of the extension line connecting the center of the first virtual character is determined by emitting a ray from the target explosion position to the center of the first virtual character.
[0063] For example, Figure 8 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 8As shown, the device includes a target explosion location 802 and a first virtual character 804. When the target virtual prop collides with the virtual ground at the target explosion location, the first virtual character is detected within a preset range of the target explosion location. At this time, the current position of the first virtual character and the center of the first virtual character are obtained. The direction of the extension line obtained by connecting the center of the first virtual character with the target explosion location as the starting point is the target direction for controlling the displacement of the first virtual character. Then, based on the target distance between the target explosion location and the position of the first virtual character, the target speed for controlling the displacement of the first virtual character along the target direction is determined. Subsequently, the first virtual character is controlled to move in the target direction at the target speed.
[0064] The above is merely an example, and this application does not impose any specific limitations.
[0065] As an optional approach, the target direction is determined based on the position of the first virtual character and the target explosion position, including: when a target virtual prop is detected to collide with a target virtual object at the target explosion position, and the target virtual object is a virtual object, the target direction is determined based on the target explosion position between the center of the first virtual character and the surface of the virtual object; when a target virtual prop is detected to collide with a target virtual object at the target explosion position, and the target virtual object is a target part of the first virtual character, the target direction is determined based on the center of mass of the first virtual character and the center of mass of the target part.
[0066] Optionally, in this embodiment, the virtual object may include, but is not limited to, virtual walls, virtual boxes, virtual vehicles, and other virtual objects capable of collision detection of the target virtual prop. The target explosion position on the surface of the virtual object can be understood as a more precise target explosion position, rather than just the position of the target virtual object. For example, when the virtual wall is divided into upper, middle, and lower parts, the target explosion position is determined to be located in a specific part of the virtual wall, and the target direction is determined based on that specific part.
[0067] Optionally, in the embodiments of this application, the above-mentioned centroid refers to the center of mass, which is an imaginary point on the material system where the mass is considered to be concentrated. The system can pre-configure the corresponding centroid for each virtual character and virtual object so as to facilitate the subsequent control of the displacement of the first virtual character.
[0068] For example, Figure 9 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 9As shown, for a virtual target object that is a virtual character, the virtual character can be divided into multiple parts, such as hands, legs, abdomen, etc. When the target explosion location is in different parts, the corresponding target direction is different. For example, when the target explosion location is below the abdomen, the first virtual character will be controlled to move into the air. At this time, the first virtual character will be in the above-mentioned air state.
[0069] The above is merely an example, and this application does not impose any specific limitations.
[0070] As an optional approach, controlling the first virtual character to displace in the target direction at the target speed according to the target distance includes: controlling the first virtual character to displace in the target direction at the target speed when the first virtual character is in a virtual planar space; or controlling the first virtual character to displace in the target direction at the target speed when the first virtual character is in a virtual three-dimensional space; or controlling the first virtual character to displace in the target direction at the target speed when the first virtual character is in a virtual three-dimensional space.
[0071] Optionally, in the embodiments of this application, the aforementioned virtual planar space may include, but is not limited to, a two-dimensional planar space. That is, when the game in which the first virtual character participates is a two-dimensional planar game, the first virtual character is controlled to undergo planar displacement in the target direction at the target speed.
[0072] Optionally, in the embodiments of this application, the aforementioned virtual three-dimensional space may include, but is not limited to, a three-dimensional space. That is, when the game in which the first virtual character participates is a three-dimensional game, the first virtual character is controlled to undergo planar displacement or parabolic displacement in the target direction at the target speed.
[0073] For example, Figure 10 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 10 As shown, when the first virtual character is in the virtual planar space, after the target virtual prop collides, it is detected in the circular detection area. When virtual character 1002 and virtual character 1004 are detected, virtual character 1002 and virtual character 1004 are respectively controlled to move in a planar displacement in their respective target directions according to their respective target speeds.
[0074] For example, such as Figure 7 As shown, when the first virtual character is in the virtual three-dimensional space, after the target virtual prop collides, it is detected in the spherical detection area. When the virtual character 702 is detected, the virtual character 702 is controlled to move in a planar displacement in the target direction according to the target speed, so as to obtain the virtual character 706.
[0075] As an optional approach, when a target virtual prop is detected to explode at the target explosion location, the system detects whether a first virtual character exists within a preset range of the target explosion location. This includes: when a target virtual prop is detected to explode at the target explosion location, determining whether a first virtual character exists within a sphere detection area centered on the target explosion location; and when a first virtual character is detected within the sphere detection area, determining that a first virtual character exists within a preset range.
[0076] Optionally, in this embodiment, the diameter of the sphere detection area can be pre-configured. The sphere detection area may include, but is not limited to, the sphere generated after the target virtual item is detonated. This sphere detection area can be pre-configured by the server. Different sphere detection area sizes can be configured when the type of target virtual item is different. For example, it can be combined with the amount of virtual resources consumed. When item A requires 100 virtual coins, its sphere detection area is a sphere with a diameter of 5 meters; when item B requires 1000 virtual coins, its sphere detection area is a sphere with a diameter of 20 meters. That is, the size of the sphere detection area can be positively or negatively correlated with the amount of virtual resources consumed.
[0077] It should be noted that the aforementioned spherical detection area can also be configured to correlate with the distance between the target explosion location and the first virtual character. When the distance between the target explosion location and the first virtual character is greater than a preset value, it can be understood that the power of the target virtual item is relatively small. In this case, the spherical detection area is configured to a smaller value. When the distance between the target explosion location and the first virtual character is less than another preset value, it can be understood that the power of the target virtual item is relatively large. In this case, the spherical detection area is configured to a larger value.
[0078] For example, Figure 11 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 11 As shown, when a virtual prop is thrown at a target virtual object, it collides with the cylindrical detection frame corresponding to the target virtual part on the player, which is the target virtual object. Then, it is determined whether there is a first virtual character in the sphere detection area with the target explosion position as the center. If the first virtual character is detected in the sphere detection area, it is determined that there is a first virtual character within the preset range.
[0079] As an optional solution, displaying the first virtual character in the air when the first virtual character is displaced into the air includes at least one of the following: Display the first virtual character in the air state and the virtual skills that the first virtual character is allowed to release while in the air state; or Display the first virtual character in the aerial state and the virtual items that the first virtual character is allowed to use while in the aerial state; or Displays the first virtual character in the air state and the virtual actions that the first virtual character is allowed to perform while in the air state.
[0080] Optionally, in the embodiments of this application, the aforementioned virtual skills may include, but are not limited to, the virtual skills set by the first virtual character itself, and may also include, but are not limited to, the virtual skills associated with the first virtual character. That is, when the first virtual character is displaced due to the target virtual prop thrown by the first virtual character, the virtual skills associated with the first virtual character are displayed.
[0081] Optionally, in the embodiments of this application, the aforementioned virtual props may include, but are not limited to, virtual props set by the first virtual character itself, and may also include, but are not limited to, virtual props associated with the first virtual character. That is, when the first virtual character is displaced due to the target virtual prop thrown by the first virtual character, the virtual prop associated with the first virtual character is displayed.
[0082] Optionally, in the embodiments of this application, the virtual actions mentioned above may include, but are not limited to, the virtual actions set by the first virtual character itself, and may also include, but are not limited to, the virtual actions associated with the first virtual character. That is, when the first virtual character is displaced due to the target virtual prop thrown by the first virtual character, the virtual actions associated with the first virtual character are displayed.
[0083] Optionally, in the embodiments of this application, the virtual skills that the first virtual character is allowed to release, the virtual items that are allowed to use, and the virtual actions that are allowed to perform when the first virtual character is in the air state can be virtual skills that the first virtual character releases, virtual items that are used, and virtual actions that are performed by the first virtual character through operation instructions. They can also include, but are not limited to, virtual skills that the first virtual character releases, virtual items that are used, and virtual actions that are performed by the first virtual character itself when the first virtual character is in the air state.
[0084] For example, Figure 12 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 12As shown, it includes a virtual character in an aerial state and a set of preset operations. The set of preset operations includes preset operation A, preset operation B, and preset operation C. Preset operation A may include, but is not limited to, virtual skills that the first virtual character is allowed to release when it is in an aerial state. Preset operation B may include, but is not limited to, virtual items that the first virtual character is allowed to use when it is in an aerial state. Preset operation C may include, but is not limited to, virtual actions that the first virtual character is allowed to perform when it is in an aerial state. Taking the release of virtual skill A as an example, when there is a virtual character in an aerial state, virtual skill A can be selected from the set of preset operations to control the first virtual character in an aerial state to release virtual skill A.
[0085] It should be noted that the above operation of selecting virtual skill A can be performed by the first virtual character or by the first virtual character in an aerial state.
[0086] For example, Figure 13 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 13 As shown in the display screen of the first virtual character, when the first virtual character throws the target virtual item, the target virtual item collides at the target explosion location. At this time, the first virtual character (the virtual character in the current main view) is detected within a preset range of the target explosion location. At this time, the first virtual character begins to move. When the first virtual character moves into the air, a preset operation set is displayed on the screen. This preset operation set includes preset operation A, preset operation B, and preset operation C. Among them, preset operation A may include, but is not limited to, virtual skills that can be released when the first virtual character is in the air. Preset operation B may include, but is not limited to, virtual items that can be used when the first virtual character is in the air.
[0087] The method is characterized by further comprising: responding to a third operation command, controlling a first virtual character at a first height in the air to throw a target virtual prop again; when the second-thrown target virtual prop explodes, and a first virtual character exists within a preset range of the target virtual prop, controlling the first virtual character to shift according to the explosion position of the second-thrown target virtual prop; when the first virtual character shifts to a second height in the air, displaying the first virtual character at the second height, wherein the second height is higher than the first height; when the second-thrown target virtual prop explodes, and a first virtual building exists within a preset range of the target virtual prop, controlling the first virtual character to shift according to the explosion position of the ... and controlling the first virtual character to shift according to the explosion position of the target virtual prop. The simulated building shifts according to the explosion location of the target virtual prop that is thrown again; when the first virtual building shifts into the air, the first virtual building in the air is displayed; when the target virtual prop that is thrown again explodes, and the first virtual character and the first virtual building exist within the preset range of the target virtual prop, the first virtual building and the first virtual character are controlled to shift according to the explosion location of the target virtual prop that is thrown again; when the first virtual building shifts to a third height in the air and the first virtual character shifts to a fourth height in the air, the first virtual building at the third height and the first virtual character at the fourth height are displayed, wherein the fourth height is higher than the third height.
[0088] Optionally, in this embodiment of the application, the third operation instruction can be obtained in the same way as the first operation instruction or the second operation instruction. The first height can include, but is not limited to, the height at which the third operation instruction is obtained during the displacement of the first virtual character. Through the third operation instruction, the first virtual character at the first height in the air can be controlled to throw the target virtual prop again.
[0089] It should be noted that the aforementioned target virtual props can be configured to be reusable virtual props, or can be configured to allow multiple virtual props to be carried at the same time to achieve the aforementioned repeated throwing operation.
[0090] Optionally, in this embodiment of the application, the above-mentioned explosion of the target virtual prop when it is thrown again can be understood as the target virtual prop exploding after a predetermined time, or exploding after colliding with the target virtual object, etc. In this case, the first virtual character is detected again within the preset range of the target virtual prop, and when the first virtual character is detected, the first virtual character is controlled to move according to the explosion position of the target virtual prop when it is thrown again.
[0091] Optionally, in this embodiment of the application, the above-mentioned display of the first virtual character at the second height when the first virtual character moves to the second height in the air can be understood as the first virtual character increasing the height of the first virtual character by throwing the target virtual prop again.
[0092] Optionally, in this embodiment of the application, when the target virtual prop is thrown again and explodes, and there is a first virtual building within the preset range of the target virtual prop, controlling the first virtual building to move according to the explosion position of the target virtual prop can be understood as the first virtual building being set to move when the target virtual prop explodes, due to the explosion effect. When the first virtual building moves into the air, the first virtual building in the air state can be understood as the first virtual building in the air state being higher than the first virtual building before the displacement.
[0093] Optionally, in the real-time example of this application, the first virtual building and the first virtual character are allowed to move simultaneously due to the explosion of the target virtual prop. When the first virtual character and the first virtual building are within the preset range of the target virtual prop, the first virtual building and the first virtual character are controlled to move according to the explosion position of the target virtual prop that is thrown again.
[0094] It should be noted that one alternative form of the above-mentioned fourth height being higher than the third height is that the first virtual character located at the fourth height is situated on the surface of the first virtual building located at the third height.
[0095] As an optional approach, after controlling the first virtual character to create the first virtual building in response to the second operation command, the method further includes: when the target virtual prop thrown by the first virtual character explodes on the first virtual building, and there is a first virtual character remaining in the first virtual building within a preset range of the target virtual prop, controlling the first virtual character to move according to the explosion position of the target virtual prop thrown again; when the first virtual character moves from the first virtual building into the air, displaying the first virtual character in the air state; and in response to the fourth operation command, controlling the first virtual character to create a second virtual building, wherein the second virtual building is a virtual building that allows the first virtual character to remain.
[0096] Optionally, in this embodiment of the application, when the target virtual prop is thrown again and explodes on the first virtual building, the first virtual character is controlled to move again according to the explosion location. At this time, the first virtual character moves from being stationary on the first virtual building to being in the air again. At this time, the fourth operation command is responded to to create the second virtual building.
[0097] It should be noted that the implementation of the fourth operation instruction can be the same as that of the second operation instruction. That is, whenever the first virtual character is in the air, a virtual building can be created through the operation instruction. The second virtual building may include, but is not limited to, being completely higher than or partially higher than the first virtual building.
[0098] When the first virtual character wants to move to a higher position, it can repeatedly throw target virtual items to reach a higher position. It can also include, but is not limited to, throwing target virtual items, creating virtual buildings, throwing target virtual items on the newly created virtual buildings, creating new virtual buildings, and so on until it reaches a higher position.
[0099] As an optional approach, the above method also includes: When the first virtual character and the second virtual character are in the same faction, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a first preset operation on the second virtual character in the air state, wherein the first preset operation is an operation that is allowed to be performed between virtual characters in the same faction; When the first virtual character and the second virtual character are in different factions, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a second preset operation on the second virtual character in the air state, wherein the second preset operation is an operation that is allowed to be performed between virtual characters in different factions.
[0100] Optionally, in this embodiment, "same faction" means the first virtual character and the second virtual character are teammates, and "different faction" means the first virtual character and the second virtual character are enemies. The first preset operation may include, but is not limited to, attacks performed by the second virtual character against the first virtual character, self-protection operations performed by the second virtual character, and modifications performed on virtual objects in the virtual scene, such as generating a virtual platform for landing on. The second preset operation may include, but is not limited to, interactions performed by the second virtual character against the first virtual character, self-protection operations performed by the second virtual character, and modifications performed on virtual objects in the virtual scene.
[0101] For example, Figure 14 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 14 As shown, it includes a first virtual character and a second virtual character. When the first virtual character throws a target virtual item, if a collision is detected with the target virtual item and both the first and second virtual characters are present within a preset range of the target explosion location, the first and second virtual characters are simultaneously controlled to move. When both the first and second virtual characters are in the air, in response to the aforementioned fifth operation command, the first virtual character in the air is controlled to perform the aforementioned preset operation on the second virtual character in the air.
[0102] As an optional approach, the method further includes: when the duration of displacement of the first virtual character in the air exceeds a preset threshold and the first virtual character has not yet stopped displacing, in response to a sixth operation command, controlling the first virtual character to adjust the direction of displacement, wherein the first virtual character is set to be prohibited from adjusting the direction of displacement when the duration of displacement does not exceed the preset threshold.
[0103] Optionally, in this embodiment of the application, the process of the first virtual character undergoing displacement can be divided into two stages based on the duration of displacement. In the first stage (when the duration of displacement of the first virtual character does not exceed a preset threshold), the first virtual character is prohibited from adjusting the direction of displacement and can only move along the extension of the line connecting the target explosion position to the center of the first virtual character. When the process moves from the first stage to the second stage, that is, when the duration of displacement of the first virtual character exceeds the preset threshold, the first virtual character can be controlled to adjust the direction of displacement in response to the sixth operation command.
[0104] For example, Figure 15 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 15 As shown, when the first virtual character is detected after a collision with the target virtual prop, the first virtual character is controlled to move along the extension of the line connecting the target explosion location to the center of the first virtual character. If the displacement time does not exceed the threshold, the first virtual character continues to move along the aforementioned extension line. If the displacement time exceeds the threshold, the first virtual character is controlled to adjust the direction of displacement in response to the sixth operation command.
[0105] As an alternative approach, the method also includes: Display the target virtual item while the first virtual character is in the air; In response to the first operation command, the first virtual character is controlled to throw the target virtual item.
[0106] Optionally, in this embodiment of the application, the target virtual prop can be thrown when the first virtual character is in the air, that is, the target virtual prop can be thrown from the air in a parabolic trajectory, so that the landing point of the target virtual prop can be more diversified.
[0107] As an optional approach, the above method also includes at least one of the following: When the first virtual character is in the air, in response to the first interactive operation, the first virtual character is controlled to shoot using shooting props in the air; when the first virtual character is in the air, in response to the second interactive operation, the first virtual character is controlled to select a first virtual building from the set of virtual buildings; when the first virtual character is in the air, in response to the third interactive operation, the first virtual character is controlled to create a first virtual building in a preset area in the virtual scene; when the first virtual character is in the air, in response to the fourth interactive operation, the first virtual character and a target interactive object are controlled to perform an interactive operation, wherein the distance between the target interactive object and the first virtual character in the air meets a preset condition.
[0108] Optionally, in the embodiments of this application, the first interactive operation, the second interactive operation, the third interactive operation, and the fourth interactive operation may include, but are not limited to, touch interactive operation, gesture interactive operation, etc. That is, when the above-mentioned virtual prop control method is executed by, for example, a mobile terminal, gesture operation can be used to quickly control the first virtual character to shoot in the air, select the first virtual building from the set of virtual buildings, create the first virtual building in a preset area in the virtual scene, and perform interactive operations with the target interactive object, etc.
[0109] The following specific examples will further explain this application: This application designs a harmless, fully functional item that, when thrown, will knock back nearby virtual characters. This item does not distinguish between friend and foe and can be used to interfere with opponents or assist in one's own movement. There are a large number of skills and items in the game scene that can be used in the air, so many combination skills or combination items can be created.
[0110] Specifically, the control methods for the aforementioned virtual items may include, but are not limited to, the following steps: S1, when this item drops in the game, you can press and hold Q or E to pick it up and equip it to the corresponding key's inventory. S2, press the button in the item bar where the item is stored again. Press and hold to display the trajectory, and release to throw the item. S3: After being thrown, if it collides with other objects, the item explodes, regardless of whether it is friend or foe, and knocks back the surrounding characters. In S4, after being forcibly moved into the air, players can use other items, such as creating bridges in the void, creating high ground out of thin air, and floating to occupy advantageous positions.
[0111] For example, Figure 16 This is a schematic diagram of another virtual prop control method according to an embodiment of the present invention, such as... Figure 16As shown, from a technical perspective, this may include, but is not limited to, the following steps: S1: After the game starts, a certain number of tracks are randomly selected from all the drone tracks pre-set on the map to generate moving drones. S2, when a drone is destroyed, 1-2 items will be randomly dropped (the number of drops depends on the player's skill), among which there may be a bouncing item (corresponding to the aforementioned target virtual item); when a player destroys a drone, the client will receive the drone destruction information and send the item drop command to the server. This command contains the player's level and skill information. The server will randomly select 1 or 2 items from the current version's item list based on the player's skill, and then send the item drop command back to the client, so that the client can drop the corresponding item according to the item information; S3: When a player approaches, they can press and hold Q or E to pick up the item. The server processes two pieces of information simultaneously: clearing the picked-up item from the map and adding the item's information to the player's inventory. S4, when the player clicks the button corresponding to the item in the item bar again, an item use command is sent to the server, executing the player's action of throwing the bouncing item along a parabola, generating an item with a collision volume that moves along the indicated parabola. S5 detects in real time whether the collision box of the bouncing prop is in contact with other models and performs collision detection; when a collision is detected, the bouncing prop explodes, and a spherical area of fixed diameter is generated with the position coordinates of the prop at the time of collision as the center. It detects whether there are virtual character units in this area, as well as the position coordinates of the unit and the distance information from the position of the prop. S6, if a virtual character unit exists, apply an initial velocity to that virtual character. Determine the explosion center point and the center of mass of the virtual character model. Starting from the explosion center, connect the center of mass of the virtual character model; the direction of the extended line is the direction of the initial velocity. The magnitude of the initial velocity is related to the distance between the explosion center and the center of mass of the virtual character; the smaller the distance, the larger the initial velocity, with a limit value. S7, the affected virtual character will move in a horizontal or parabolic trajectory under the action of the initial velocity; S8: When the virtual character is in the air, the server can still receive instructions from the player, such as shooting or using items. The server determines whether the action can be performed in the air, and if so, returns the corresponding action information to the client.
[0112] This design concept, based on a realistic physics engine, provides players with more interactive methods. Breaking away from traditional linear or instantaneous teleportation designs, it combines opportunities to create movement with the use of items, increasing the difficulty of operation while offering more tactical options. Players can fully utilize the physics engine to achieve highly complex maneuvers.
[0113] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0114] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0115] According to another aspect of the embodiments of this application, a control device for virtual props for implementing the above-described control method for virtual props is also provided. For example... Figure 17 As shown, the device includes: The first control module 1702 is used to respond to a first operation command and control the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range. The second control module 1704 is used to control the first virtual character to move when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion. Display module 1706 is used to display the first virtual character in the air state when the first virtual character moves into the air. The creation module 1708 is used to control the first virtual character to create a first virtual building in response to a second operation instruction, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0116] As an optional solution, the device is used to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: collision detection is performed on the target virtual prop during its movement; if a collision is detected between the target virtual prop and a target virtual object at the target explosion location, the device detects whether the first virtual character exists within the preset range of the target explosion location, wherein the target virtual object is a virtual object that is allowed to be detected by collision; and if the first virtual character is detected within the preset range of the target virtual prop, the device controls the first virtual character to move in the following manner.
[0117] As an optional solution, the device is used to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: determining a target direction based on the position of the first virtual character and the target explosion location, wherein the target direction is the direction of the extension line connecting the center of the first virtual character with the target explosion location as the starting point; obtaining the target distance between the position of the first virtual character and the target explosion location; and controlling the first virtual character to move in the target direction at a target speed according to the target distance, wherein the value of the target speed and the value of the target distance are negatively correlated.
[0118] As an optional solution, the device is used to determine the target direction based on the position of the first virtual character and the target explosion position in the following manner: when it is detected that the target virtual prop collides with the target virtual object at the target explosion position, and the target virtual object is a virtual object, the target direction is determined based on the center of the first virtual character and the target explosion position on the surface of the virtual object; when it is detected that the target virtual prop collides with the target virtual object at the target explosion position, and the target virtual object is a target part of the first virtual character, the target direction is determined based on the center of mass of the first virtual character and the center of mass of the target part.
[0119] As an optional solution, the device is used to control the first virtual character to displace in the target direction at a target speed according to the target distance in the following ways: when the first virtual character is in a virtual planar space, control the first virtual character to displace in the target direction at the target speed; or when the first virtual character is in a virtual three-dimensional space, control the first virtual character to displace in the target direction at the target speed; or when the first virtual character is in a virtual three-dimensional space, control the first virtual character to displace in the target direction in a parabolic motion at the target speed.
[0120] As an optional solution, the device is used to detect whether the first virtual character exists within the preset range of the target explosion location when the target virtual prop is detected to have exploded at the target explosion location: when the target virtual prop is detected to have exploded at the target explosion location, determine whether the first virtual character exists in a spherical detection area centered on the target explosion location; when the first virtual character is detected in the spherical detection area, determine that the first virtual character exists within the preset range.
[0121] As an optional solution, the device is used to display the first virtual character in an air state when the first virtual character is displaced into the air by at least one of the following methods: displaying the first virtual character in the air state and the virtual skills that the first virtual character is allowed to release when in the air state; or displaying the first virtual character in the air state and the virtual items that the first virtual character is allowed to use when in the air state; or displaying the first virtual character in the air state and the virtual actions that the first virtual character is allowed to perform when in the air state.
[0122] As an optional solution, the device is further configured to: respond to a third operation command, control the first virtual character at a first height in the air to throw the target virtual prop again; when the second-thrown target virtual prop explodes, and the first virtual character exists within the preset range of the target virtual prop, control the first virtual character to shift according to the explosion position of the second-thrown target virtual prop; when the first virtual character shifts to a second height in the air, display the first virtual character at the second height, wherein the second height is higher than the first height; when the second-thrown target virtual prop explodes, and the first virtual building exists within the preset range of the target virtual prop, control the first virtual character to shift according to the explosion position of the second-thrown target virtual prop; when the first virtual character shifts to a second height in the air, display the first virtual character at the second height, wherein the second height is higher than the first height; when the second-thrown target virtual prop explodes, and the first virtual building exists within the preset range of the target virtual prop, control the first virtual character to shift according to the explosion position of the second-thrown target virtual prop. The first virtual building shifts according to the explosion location of the target virtual prop that is thrown again; when the first virtual building shifts into the air, the first virtual building in the air state is displayed; when the target virtual prop that is thrown again explodes, and the first virtual character and the first virtual building exist within the preset range of the target virtual prop, the first virtual building and the first virtual character are controlled to shift according to the explosion location of the target virtual prop that is thrown again; when the first virtual building shifts to a third height in the air and the first virtual character shifts to a fourth height in the air, the first virtual building at the third height and the first virtual character at the fourth height are displayed, wherein the fourth height is higher than the third height.
[0123] As an optional embodiment, the device is further configured to: after controlling the first virtual character to create a first virtual building in response to a second operation command, when the target virtual prop thrown by the first virtual character explodes on the first virtual building, and there is a first virtual character remaining in the first virtual building within the preset range of the target virtual prop, control the first virtual character to move according to the explosion position of the target virtual prop thrown again; when the first virtual character moves from the first virtual building to the air, display the first virtual character in the air state; and control the first virtual character to create a second virtual building in response to a fourth operation command, wherein the second virtual building is a virtual building that allows the first virtual character to remain.
[0124] As an optional solution, the device is further configured to: when the virtual character in the air state also includes a second virtual character, in response to a fifth operation command, control the first virtual character in the air state to perform a preset operation on the second virtual character in the air state.
[0125] As an optional embodiment, the device is further configured to: when the first virtual character and the second virtual character are in the same faction, in response to the fifth operation instruction, control the first virtual character in the air state to perform a first preset operation on the second virtual character in the air state, wherein the first preset operation is an operation allowed between virtual characters in the same faction; when the first virtual character and the second virtual character are in different factions, in response to the fifth operation instruction, control the first virtual character in the air state to perform a second preset operation on the second virtual character in the air state, wherein the second preset operation is an operation allowed between virtual characters in different factions.
[0126] As an optional solution, the device is further configured to: in response to a sixth operation command, control the first virtual character to adjust the direction of displacement when the duration of displacement of the first virtual character in the air exceeds a preset threshold and the first virtual character has not yet stopped displacing, wherein the first virtual character is set to be prohibited from adjusting the direction of displacement when the duration of displacement does not exceed the preset threshold.
[0127] As an optional solution, the device is also configured to perform at least one of the following methods: when the first virtual character is in the air state, in response to a first interaction operation, control the first virtual character to shoot using a shooting prop in the air; when the first virtual character is in the air state, in response to a second interaction operation, control the first virtual character to select the first virtual building from a set of virtual buildings; when the first virtual character is in the air state, in response to a third interaction operation, control the first virtual character to create the first virtual building in a preset area in the virtual scene; when the first virtual character is in the air state, in response to a fourth interaction operation, control the first virtual character and a target interaction object to perform an interaction operation, wherein the distance between the target interaction object and the first virtual character in the air state satisfies a preset condition.
[0128] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable media 1811. When the computer program is executed by central processing unit 1801, it performs various functions provided in embodiments of this application.
[0129] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0130] Figure 18 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0131] It should be noted that, Figure 18 The computer system 1800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0132] like Figure 18 As shown, the computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1802 or programs loaded from storage section 1808 into random access memory (RAM). The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An input / output interface 1805 (I / O interface) is also connected to the bus 1804.
[0133] The following components are connected to the input / output interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a local area network card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the input / output interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1810 as needed so that computer programs read from them can be installed into the storage section 1808 as needed.
[0134] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit 1801, it performs various functions defined in the system of this application.
[0135] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described control method for virtual props is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 19 As shown, the electronic device includes a memory 1902 and a processor 1904. The memory 1902 stores a computer program, and the processor 1904 is configured to execute the steps of any of the above method embodiments via the computer program.
[0136] Optionally, in this embodiment of the application, the above-mentioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0137] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1, in response to the first operation command, controls the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along a parabola starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; S2, when the target virtual prop moves to the point of colliding with the target virtual object, and a first virtual character exists within the preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move according to the target explosion position, wherein the target explosion position is the collision position when the target virtual prop collides with the target virtual object; S3, when the first virtual character moves into the air, the first virtual character in the air state is displayed, wherein the first virtual character is set to be allowed to perform preset operations in the air state.
[0138] Alternatively, as those skilled in the art will understand, Figure 19The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 19 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 19 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 19 The different configurations shown.
[0139] The memory 1902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the virtual prop control method and device in this embodiment. The processor 1904 executes various functional applications and data processing by running the software programs and modules stored in the memory 1902, thereby realizing the aforementioned virtual prop control method. The memory 1902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1902 may further include memory remotely located relative to the processor 1904, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1902 may be used, but is not limited to, to store information such as virtual props or virtual characters. As an example, such as... Figure 19 As shown, the memory 1902 may include, but is not limited to, the first control module 1702, the second control module 1704, and the display module 1706 of the virtual prop control device. Furthermore, it may include, but is not limited to, other module units of the virtual prop control device, which will not be elaborated upon in this example.
[0140] Optionally, the aforementioned transmission device 1906 is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1906 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1906 is a Radio Frequency (RF) module used for wireless communication with the Internet.
[0141] In addition, the aforementioned electronic device also includes: a display 1908 for displaying the aforementioned virtual characters and virtual props; and a connection bus 1910 for connecting the various module components in the aforementioned electronic device.
[0142] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.
[0143] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of a computer device reads computer instructions, and the processor executes the computer instructions, causing the computer device to perform the virtual prop control method provided in various alternative implementations of the control aspect of the virtual prop described above.
[0144] Optionally, in embodiments of this application, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps: S1, in response to the first operation command, controls the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along the throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; S2, when the target virtual prop explodes at the target explosion location and a first virtual character exists within the preset range of the target virtual prop at the time of the explosion, control the first virtual character to move; S3, when the first virtual character moves into the air, display the first virtual character in the air state; S4, in response to the second operation instruction, controls the first virtual character to create a first virtual building, wherein the first virtual building is a virtual building that allows the first virtual character to stay.
[0145] Optionally, in the embodiments of this application, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0146] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0147] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0148] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A virtual prop control method characterized by, include: In response to a first operation command, a first virtual character is controlled to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range; When the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, the first virtual character is controlled to move. When the first virtual character moves into the air, the first virtual character in the air state and a preset operation set are displayed, wherein the preset operation set contains preset operations that are allowed to be executed when the first virtual character is in the air state; In response to a second operation command, the first virtual character is controlled to create a first virtual building, wherein the first virtual building is a virtual building in which the first virtual character is allowed to stay; In response to a third operation command, the first virtual character at a first altitude in the air state is controlled to throw the target virtual prop again; When the target virtual prop is thrown again and explodes, and the first virtual character and the first virtual building are within the preset range of the target virtual prop, the first virtual building and the first virtual character are controlled to move according to the explosion position of the target virtual prop thrown again; when the first virtual building moves to a third height in the air and the first virtual character moves to a fourth height in the air, the first virtual building at the third height and the first virtual character at the fourth height are displayed, wherein the fourth height is higher than the third height.
2. The method of claim 1, wherein, When the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, controlling the first virtual character to move includes: Collision detection is performed on the target virtual prop during its movement; If the target virtual prop is detected to collide with the target virtual object at the target explosion location, the system detects whether the first virtual character exists within the preset range of the target explosion location, wherein the target virtual object is a virtual object that is allowed to be detected by collision. If the first virtual character is detected to exist within the preset range of the target virtual prop, the first virtual character is controlled to move.
3. The method of claim 1, wherein, When the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, controlling the first virtual character to move includes: The target direction is determined based on the position of the first virtual character and the target explosion position, wherein the target direction is the direction of the extension line connecting the center of the first virtual character with the target explosion position as the starting point; Obtain the target distance between the location of the first virtual character and the target explosion location; The first virtual character is controlled to move towards the target direction at a target speed according to the target distance, wherein the value of the target speed and the value of the target distance are negatively correlated.
4. The method according to claim 3, characterized in that, Determining the target direction based on the location of the first virtual character and the target explosion location includes: When it is detected that the target virtual prop collides with the target virtual object at the target explosion location, and the target virtual object is a virtual object, the target direction is determined based on the center of the first virtual character and the target explosion location on the surface of the virtual object; When it is detected that the target virtual prop collides with the target virtual object at the target explosion location, and the target virtual object is the target part of the first virtual character, the target direction is determined based on the center of mass of the first virtual character and the center of mass of the target part.
5. The method according to claim 3, characterized in that, The step of controlling the first virtual character to move towards the target direction at the target speed according to the target distance includes: When the first virtual character is in a virtual planar space, control the first virtual character to perform planar displacement in the target direction at the target speed, wherein the virtual planar space is a two-dimensional planar space; or When the first virtual character is in a virtual three-dimensional space, the first virtual character is controlled to undergo planar displacement or parabolic displacement in the target direction at the target speed, wherein the virtual three-dimensional space is a three-dimensional space.
6. The method according to claim 1, characterized in that, When the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, controlling the first virtual character to move includes: If the target virtual prop is detected to have exploded at the target explosion location, determine whether the first virtual character exists in the sphere detection area centered at the target explosion location; If the first virtual character is detected in the sphere detection area, it is determined that the first virtual character exists within the preset range.
7. The method according to claim 1, characterized in that, The display of the first virtual character in the air state when the first virtual character moves into the air includes at least one of the following: Display the first virtual character in the air state and the virtual skills that the first virtual character is allowed to release when in the air state; or Displays the first virtual character in the air state and the virtual items that the first virtual character is allowed to use when in the air state; or Displays the first virtual character in the air state and the virtual actions that the first virtual character is allowed to perform while in the air state.
8. The method according to claim 1, characterized in that, The method further includes: When the target virtual prop is thrown again and explodes, and the first virtual character is within the preset range of the target virtual prop, the first virtual character is controlled to move according to the explosion position of the target virtual prop thrown again; when the first virtual character moves to a second height in the air, the first virtual character at the second height is displayed, wherein the second height is higher than the first height; When the target virtual prop is thrown again and explodes, and the first virtual building exists within the preset range of the target virtual prop, the first virtual building is controlled to move according to the explosion position of the target virtual prop thrown again; when the first virtual building moves into the air, the first virtual building in the air state is displayed.
9. The method according to claim 1, characterized in that, After responding to the second operation command and controlling the first virtual character to create the first virtual building, the method further includes: When the target virtual prop thrown by the first virtual character explodes on the first virtual building, and there is a first virtual character remaining in the first virtual building within the preset range of the target virtual prop, the first virtual character is controlled to move according to the explosion position of the target virtual prop thrown again. When the first virtual character is moved from the first virtual building to the air, the first virtual character in the air state is displayed; In response to a fourth operation command, the first virtual character is controlled to create a second virtual building, wherein the second virtual building is a virtual building in which the first virtual character is allowed to stay.
10. The method according to claim 1, characterized in that, The method further includes: When the virtual character in the air state also includes a second virtual character, in response to the fifth operation command, the first virtual character in the air state is controlled to perform the preset operation on the second virtual character in the air state.
11. The method according to claim 10, characterized in that, The method further includes: When the first virtual character and the second virtual character are in the same faction, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a first preset operation on the second virtual character in the air state, wherein the first preset operation is an operation that is allowed to be performed between virtual characters in the same faction; When the first virtual character and the second virtual character are in different factions, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a second preset operation on the second virtual character in the air state, wherein the second preset operation is an operation that is allowed to be performed between virtual characters in different factions.
12. The method according to claim 1, characterized in that, The method further includes: If the duration of displacement of the first virtual character in the air exceeds a preset threshold and the first virtual character has not stopped displacing, in response to the sixth operation command, the first virtual character is controlled to adjust the direction of displacement. The first virtual character is set to be prohibited from adjusting the direction of displacement if the duration of displacement does not exceed the preset threshold.
13. The method according to any one of claims 1 to 12, characterized in that, The method further includes at least one of the following: When the first virtual character is in the air state, in response to the first interactive operation, control the first virtual character to use shooting props to shoot in the air; When the first virtual character is in the air state, in response to the second interactive operation, the first virtual character is controlled to select the first virtual building from the set of virtual buildings; When the first virtual character is in the air state, in response to the third interactive operation, the first virtual character is controlled to create the first virtual building in a preset area in the virtual scene; When the first virtual character is in the air state, in response to the fourth interaction operation, the first virtual character and the target interaction object are controlled to perform an interaction operation, wherein the distance between the target interaction object and the first virtual character in the air state meets a preset condition.
14. A control device for virtual props, characterized in that, include: The first control module is used to respond to the first operation command and control the first virtual character to throw a target virtual prop, wherein the target virtual prop is a virtual prop that moves along a throwing trajectory determined by the first virtual character, starting from the first virtual character, and the target virtual prop is used to control the displacement of virtual characters within a preset range. The second control module is used to control the first virtual character to move when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion. The display module is used to display the first virtual character in the air and a preset operation set when the first virtual character moves into the air, wherein the preset operation set contains preset operations that are allowed to be executed when the first virtual character is in the air state; A creation module is configured to respond to a second operation instruction and control the first virtual character to create a first virtual building, wherein the first virtual building is a virtual building that allows the first virtual character to stay; The device is also used to: in response to a third operation command, control the first virtual character at a first altitude in the air state to throw the target virtual prop again; The device is further configured to: when the target virtual prop is thrown again and explodes, and the first virtual character and the first virtual building exist within the preset range of the target virtual prop, control the first virtual building and the first virtual character to shift according to the explosion position of the target virtual prop thrown again; when the first virtual building shifts to a third height in the air and the first virtual character shifts to a fourth height in the air, display the first virtual building at the third height and the first virtual character at the fourth height, wherein the fourth height is higher than the third height.
15. The apparatus according to claim 14, characterized in that, The device is used to control the displacement of the first virtual character when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion, including: Collision detection is performed on the target virtual prop during its movement; If the target virtual prop is detected to collide with the target virtual object at the target explosion location, the system detects whether the first virtual character exists within the preset range of the target explosion location, wherein the target virtual object is a virtual object that is allowed to be detected by collision. If the first virtual character is detected to exist within the preset range of the target virtual prop, the first virtual character is controlled to move.
16. The apparatus according to claim 14, characterized in that, The device is used to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: The target direction is determined based on the position of the first virtual character and the target explosion position, wherein the target direction is the direction of the extension line connecting the center of the first virtual character with the target explosion position as the starting point; Obtain the target distance between the location of the first virtual character and the target explosion location; The first virtual character is controlled to move towards the target direction at a target speed according to the target distance, wherein the value of the target speed and the value of the target distance are negatively correlated.
17. The apparatus according to claim 16, characterized in that, The device is used to determine the target direction based on the position of the first virtual character and the target explosion location in the following manner: When it is detected that the target virtual prop collides with the target virtual object at the target explosion location, and the target virtual object is a virtual object, the target direction is determined based on the center of the first virtual character and the target explosion location on the surface of the virtual object; When it is detected that the target virtual prop collides with the target virtual object at the target explosion location, and the target virtual object is the target part of the first virtual character, the target direction is determined based on the center of mass of the first virtual character and the center of mass of the target part.
18. The apparatus according to claim 16, characterized in that, The device is used to control the first virtual character to move towards the target direction at a target speed based on the target distance in the following manner: When the first virtual character is in a virtual planar space, control the first virtual character to perform planar displacement in the target direction at the target speed, wherein the virtual planar space is a two-dimensional planar space; or When the first virtual character is in a virtual three-dimensional space, the first virtual character is controlled to undergo planar displacement or parabolic displacement in the target direction at the target speed, wherein the virtual three-dimensional space is a three-dimensional space.
19. The apparatus according to claim 14, characterized in that, The device is used to control the first virtual character to move in the following manner when the target virtual prop explodes at the target explosion location and the first virtual character exists within the preset range of the target virtual prop at the time of the explosion: If the target virtual prop is detected to have exploded at the target explosion location, determine whether the first virtual character exists in the sphere detection area centered at the target explosion location; If the first virtual character is detected in the sphere detection area, it is determined that the first virtual character exists within the preset range.
20. The apparatus according to claim 14, characterized in that, The device is used to display the first virtual character in an airborne state when the first virtual character is displaced into the air, including at least one of the following: Display the first virtual character in the air state and the virtual skills that the first virtual character is allowed to release when in the air state; or Displays the first virtual character in the air state and the virtual items that the first virtual character is allowed to use when in the air state; or Displays the first virtual character in the air state and the virtual actions that the first virtual character is allowed to perform while in the air state.
21. The apparatus according to claim 14, characterized in that, The device is also used for: When the target virtual prop is thrown again and explodes, and the first virtual character is within the preset range of the target virtual prop, the first virtual character is controlled to move according to the explosion position of the target virtual prop thrown again; when the first virtual character moves to a second height in the air, the first virtual character at the second height is displayed, wherein the second height is higher than the first height; When the target virtual prop is thrown again and explodes, and the first virtual building exists within the preset range of the target virtual prop, the first virtual building is controlled to move according to the explosion position of the target virtual prop thrown again; when the first virtual building moves into the air, the first virtual building in the air state is displayed.
22. The apparatus according to claim 14, characterized in that, After responding to the second operation command and controlling the first virtual character to create the first virtual building, the device is further configured to: When the target virtual prop thrown by the first virtual character explodes on the first virtual building, and there is a first virtual character remaining in the first virtual building within the preset range of the target virtual prop, the first virtual character is controlled to move according to the explosion position of the target virtual prop thrown again. When the first virtual character is moved from the first virtual building to the air, the first virtual character in the air state is displayed; In response to a fourth operation command, the first virtual character is controlled to create a second virtual building, wherein the second virtual building is a virtual building in which the first virtual character is allowed to stay.
23. The apparatus according to claim 14, characterized in that, The device is also used for: When the virtual character in the air state also includes a second virtual character, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a preset operation on the second virtual character in the air state.
24. The apparatus according to claim 23, characterized in that, The device is also used for: When the first virtual character and the second virtual character are in the same faction, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a first preset operation on the second virtual character in the air state, wherein the first preset operation is an operation that is allowed to be performed between virtual characters in the same faction; When the first virtual character and the second virtual character are in different factions, in response to the fifth operation command, the first virtual character in the air state is controlled to perform a second preset operation on the second virtual character in the air state, wherein the second preset operation is an operation that is allowed to be performed between virtual characters in different factions.
25. The apparatus according to claim 14, characterized in that, The device is also used for: If the duration of displacement of the first virtual character in the air exceeds a preset threshold and the first virtual character has not stopped displacing, in response to the sixth operation command, the first virtual character is controlled to adjust the direction of displacement. The first virtual character is set to be prohibited from adjusting the direction of displacement if the duration of displacement does not exceed the preset threshold.
26. The apparatus according to any one of claims 14 to 25, characterized in that, The device is also used for at least one of the following: When the first virtual character is in the air state, in response to the first interactive operation, control the first virtual character to use shooting props to shoot in the air; When the first virtual character is in the air state, in response to the second interactive operation, the first virtual character is controlled to select the first virtual building from the set of virtual buildings; When the first virtual character is in the air state, in response to the third interactive operation, the first virtual character is controlled to create the first virtual building in a preset area in the virtual scene; When the first virtual character is in the air state, in response to the fourth interaction operation, the first virtual character and the target interaction object are controlled to perform an interaction operation, wherein the distance between the target interaction object and the first virtual character in the air state meets a preset condition.
27. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or computer at runtime as described in any one of claims 1 to 13.
28. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 13.
29. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 13 through the computer program.
Citation Information
Patent Citations
Method and device for realizing collision processing
CN111346379A
