Trajectory control method for virtual projectile, and related apparatus
By acquiring the distance and angle between the virtual projector and the virtual object in real time, and controlling the projector to stop changing its trajectory with the object under specific conditions, the system performance problem caused by invalid virtual projector operations is solved, and the system stability and user experience are improved.
Patent Information
- Application Number
- PCT/CN2025/087771
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-04
- Filing Date
- 2025-04-08
- Publication Date
- 2025-12-11
AI Technical Summary
In existing technologies, when virtual projectors follow the target object, it leads to an increase in invalid operations, resulting in system performance problems such as slow operation, long response time, and even possible crashes, resulting in a poor user experience.
By acquiring the distance and angle between the target virtual projectile and the virtual object in real time, the projectile can be controlled to stop changing its trajectory with the object under specific conditions, and the projectile's trajectory can be adjusted to avoid the virtual object.
It reduces the number of invalid operations, improves system stability and user experience, avoids system performance issues, and solves the problem of circular motion of virtual projectors when they rotate rapidly.
Smart Images

Figure CN2025087771_11122025_PF_FP_ABST
Abstract
Description
Trajectory control method of virtual projectile and related device
[0001] This application claims priority from the Chinese patent application No. 202410720328.4 filed on June 04, 2024, and titled "Trajectory control method of virtual projectile and related device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present disclosure relates to the technical field of computer human-computer interaction, and more particularly to a trajectory control method of virtual projectile. BACKGROUND
[0003] With the development of computer technology and the diversification of terminal device functions, the types of games that can be played on terminal devices are increasing. Among them, shooting games are a relatively popular type of game. In a shooting game, a virtual scene is usually provided, and a user can control a virtual object in the virtual scene to use a virtual shooting prop to fight. The virtual projectile launched by the virtual shooting prop has multiple types. Some types of virtual projectiles lock onto a target object, and when the target object moves, the virtual projectile changes its movement trajectory and shooting position according to the movement trajectory of the target object.
[0004] In related technologies, the virtual projectile usually changes its movement trajectory and shooting position according to the movement trajectory of the target object by constantly correcting the movement direction at a fixed angular velocity. However, this method may cause the terminal device to receive a large number of invalid operations, resulting in system performance problems such as slow system operation, long response time, and large resource consumption in shooting games. In severe cases, it may even cause the system to crash or fail to operate normally. SUMMARY
[0005] Embodiments of the present disclosure provide a trajectory control method of virtual projectile and related device, which changes the movement trajectory of the virtual projectile during the process of the virtual projectile shooting a virtual object, reduces the number of invalid operations, and thus reduces the probability of system performance problems, ensuring stable system operation.
[0006] One aspect of the present application provides a trajectory control method of virtual projectile, comprising:
[0007] In response to a launch operation based on a virtual prop, controlling the virtual prop to launch a target virtual projectile, wherein the target virtual projectile is an object launched to a virtual object displayed in a virtual scene, and the target virtual projectile changes its movement trajectory according to the movement trajectory of the virtual object;
[0008] acquire one or more of a target distance and a target angle corresponding to a current emission phase of the target virtual projectile, wherein the target distance is a distance between the target virtual projectile and the virtual object, and the target angle is an angle between a moving direction of the target virtual projectile and a moving direction of the virtual object;
[0009] in the current emission phase, if the target distance is less than a distance threshold, control the target virtual projectile to stop changing a moving track according to a moving track of the virtual object, or if the target angle is greater than or equal to an angle threshold, control the target virtual projectile to stop changing the moving track according to the moving track of the virtual object.
[0010] Another aspect of the present application provides a track control device of a virtual projectile, comprising:
[0011] an emission module configured to control a virtual prop to emit a target virtual projectile in response to an emission operation based on the virtual prop, wherein the target virtual projectile is an object emitted to a virtual object displayed in a virtual scene, and the target virtual projectile changes a moving track according to a moving track of the virtual object;
[0012] an acquisition module configured to acquire one or more of a target distance and a target angle corresponding to a current emission phase of the target virtual projectile, wherein the target distance is a distance between the target virtual projectile and the virtual object, and the target angle is an angle between a moving direction of the target virtual projectile and a moving direction of the virtual object;
[0013] a control module configured to, in the current emission phase, if the target distance is less than a distance threshold, control the target virtual projectile to stop changing a moving track according to a moving track of the virtual object, or if the target angle is greater than or equal to an angle threshold, control the target virtual projectile to stop changing the moving track according to the moving track of the virtual object.
[0014] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
[0015] The present application provides a trajectory control method of a virtual projectile and a related device. When a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, the distance between the target virtual projectile and the virtual object or the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is acquired in real time. If the distance between the target virtual projectile and the virtual object is less than a distance threshold or the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object. Thus, when the target virtual projectile approaches the virtual object, the target virtual projectile can be adjusted to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the virtual object can avoid the target virtual projectile by quickly changing the moving direction, the invalid operation becomes a valid operation, the number of invalid operations is reduced, the probability of system performance problems is reduced, and stable system operation is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0016] FIG. 1 is a schematic diagram of a motion trajectory of a target virtual projectile according to the related art;
[0017] FIG. 2 is a schematic diagram of a motion trajectory of a target virtual projectile according to the related art;
[0018] FIG. 3 is a schematic diagram of a target virtual projectile generating a circular motion according to the related art;
[0019] FIG. 4 is a schematic diagram of an application mode of a trajectory control method of a virtual projectile according to an embodiment of the present application;
[0020] FIG. 5 is a schematic diagram of an application mode of a trajectory control method of a virtual projectile according to an embodiment of the present application;
[0021] FIG. 6 is a schematic diagram of a structure of a terminal device according to an embodiment of the present application;
[0022] FIG. 7 is an application environment diagram of a trajectory control method of a virtual projectile according to an embodiment of the present application;
[0023] FIG. 8 is a flowchart of a trajectory control method of a virtual projectile according to an embodiment of the present application;
[0024] FIG. 9 is a schematic diagram of an interface for configuring a distance threshold according to an embodiment of the present application;
[0025] FIG. 10 is a schematic diagram of an interface for configuring a target following stop distance curve according to an embodiment of the present application;
[0026] FIG. 11 is a schematic diagram of a target following stop distance curve according to an embodiment of the present application;
[0027] FIG. 12 is a schematic diagram of a distance check of a target virtual projection object according to an embodiment of the present application;
[0028] FIG. 13 is a schematic diagram of an interface for configuring a distance threshold according to an embodiment of the present application;
[0029] FIG. 14 is a schematic diagram of an interface for configuring a stop target following angle curve according to an embodiment of the present application;
[0030] FIG. 15 is a schematic diagram of a stop target following distance curve according to an embodiment of the present application;
[0031] FIG. 16 is a schematic diagram of an angle check of a target virtual projection object according to an embodiment of the present application;
[0032] FIG. 17 is a schematic diagram of a trajectory control method of a virtual projection object according to an embodiment of the present application;
[0033] FIG. 18 is a schematic diagram of a target virtual projection object after adjustment of a motion trajectory according to an embodiment of the present application;
[0034] FIG. 19 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0035] FIG. 20 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0036] FIG. 21 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0037] FIG. 22 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0038] FIG. 23 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0039] FIG. 24 is a schematic diagram of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0040] FIG. 25 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0041] FIG. 26 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0042] FIG. 27 is a flowchart of a trajectory control method of a virtual projection object according to another embodiment of the present application;
[0043] FIG. 28 is a schematic diagram of a trajectory control device of a virtual projection object according to an embodiment of the present application;
[0044] FIG. 29 is a schematic diagram of a server structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] The trajectory control method of the virtual projectile provided by the embodiments of the present application can adjust the target virtual projectile to stop changing the motion trajectory along with the change of the moving trajectory of the virtual object when the target virtual projectile is close to the virtual object, so that the virtual object can avoid the target virtual projectile by quickly changing the moving direction, and the invalid operation becomes valid operation, thereby reducing the number of invalid operations and the probability of system performance problems, and ensuring stable operation of the system.
[0046] The terms "first", "second", "third", "fourth" and the like in the description, claims, and drawings of the present application, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the present application described herein are capable of accomplishing drawbacks, advantages, and objects from other embodiments of the present application while the remaining constituents remain the same. Moreover, the terms "comprise", "comprising", "include", "including", and the like, as used herein, specify the presence of stated features, integers, steps, or components but do not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof.
[0047] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.
[0048] In order to facilitate the understanding of the technical solutions provided by the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0049] 1) Client, an application program running in a terminal device for providing various services, such as a video playing client, a game client, etc.
[0050] 2) In response to, used to indicate the condition or state on which the operation is dependent, when the dependent condition or state is met, one or more operations performed can be real-time or have a set delay; in the absence of a specific description, there is no limitation on the execution sequence of multiple operations performed.
[0051] 3) Virtual scene, a virtual scene displayed (or provided) by an application when running on a terminal device. The virtual scene can be a simulation environment of the real world, a semi-simulation semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene, and the embodiments of the present application do not limit the dimension of the virtual scene. For example, the virtual scene can include a sky, a land, an ocean, etc., the land can include desert, city, and other environmental elements, and a user can control a virtual object to move in the virtual scene.
[0052] 4) Virtual object, an image of various people and things that can interact in a virtual scene, or a movable object in a virtual scene. The movable object can be a virtual character, a virtual animal, an animation character, etc., such as a character, an animal, etc. displayed in a virtual scene. The virtual object can be a virtual image in a virtual scene representing a user. The virtual scene can include multiple virtual objects, each virtual object having its own shape and volume in the virtual scene and occupying a part of the space in the virtual scene.
[0053] For example, the virtual object can be rendered by a three-dimensional (3D) game engine or digital content creation (DCC) software, with the aid of 3D graphics modeling rendering technology, where the virtual object data can include character model data and character skeleton data.
[0054] Optionally, the virtual object can be a player character controlled by operation on a client, an artificial intelligence (AI) set in a virtual scene battle through training, or a non-player character (NPC) set in a virtual scene interaction. Optionally, the virtual object can be a virtual character competing in a virtual scene. Optionally, the number of virtual objects participating in interaction in the virtual scene can be pre-set, or dynamically determined according to the number of clients joining the interaction.
[0055] Taking a shooting game as an example, the user can control the virtual object to freely fall, glide or open a parachute to fall in the sky of the virtual scene, to run, jump, crawl or bend down on the land, to swim, float or dive in the sea, and of course, the user can also control the virtual object to move in the virtual scene by riding a virtual vehicle, such as a virtual car, a virtual aircraft, a virtual yacht, and the like. Here, only the above scenes are taken as examples, and the embodiments of the present application are not limited to the above.
[0056] The user can also control the virtual object to interact with other virtual objects by means of virtual props, for example, the virtual props can include various types, such as throwing virtual props such as sticky burning agent, hand grenade, cluster bomb, smoke bomb, shock bomb, burning bottle or sticky hand grenade (referred to as "sticky mine"), and shooting virtual props such as machine gun, pistol, rifle, sniper rifle, aircraft missile, and the like. The type of virtual prop is not limited in the present application.
[0057] 5) Scene data, representing characteristic data of the virtual scene, for example, can be the area of the built area in the virtual scene, the current architectural style of the virtual scene, and the like; can also include the position of the virtual building in the virtual scene, the floor area of the virtual building, and the like.
[0058] Taking the virtual scene as a game scene as an example, in various shooting games, the user can control the virtual object in the virtual scene to use virtual shooting props to fight, and the virtual projection of the virtual shooting prop includes two types: one type of virtual projection of the virtual shooting prop will move according to the shooting position at the time of shooting, and the movement track is related to the shooting position at the time of shooting; and the other type of virtual projection will lock the target object at the time of shooting, and when the target object moves, the virtual projection will change its movement track and shooting position along with the movement track of the target object.
[0059] Please refer to FIG. 1 to FIG. 3, FIG. 1 and FIG. 2 are schematic diagrams of the motion trajectory of a target virtual projectile presented in the related art, and FIG. 3 is a schematic diagram of the target virtual projectile generating a circular motion presented in the related art. In the related art, as shown in FIG. 1 and FIG. 2, the virtual projectile of the target object that will be locked when shooting is divided into two processing schemes. One is that the motion speed of the virtual projectile is very fast, and the turning angular speed is also very fast. When the virtual projectile is closer to the target object, the user cannot make the target object avoid the virtual projectile by moving the target object. That is, some operations of the user for the target object belong to operations that cannot avoid the virtual projectile. Moreover, due to the locking shooting function of the virtual projectile, no matter what operation the user performs, the virtual projectile cannot be avoided, thereby causing these operations to belong to invalid operations, and also causing the user controlling the target object to have a feeling of “no matter how to move, it cannot be avoided”, and a strong frustration, and reducing the user's game experience. Even if the user knows that the virtual projectile cannot be avoided, when facing the virtual projectile, the user will subconsciously produce some invalid operations. After the shooting game system receives the invalid operations, the processing time of the central processing unit (CPU) is occupied. The invalid operations can generate unnecessary data or intermediate results, occupy the content space of the system, and also can transmit invalid operations, consume storage resources and network bandwidth, etc., thereby causing the shooting game system to run slowly, have a long response time, consume a large amount of resources, and other system performance problems. In severe cases, it can even cause the system to crash or not to run normally. The other is that the motion speed of the virtual projectile is slow, but the turning angular speed is fast. In a long distance, the motion speed of the virtual projectile is slow, which can give the user a false impression that it is easy to avoid. However, when the virtual projectile is close, no matter how to turn or move quickly, the virtual projectile cannot be avoided, and it will be hit, which can cause the user to have a strong frustration, and reduce the user's game experience. Both of the virtual projectiles are configured with a high turning angular speed. As shown in FIG. 3, when the target object quickly turns when the virtual projectile is about to approach, the virtual projectile will start to move in a circle because the instantaneous motion speed direction and the acceleration direction are at right angles, and satisfy the centripetal acceleration formula, which can cause a game bug, and reduce the user's game experience.
[0060] To solve the above technical problems, the virtual projectile trajectory control method, device, electronic device and computer readable storage medium provided by the present application can change the trajectory of the virtual projectile during the process of the virtual projectile being fired at the virtual object, making the invalid operation become a valid operation, thereby reducing the number of invalid operations and the probability of system performance problems, ensuring stable operation of the system. In addition, it also improves the user's experience, and solves the problem of circular motion around the virtual object that occurs when the virtual projectile is rapidly rotating in the virtual object.
[0061] To make it easier to understand the virtual projectile trajectory control method provided by the embodiments of the present application, first, an exemplary implementation scenario of the virtual projectile trajectory control method provided by the embodiments of the present application is described. The virtual scene in the virtual projectile trajectory control processing method provided by the embodiments of the present application can be completely based on the output of the terminal device, or based on the cooperative output of the terminal device and the server.
[0062] In other embodiments, the virtual scene can also be an environment for game characters to interact, for example, it can be a game character in a virtual scene for a battle, by controlling the action of the game character, the two-way interaction in the virtual scene can be carried out, so that the user can relax the life pressure in the process of the game.
[0063] In one implementation scenario, referring to FIG. 4, FIG. 4 is an application mode schematic diagram of the virtual projectile trajectory control method provided by the embodiments of the present application, which is suitable for an application mode that can complete the related data calculation of the virtual scene 100 completely relying on the graphic processing hardware computing capability of the terminal device 400, for example, a single machine version / offline mode game, which is completed by various different types of terminal devices 400 such as smart phones, tablet computers and virtual reality / augmented reality devices to output the virtual scene.
[0064] As an example, the types of graphic processing hardware include a central processing unit (CPU) and a graphic processing unit (GPU).
[0065] When forming the visual perception of the virtual scene 100, the terminal device 400 calculates the data required for display through graphic computing hardware, and completes the loading, parsing and rendering of the display data, and outputs the video frame that can form the visual perception of the virtual scene. For example, the display screen of the smart phone presents a two-dimensional video frame, or the lens of the augmented reality / virtual reality glasses projects a video frame that realizes a three-dimensional display effect, etc. In addition, in order to enrich the perception effect, the terminal device 400 can also form one or more of auditory perception, tactile perception, motion perception and taste perception by means of different hardware.
[0066] As an example, the terminal device 400 runs a client 410 (for example, a stand-alone game application), and the client 410 outputs a virtual scene including role playing during the running process of the client 410. The virtual scene can be an environment for game characters to interact, for example, a plain, a street, a valley, etc. for game characters to fight. Taking a third-person perspective display of the virtual scene 100 as an example, the virtual scene 100 displays a virtual object 101. The virtual object 101 can be a game character controlled by a user, that is, the virtual object 101 is controlled by a real user, and the virtual object 101 moves in the virtual scene 100 in response to the operation of the real user on the controller (for example, a touch screen, a voice control switch, a keyboard, a mouse, a joystick, etc.). For example, when the real user moves the joystick to the right, the virtual object 101 will move to the right in the virtual scene 100. The virtual object 101 can also remain stationary, jump, and control the virtual object 101 to perform shooting operations, etc.
[0067] For example, when the client 410 receives a user-triggered shooting operation based on a virtual shooting prop, the target virtual projectile 102 (the target virtual projectile 102 is an object launched at the virtual object 101, such as a virtual object 101 for shooting, and the target virtual projectile 102 changes its trajectory according to the movement trajectory of the virtual object 101) is launched. The target distance (the distance between the target virtual projectile 102 and the virtual object 101) and the target angle (the angle between the movement direction of the target virtual projectile 102 and the movement direction of the virtual object 101) corresponding to the current shooting stage of the target virtual projectile 102 are obtained. In the current shooting stage, if the target distance is less than the distance threshold, the target virtual projectile 102 is controlled to stop changing the trajectory according to the movement trajectory of the virtual object 101, or if the target angle is greater than or equal to the angle threshold, the target virtual projectile 102 is controlled to stop changing the trajectory according to the movement trajectory of the virtual object 101. That is, when the target virtual projectile 102 is close to the virtual object 101, the target virtual projectile 102 can be adjusted to stop changing the trajectory according to the movement trajectory of the virtual object 101, and the user controlling the virtual object 101 can quickly change the movement direction of the virtual object 101 to avoid the target virtual projectile 102, so that the invalid operation becomes a valid operation, thereby reducing the number of invalid operations and the probability of system performance problems, and ensuring stable system operation.
[0068] In another implementation scenario, referring to FIG. 5, FIG. 5 is an application mode schematic diagram of a virtual projectile trajectory control method provided by an embodiment of the present application, applied to the terminal device 400 and the server 200, and suitable for an application type that depends on the computing power of the server 200 to complete virtual scene calculation and outputs the virtual scene on the terminal device 400.
[0069] Taking the visual perception of the virtual scene 100 as an example, the server 200 calculates the virtual scene related display data (for example, scene data) and sends it to the terminal device 400 through the network 300, and the terminal device 400 relies on the graphic computing hardware to complete the loading, parsing and rendering of the virtual scene related display data, and relies on the graphic computing hardware to output the virtual scene to form a visual perception, for example, a two-dimensional video frame can be presented on the display screen of a smart phone, or a three-dimensional display effect video frame is projected on the lens of an augmented reality / virtual reality glasses, etc. For the form of perception of the virtual scene, it can be understood that the corresponding hardware output of the terminal device 400 can be used, for example, a microphone is used to form an auditory perception, a vibrator is used to form a tactile perception, etc.
[0070] As an example, the terminal device 400 runs a client 410 (for example, a network version of a game application), interacts with other users by connecting to the server 200 (for example, a game server) to play a game, and the terminal device 400 outputs the virtual scene 100 of the client 410. Taking a third-person perspective display of the virtual scene 100 as an example, the virtual scene 100 displays a virtual object 101 and a target virtual projection 102, wherein the virtual object 101 can be a game character controlled by a user, that is, the virtual object 101 is controlled by a real user, and the virtual object 101 moves in the virtual scene 100 in response to the operation of the real user on the controller (for example, a touch screen, a sound control switch, a keyboard, a mouse, a joystick, etc.), for example, when the real user moves the joystick to the right, the virtual character 101 will move to the right in the virtual scene 100, and can also remain stationary, jump, and control the virtual character 101 to shoot, etc.
[0071] For example, when the client 410 receives a user-triggered virtual shooting prop-based shooting operation, the virtual prop is controlled to shoot the target virtual projectile 102 (which is an object shot at the virtual object 101, such as a virtual object 101 shooting object, and the target virtual projectile 102 changes its movement trajectory along with the movement trajectory of the virtual object 101); one or more of the target distance (the distance between the target virtual projectile 102 and the virtual object 101) and the target included angle (the included angle between the movement direction of the target virtual projectile 102 and the movement direction of the virtual object 101) corresponding to the current shooting stage of the target virtual projectile 102 is obtained; in the current shooting stage, if the target distance is less than the distance threshold, the target virtual projectile 102 is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object 101, or if the target included angle is greater than or equal to the included angle threshold, the target virtual projectile 102 is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object 101. That is, when the target virtual projectile 102 is close to the virtual object 101, the target virtual projectile 102 can be adjusted to stop changing the movement trajectory along the movement trajectory of the virtual object 101, and the user controlling the virtual object 101 can quickly change the movement direction of the virtual object 101 to avoid the target virtual projectile 102, making the invalid operation effective, thereby reducing the number of invalid operations and the probability of system performance problems, ensuring stable operation of the system.
[0072] In some embodiments, the terminal device 400 can implement the trajectory control method of the virtual projectile provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or a software module in the operating system: it can be a native application program (APP, APPlication), that is, a program that needs to be installed in the operating system to run, such as a game APP (i.e. the client 410 described above); it can also be a mini program, that is, a program that only needs to be downloaded into a browser environment to run; it can also be a game mini program that can be embedded into any APP. In summary, the above computer program can be any form of application program, module or plug-in.
[0073] Taking a computer program as an application program, in actual implementation, the terminal device 400 is installed and runs an application program supporting a virtual scene. The application program can be any one of a first-person shooting game (FPS), a third-person shooting game (3PS), a virtual reality application program, a three-dimensional map program, or a multi-player gun battle type survival game. The user uses the terminal device 400 to operate a virtual object located in the virtual scene to perform an activity, which includes but is not limited to at least one of adjusting a body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building a virtual building. Illustratively, the virtual object can be a virtual character, such as a simulated character role or an animation character role.
[0074] In other embodiments, the embodiments of the present application can also be implemented by means of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize data calculation, storage, processing, and sharing.
[0075] Illustratively, a trajectory control method of a virtual projectile is implemented by a cloud server. A virtual scene containing a virtual object is displayed by a display device of a terminal device. When a user performs a launching operation on a virtual shooting prop through the terminal device, the cloud server controls the virtual prop to launch a target virtual projectile (the target virtual projectile is used to shoot the virtual object, and the target virtual projectile changes a motion trajectory according to a moving trajectory of the virtual object). One or more of a target distance and a target included angle corresponding to a current shooting stage of the target virtual projectile are acquired (the target distance is a distance between the target virtual projectile and the virtual object, and the target included angle is an included angle between a motion direction of the target virtual projectile and a moving direction of the virtual object). In the current shooting stage, if the target distance is less than a distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the moving trajectory of the virtual object, or if the target included angle is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the moving trajectory of the virtual object, and an effect of changing the motion trajectory of the target virtual projectile is displayed on the display device of the terminal device.
[0076] In other embodiments, the trajectory control method of the virtual projectile provided by the embodiments of the present application can also be implemented in combination with blockchain technology.
[0077] For example, the pre-configured configuration information for the virtual prop can be stored in the blockchain network, the configuration information is information that can change the movement trajectory of the target virtual projectile along with the movement trajectory of the virtual object, when the terminal device controls the right of the virtual prop to launch the target virtual projectile, and receives the launch operation based on the virtual prop, the terminal device can generate a transaction for querying the target distance (the target distance is the distance between the target virtual projectile and the shooting target) and the target angle (the target angle is the angle between the movement direction of the target virtual projectile and the movement direction of the shooting target) corresponding to the current launch stage of the target virtual projectile, and submit it to the blockchain network, wherein the key name (i.e. the current launch stage) is carried in the query request, so that the consensus nodes in the blockchain network execute the transaction to query the data corresponding to the key name (i.e. the target distance and the target angle corresponding to the current launch stage) from the state database, and then the blockchain network sends the queried target distance and target angle corresponding to the current launch stage to the terminal device, so that the terminal device judges according to the target distance and the target angle to control the target virtual projectile to stop changing the movement trajectory along the movement trajectory of the virtual object or control the target virtual projectile to continue changing the movement trajectory along the movement trajectory of the virtual object, that is, if the target distance is less than the distance threshold, the target virtual projectile stops changing the movement trajectory along the movement trajectory of the virtual object, or if the target angle is greater than or equal to the angle threshold, the target virtual projectile stops changing the movement trajectory along the movement trajectory of the virtual object, if the target distance is greater than or equal to the distance threshold, the target virtual projectile continues to change the movement trajectory along the movement trajectory of the virtual object, or if the target angle is less than the angle threshold, the target virtual projectile continues to change the movement trajectory along the movement trajectory of the virtual object. In this way, by storing the control of the target virtual projectile to stop changing the movement trajectory along the movement trajectory of the virtual object or control the target virtual projectile to continue changing the movement trajectory along the movement trajectory of the virtual object corresponding to different target distances and target angles in the blockchain network, based on the characteristics of decentralization, distributed storage and tamper resistance of the blockchain network, the security and reliability of the trajectory control information are ensured.
[0078] The structure of the terminal device 400 shown in FIG. 4 will be described below. Referring to FIG. 6, FIG. 6 is a structural schematic diagram of the terminal device 400 provided by the embodiments of the present application. The terminal device 400 shown in FIG. 6 includes at least one processor 420, a memory 460, at least one network interface 430 and a user interface 440. The various components in the terminal device 400 are coupled together through a bus system 450. It can be understood that the bus system 450 is used to realize the connection communication between the components. In addition to the data bus, the bus system 450 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, all kinds of buses are marked as the bus system 450 in FIG. 6.
[0079] The processor 420 can be an integrated circuit chip that has a processing capability of signals, such as a general purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc., wherein the general purpose processor can be a microprocessor or any conventional processor, etc.
[0080] The user interface 440 includes one or more output devices 441 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 440 also includes one or more input devices 442 that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0081] The memory 460 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 460 optionally includes one or more storage devices remotely located from the processor 420.
[0082] The memory 460 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. Non-volatile memory can be read only memory (ROM), volatile memory can be random access memory (RAM). The memory 460 described in the embodiments of the present application is intended to include any suitable type of memory.
[0083] In some embodiments, the memory 460 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or a subset or superset thereof, which are described below.
[0084] The operating system 461 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0085] The network communication module 462 is used to reach other computing devices via one or more (wired or wireless) network interfaces 430, examples of which include Bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (USB), etc.
[0086] a presentation module 463 for enabling presentation of information (e.g., a user interface for operating a peripheral device and displaying content and information) via one or more output devices 441 (e.g., a display screen, a speaker, etc.) associated with the user interface 440;
[0087] an input processing module 464 for detecting and translating one or more user inputs or interactions from one or more input devices 442.
[0088] In some embodiments, the trajectory control apparatus of the virtual projectile provided by the embodiments of the present application can be implemented in a software manner. FIG. 6 shows a trajectory control apparatus 465 of a virtual projectile stored in the memory 460, which can be software in the form of programs and plug-ins, etc., including the following software modules: a display module 4651, a shooting module 4652, an acquisition module 4653, and a control module 4654. These modules are logical, and thus can be combined or further split according to the implemented functions. It should be noted that, in FIG. 6, all the above modules are shown at one time for the convenience of expression, but should not be regarded as excluding the implementation in which only the display module 4651, the shooting module 4652, the acquisition module 4653, and the control module 4654 are included. The functions of the modules will be described below.
[0089] In other embodiments, the trajectory control apparatus of the virtual projectile provided by the embodiments of the present application can be implemented in a hardware manner. As an example, the trajectory control apparatus of the virtual projectile provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the trajectory control method of the virtual projectile provided by the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can use one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic elements.
[0090] The trajectory control method of the virtual projectile provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The trajectory control method of the virtual projectile provided by the embodiments of the present application can be executed by the terminal device 400 in FIG. 4 alone or by the terminal device 400 and the server 200 in FIG. 5 in cooperation.
[0091] For ease of understanding, please refer to FIG. 7, which is an application environment diagram of the trajectory control method of the virtual projectile in the embodiments of the present application. As shown in FIG. 7, the trajectory control method of the virtual projectile in the embodiments of the present application is applied to a computer device. The computer device includes a server and a terminal device. The server can be a stand-alone physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication. The embodiments of the present application do not limit this.
[0092] The following will be described taking the cooperation of the terminal device and the server as an example. The terminal device first displays a virtual object in a virtual scene. The server controls a virtual prop to launch a target virtual projectile in response to a launch operation based on the virtual prop, wherein the target virtual projectile is an object launched at the virtual object, and the target virtual projectile changes a motion trajectory along with a movement trajectory of the virtual object. The server obtains one or more of a target distance and a target included angle corresponding to a current launch phase of the target virtual projectile, wherein the target distance is a distance between the target virtual projectile and the virtual object, and the target included angle is an included angle between a motion direction of the target virtual projectile and a movement direction of the virtual object. In the current launch phase, if the target distance is less than a distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory along with the movement trajectory of the virtual object, or if the target included angle is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along with the movement trajectory of the virtual object.
[0093] The trajectory control method of the virtual projectile in the present application will be introduced from the perspective of the server. Please refer to FIG. 8. The trajectory control method of the virtual projectile provided in the embodiments of the present application includes steps S120 to S140. Specifically:
[0094] S120, in response to a launch operation based on a virtual prop, controlling the virtual prop to launch a target virtual projectile.
[0095] It can be understood that the terminal device is installed with a client supporting the virtual scene (for example, when the virtual scene is a game, the corresponding client can be a shooting game APP), when a user A opens the client installed on the terminal device (for example, the user A clicks an icon corresponding to the shooting game APP presented on the user interface of the terminal device), and the terminal device runs the client, a virtual object A (for example, a virtual object A controlled by the user A) and a virtual object B (for example, a virtual object B controlled by the user B or a virtual object B of a non-player character (NPC) realized by an artificial intelligence technology) can be displayed in the virtual scene presented on the human-computer interaction interface of the client.
[0096] In some embodiments, the virtual object A can be displayed in the virtual scene in the following manner: in response to a selection operation of the virtual object of the user A, the virtual object A is displayed in the virtual scene, and in response to a selection operation of the virtual object selected by the user A, the virtual object A is configured with a virtual prop.
[0097] For example, taking a game as the virtual scene, a plurality of virtual objects and a plurality of virtual props are provided in the game for users to select, and for each virtual object and each virtual prop, a corresponding icon is displayed in the game picture. When the user A clicks the icon corresponding to the virtual character displayed in the game picture, the game picture of the virtual object controlled by the user A is displayed.
[0098] In some embodiments, the virtual scene can be displayed in the human-computer interaction interface of the client in a first-person perspective (for example, the user plays the virtual character in the game in the user's own perspective), in a third-person perspective (for example, the user chases the virtual character in the game to play the game), or in a bird's-eye view. The different perspectives described above can be switched arbitrarily.
[0099] As an example, the virtual object can be an object controlled by the current user in the game, and of course, the virtual scene can also include other virtual objects, for example, virtual objects controlled by other users or by robot programs. The plurality of virtual objects can be divided into any one of a plurality of teams, and the teams can be in an antagonistic relationship or a cooperative relationship, and the teams in the virtual scene can include one or all of the above relationships.
[0100] Taking displaying a virtual scene in a first-person perspective as an example, the virtual scene displayed in the human-computer interaction interface can include: determining a field-of-view area of the virtual object according to a viewing position and a field-of-view angle of the virtual object in the complete virtual scene, and rendering a part of the virtual scene in the complete virtual scene located in the field-of-view area, that is, the displayed virtual scene can be a part of the virtual scene relative to the panoramic virtual scene. Because the first-person perspective is the most impactful viewing perspective for the user, in this way, immersive perception of the user in the operation process can be achieved.
[0101] Taking displaying a virtual scene in a bird's-eye view as an example, the virtual scene displayed in the human-computer interaction interface can include: in response to a zooming operation on the panoramic virtual scene, rendering a part of the virtual scene corresponding to the zooming operation in the human-computer interaction interface, that is, the displayed virtual scene can be a part of the virtual scene relative to the panoramic virtual scene. In this way, the operability of the user in the operation process can be improved, thereby improving the efficiency of human-computer interaction.
[0102] The target virtual projectile is an object emitted to the virtual object, and can be used to shoot the virtual object. The target virtual projectile changes a motion trajectory according to a movement trajectory of the virtual object.
[0103] It can be understood that when the user B controls the virtual prop of the virtual object B to perform a shooting or other emission operation, the virtual prop emits a virtual projectile. The virtual projectile is detected in type, and if the type of the virtual projectile is a type of targeting a target object, the virtual projectile is a target virtual projectile. If the type of the virtual projectile is shooting a target shooting position, the virtual projectile is not a target virtual projectile. The target virtual projectile continuously follows the shooting target, that is, the virtual object, and changes a motion trajectory according to a movement trajectory of the virtual object.
[0104] For example, when the virtual prop of the virtual object B performs shooting, the virtual projectile emitted by the virtual prop is a target virtual projectile, and the shooting target of the target virtual projectile is the virtual object A, the user A can control the virtual object A to dodge, for example, quickly turn and move, jump, crouch, and the like. By acquiring position information of the virtual object A in real time when dodging, the target virtual projectile changes a motion trajectory according to the virtual object A, and the updated motion trajectory can still accurately shoot the virtual object.
[0105] The emission operation based on the virtual prop is an operation of controlling the virtual prop to emit a target virtual projectile, such as a shooting operation, a throwing operation, and the like.
[0106] For example, the virtual prop is a virtual prop of an attack type for marking a shooting target, and the attack type virtual prop can cause damage to a virtual object that is shot. For example, a plane missile, a hand grenade, a sticky incendiary agent, a gun, and the like belong to the attack type virtual prop. Some virtual props can cause damage to virtual objects within a certain range when exploding or burning. The virtual prop can include a throwing type virtual prop and a shooting type virtual prop. The throwing type virtual prop can be thrown by a virtual object and act after being thrown. The shooting type virtual prop can be used by a virtual object and cause damage or marking to other virtual objects by emitting a projectile.
[0107] S130, acquiring one or more of a target distance and a target included angle corresponding to a current launch phase of the target virtual projectile.
[0108] The target distance is the distance between the target virtual projectile and the virtual object, and the target included angle is the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object.
[0109] It can be understood that the current launch phase refers to the phase in which the target virtual projectile is located at the current time, such as the current time. After the virtual prop launches the target virtual projectile, the distance between the target virtual projectile and the virtual object needs to be acquired in real time, that is, the distance between the target virtual projectile and the virtual object is acquired in each launch phase. Alternatively, the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object needs to be acquired in real time, that is, the included angle between the target virtual projectile and the virtual object is acquired in each launch phase.
[0110] For example, the real-time acquisition can be achieved by acquiring every fixed number of frames or every fixed time length. For example, the distance between the target virtual projectile and the virtual object is acquired every frame, or the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is acquired every frame. The distance between the target virtual projectile and the virtual object is acquired every two frames, or the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is acquired every two frames. The distance between the target virtual projectile and the virtual object is acquired every second, or the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is acquired every second. The distance between the target virtual projectile and the virtual object is acquired every two seconds, or the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is acquired every two seconds.
[0111] The distance between the target virtual projectile and the virtual object can be calculated by the world coordinates of the target virtual projectile and the world coordinates of the virtual object. For example, if the world coordinates of the target virtual projectile are (x1, y1, z1) and the world coordinates of the virtual object are (x2, y2, z2) in a certain shooting phase, the distance between the target virtual projectile and the virtual object can be represented as
[0112] The included angle between the movement direction of the target virtual projectile and the moving direction of the virtual object can be calculated by the space vector of the movement direction of the target virtual projectile and the space vector of the moving direction of the virtual object. For example, if the space vector of the movement direction of the target virtual projectile is The space vector of the moving direction of the virtual object is The cosine value of the included angle θ between the movement direction of the target virtual projectile and the moving direction of the virtual object is:
[0113] Wherein,
[0114] In the current launch stage, if the target distance is less than the distance threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, or if the target included angle is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object.
[0115] It can be understood that the distance threshold can be a pre-set value, and the included angle threshold can be a pre-set value; the distance threshold can also be obtained in the stop target pursuit distance curve, and the included angle threshold can also be obtained in the stop target pursuit included angle curve.
[0116] For example, the distance threshold can be a pre-set value: if the distance threshold is pre-set as 0.15 meters, after the target virtual projectile is launched, the distance between the target virtual projectile and the virtual object is obtained in real time, and when the distance between the target virtual projectile and the virtual object is less than 0.15 meters, the target pursuit is stopped, that is, the target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, and the target virtual projectile is controlled to move in a straight line along the current movement direction. Please refer to FIG. 9, which is an interface diagram of configuring the distance threshold. Track Stop Distance represents the distance threshold of stopping pursuit. Track Stop Distance Curve represents the stop target pursuit distance curve.
[0117] For example, the distance threshold can also be obtained by stopping the target pursuit distance curve. The configuration of the stopping target pursuit distance curve is that at each different time point after the target virtual projectile is launched, there is a different distance threshold. Please refer to FIG. 10, which is an interface diagram for configuring the stopping target pursuit distance curve. Please refer to FIG. 11, which is a schematic diagram of the stopping target pursuit distance curve. As shown in FIG. 11, when the target virtual projectile is within 1.6 seconds after being launched, the target virtual projectile does not stop pursuing the target, that is, the movement trajectory of the target virtual projectile is changed along with the movement trajectory of the virtual object. When the time exceeds 1.6 seconds, the distance between the target virtual projectile and the virtual object is less than 2.5 meters, at which time the movement trajectory is no longer changed along with the movement trajectory of the virtual object, and the target virtual projectile is controlled to move in a straight line along the current movement direction.
[0118] It should be noted that if the stopping target pursuit distance curve is configured, the distance threshold can be obtained based on the stopping target pursuit distance curve. If the stopping target pursuit distance curve is not configured, the pre-configured distance threshold can be obtained.
[0119] For ease of understanding, please refer to FIG. 12, which is a schematic diagram of distance checking of the target virtual projectile. The distance between the target virtual projectile and the virtual object is calculated by obtaining the world coordinates of the target virtual projectile and the virtual coordinates of the virtual object. It is determined whether the stopping target pursuit distance curve is configured. If the stopping target pursuit distance curve is configured, the current time length, that is, the time length of launching the target virtual projectile by the current virtual prop, is obtained. The distance threshold corresponding to the current time length is determined based on the stopping target pursuit distance curve. If the distance between the target virtual projectile and the virtual object is less than the distance threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object. If the distance between the target virtual projectile and the virtual object is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the movement trajectory along the movement trajectory of the virtual object. If the stopping target pursuit distance curve is not configured, it is determined whether the distance threshold is configured. If the distance threshold is configured, if the distance between the target virtual projectile and the virtual object is less than the distance threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object. If the distance between the target virtual projectile and the virtual object is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the movement trajectory along the movement trajectory of the virtual object. If the stopping target pursuit distance curve is not configured and the distance threshold is not configured, the target virtual projectile is controlled to continue changing the movement trajectory along the movement trajectory of the virtual object.
[0120] For example, the included angle threshold value can be a preset value. If the included angle threshold value is preset as 90 degrees, after the target virtual projection is launched, the included angle between the movement direction of the target virtual projection and the moving direction of the virtual object is acquired in real time, and when the included angle between the movement direction of the target virtual projection and the moving direction of the virtual object is greater than or equal to 90 degrees, the target virtual projection is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, and the target virtual projection is controlled to move in a straight line along the current movement direction. Please refer to FIG. 13, which is a schematic diagram of an interface for configuring a distance threshold value.
[0121] For example, the included angle threshold value can also be obtained through a stop target pursuit included angle curve. The configuration of the stop target pursuit included angle curve is that after the target virtual projection is launched, at each different time point, there is a different angle threshold value. Please refer to FIG. 14, which is an interface diagram for configuring a stop target pursuit included angle curve. Please refer to FIG. 15, which is a schematic diagram of a stop target pursuit distance curve. As shown in FIG. 15, when the target virtual projection is within 1.7 seconds after being launched, the target virtual projection will not stop pursuing the target, and when more than 1.7 seconds is exceeded, the included angle between the movement direction of the target virtual projection and the moving direction of the virtual object is greater than or equal to 90 degrees, the target virtual projection is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, and the target virtual projection is controlled to move in a straight line along the current movement direction.
[0122] It should be noted that if the stop target pursuit included angle curve is configured, the included angle threshold value can be obtained based on the stop target pursuit included angle curve, and if the stop target pursuit included angle curve is not configured, the preset included angle threshold value can be obtained.
[0123] For ease of understanding, please refer to FIG. 16, which is a schematic diagram of the included angle check of the target virtual projectile. The moving direction of the target virtual projectile and the moving direction of the virtual object are obtained, and the included angle between the two directions is calculated. It is judged whether the stop target pursuit included angle curve is configured. If the stop target pursuit included angle curve is configured, the current time length of the target virtual projectile launched by the current virtual prop is obtained, the included angle threshold corresponding to the current time length is determined based on the stop target pursuit included angle curve, if the included angle between the target virtual projectile and the virtual object is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object; if the included angle between the target virtual projectile and the virtual object is less than the included angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. If the stop target pursuit included angle curve is not configured, it is judged whether the included angle threshold is configured. If the included angle threshold is configured, if the included angle between the target virtual projectile and the virtual object is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object; if the included angle between the target virtual projectile and the virtual object is less than the included angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. If the stop target pursuit included angle curve is not configured, and the included angle threshold is not configured, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object.
[0124] In specific implementation, one of the distance threshold or the stop target pursuit distance curve can be selected, and one of the included angle threshold or the stop target pursuit included angle curve can be selected. Therefore, four configuration modes are generated: the distance threshold and the included angle threshold, the distance threshold and the stop target pursuit included angle curve, the stop target pursuit distance curve and the included angle threshold, and the stop target pursuit distance curve and the stop target pursuit included angle curve.
[0125] For ease of understanding, please refer to FIG. 17, which is a schematic diagram of a trajectory control method of a virtual projectile provided in an embodiment of the present application. After a target virtual projectile is launched, it is determined whether the launched virtual projectile is a target virtual projectile having the function of changing a motion trajectory according to a moving trajectory of a virtual object. If the launched virtual projectile is not a target virtual projectile, the launched virtual projectile moves according to an initial direction and a speed curve at the time of launching. If the launched virtual projectile is a target virtual projectile, the distance between the target virtual projectile and the virtual object and the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object are acquired in real time. If the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the moving trajectory of the virtual object and to move in a straight line along the current motion direction. If the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is less than the included angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory according to the moving trajectory of the virtual object. If the distance between the target virtual projectile and the virtual object is less than a distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the moving trajectory of the virtual object and to move in a straight line along the current motion direction. If the distance between the target virtual projectile and the virtual object is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the motion trajectory according to the moving trajectory of the virtual object.
[0126] As shown in FIG. 18, which is a schematic diagram of the motion trajectory of a target virtual projectile adjusted by the trajectory control method of a virtual projectile provided in an embodiment of the present application. As can be seen from the trail of the target virtual projectile in FIG. 18, when the distance between the target virtual projectile and the virtual object is far, the motion trajectory of the target virtual projectile is a curve continuously following the virtual object, and when the distance between the target virtual projectile and the virtual object is very close, the target virtual projectile satisfies the conditions of stopping following the virtual object due to the distance being too close and the included angle between the motion direction being too large, and changes to keep moving in a straight line, thereby achieving the effect of the target virtual projectile passing by the virtual object when the player quickly avoids to the other side by controlling the virtual object. In addition, when the user knows the motion rule of the target virtual projectile, the user can first control the virtual object to approach the target virtual projectile, such as first approaching the distance and then moving away from the distance, thereby achieving the condition of stopping the target virtual projectile from continuing to follow the virtual object to complete the avoidance of the target virtual projectile. In this way, the interaction is enhanced, the visual effect of the avoidance is obviously improved, and the positive feedback of the user is obviously strengthened.
[0127] The application provides a trajectory control method of a virtual projectile. After a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, the distance between the target virtual projectile and the virtual object or the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is acquired in real time. If the distance between the target virtual projectile and the virtual object is less than a distance threshold or the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object. Thus, when the target virtual projectile approaches the virtual object, the target virtual projectile can be adjusted to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the virtual object can avoid the target virtual projectile by quickly changing the moving direction, and the invalid operation becomes the valid operation, thereby reducing the number of invalid operations and the probability of system performance problems, and ensuring the stable operation of the system. In addition, through this method, users are more willing to participate in avoiding the target virtual object, the valid operation is increased, the interactivity and user experience are improved, the visual effect of avoiding the virtual object is improved, and even if the target object quickly changes the moving direction when the virtual projectile approaches, the virtual projectile will not change the motion trajectory because the instantaneous motion speed direction and the acceleration direction are perpendicular and meet the centripetal acceleration formula, thereby solving the problem of the circular motion of the target virtual projectile around the virtual object when the virtual object quickly changes the moving direction.
[0128] In one optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to FIG. 8 of the application, please refer to FIG. 19, step S140 further includes sub-step S1411 to sub-step S1415. Specifically:
[0129] S1411, acquiring the time length of launching the target virtual projectile by the virtual prop in the current launching stage.
[0130] It can be understood that the current launching stage refers to the stage in which the target virtual projectile is located at the current time, for example, the current time. After the virtual prop launches the target virtual projectile, the distance between the target virtual projectile and the virtual object needs to be acquired in real time, that is, the distance between the target virtual projectile and the virtual object is acquired in each launching stage. Alternatively, the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object needs to be acquired in real time, that is, the included angle between the target virtual projectile and the virtual object is acquired in each launching stage.
[0131] The time length of the virtual prop launching the target virtual projectile in the current launching stage can be obtained according to the current time and the time when the virtual prop launches the target virtual projectile. Specifically, the current time and the time when the virtual prop launches the target virtual projectile are obtained, and the time length of the virtual prop launching the target virtual projectile in the current launching stage is obtained according to the time difference between the current time and the time when the virtual prop launches the target virtual projectile.
[0132] In S1412, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target distance is less than the distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object.
[0133] It can be understood that when the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the distance between the target virtual projectile and the virtual object is less than the distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object, and the target virtual projectile is controlled to move in a straight line along the current motion direction.
[0134] In S1413, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0135] In S1414, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0136] In S1415, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target distance is less than the distance threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0137] It can be understood that if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the distance between the target virtual projectile and the virtual object is less than the distance threshold, the two conditions are not met at the same time, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object. There are three cases when the two conditions are not met at the same time: the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold; the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target distance is greater than or equal to the distance threshold; the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target distance is less than the distance threshold. That is, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object; if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object; if the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target distance is less than the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object.
[0138] The application provides a trajectory control method of a virtual projectile. When a target virtual projectile with a function of changing a movement trajectory along a movement trajectory of a virtual object is launched, the distance between the target virtual projectile and the virtual object and the time length of launching the target virtual projectile are acquired in real time. When the two conditions that the time length of launching the target virtual projectile in the current launching stage is greater than or equal to a time threshold and the distance between the target virtual projectile and the virtual object is less than a distance threshold are simultaneously satisfied, the target virtual projectile is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object. If the two conditions are not simultaneously satisfied, the target virtual projectile is controlled to continue changing the movement trajectory along the movement trajectory of the virtual object. That is, on the basis of the distance between the target virtual projectile and the virtual object being less than the distance threshold, the condition that the time length of launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold is added, so that when the target virtual projectile is launched for a period of time and gradually approaches the virtual object, the target virtual projectile is controlled to stop changing the movement trajectory along the movement trajectory of the virtual object, the avoidance difficulty of the virtual object is improved, that is, the virtual object not only needs to be close to the target virtual projectile, but also needs to avoid the target virtual projectile after a period of time, so that the virtual object needs to change direction multiple times to avoid the target virtual projectile. Moreover, the launching operation of the virtual object needs to be controlled in time, so as to reduce the probability of the virtual object avoiding the target virtual projectile. Thus, by adding the time condition, the uncertainty of whether the target virtual projectile follows the movement of the virtual object is increased, so that the number of operations of the game opponents in the game is increased, the interactivity and user experience are improved, the user stickiness is increased, the visual effect of the virtual object avoiding is improved. Moreover, the operation of the user is more effective, the number of invalid operations is reduced, so that the probability of system performance problems is reduced, and stable operation of the system is ensured. In one optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to FIG. 8 of the application, please refer to FIG. 20, step S1411 further includes substep S1421 to substep S1425. Specifically:
[0139] S1421, acquiring the time length of launching the target virtual projectile in the current launching stage.
[0140] It can be understood that the current launching stage refers to the stage in which the target virtual projectile is located at the current time, for example, the current time. After the virtual object launches the target virtual projectile, the distance between the target virtual projectile and the virtual object needs to be acquired in real time, that is, the distance between the target virtual projectile and the virtual object is acquired in each launching stage. Alternatively, the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object needs to be acquired in real time, that is, the included angle between the target virtual projectile and the virtual object is acquired in each launching stage.
[0141] The time length of the virtual prop launching the target virtual projectile in the current launching stage can be obtained according to the current time and the time when the virtual prop launches the target virtual projectile. Specifically, the current time and the time when the virtual prop launches the target virtual projectile are obtained, and the time length of the virtual prop launching the target virtual projectile in the current launching stage is obtained according to the time difference between the current time and the time when the virtual prop launches the target virtual projectile.
[0142] In S1422, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target angle is greater than or equal to the angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object.
[0143] It can be understood that when the time length of launching the target virtual projectile is greater than or equal to the time threshold, and the angle between the motion direction of the target virtual projectile and the movement direction of the virtual object is greater than or equal to the angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object, and the target virtual projectile is controlled to move linearly along the current motion direction.
[0144] In S1423, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold, and the target angle is less than the angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0145] In S1424, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target angle is less than the angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0146] In S1425, if the time length of the virtual prop launching the target virtual projectile in the current launching stage is less than the time threshold, and the target angle is greater than or equal to the angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the movement trajectory of the virtual object.
[0147] It can be understood that, if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold, and the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is greater than or equal to the included angle threshold, the two conditions are not met at the same time, the target virtual projectile is controlled to continue to change the movement track along the movement track of the virtual object. There are three cases that the two conditions are not met at the same time: if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold, and the target included angle is less than the included angle threshold, the target virtual projectile is controlled to continue to change the movement track along the movement track of the virtual object; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target included angle is less than the included angle threshold, the target virtual projectile is controlled to continue to change the movement track along the movement track of the virtual object; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target included angle is greater than or equal to the included angle threshold, the target virtual projectile is controlled to continue to change the movement track along the movement track of the virtual object.
[0148] The application provides a trajectory control method of a virtual projectile. When a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, a motion direction of the target virtual projectile and a time length of launching the target virtual projectile are acquired in real time. When the following two conditions are met simultaneously: the time length of launching the target virtual projectile in a current launching stage is greater than or equal to a time threshold, and an included angle between the motion direction of the target virtual projectile and a moving direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object. If the two conditions are not met simultaneously, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. That is, on the basis of the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object being greater than or equal to the included angle threshold, the condition that the time length of launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold is added, so that when the target virtual projectile is launched for a period of time and gradually approaches the virtual object, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object, the avoidance difficulty of the virtual object is improved, that is, the virtual object not only needs to be close to the target virtual projectile, but also needs to avoid the target virtual projectile after a period of time, so that the virtual object needs to change the direction multiple times to avoid the target virtual projectile. Moreover, the launching operation of the virtual object needs to be controlled in time, so as to reduce the probability of the virtual object avoiding the target virtual projectile. Thus, by adding the time condition, the uncertainty of whether the target virtual projectile follows the virtual object is increased, so that the operation times of both sides in the game are increased, the interactivity and user experience are improved, the user stickiness is increased, the visual effect of the virtual object avoiding is improved. Moreover, the operation of the user is more effective, the number of invalid operations is reduced, so that the probability of system performance problems is reduced, and stable operation of the system is ensured.
[0149] In one optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to FIG. 8 of the application, referring to FIG. 21, steps S121 to S122 are further included before step S14220. Specifically:
[0150] S121, acquiring a time length of launching the target virtual projectile in a current launching stage of the virtual object.
[0151] It can be understood that the current emission stage refers to the stage in which the target virtual projectile is located at the current time, such as the current time. After the virtual prop emits the target virtual projectile, the distance between the target virtual projectile and the virtual object needs to be acquired in real time, that is, the distance between the target virtual projectile and the virtual object is acquired in each emission stage. Alternatively, the angle between the movement direction of the target virtual projectile and the moving direction of the virtual object needs to be acquired in real time, that is, the angle between the target virtual projectile and the virtual object is acquired in each emission stage.
[0152] The duration of the current emission stage in which the virtual prop emits the target virtual projectile can be obtained according to the current time and the time at which the virtual prop emits the target virtual projectile. Specifically, the current time and the time at which the virtual prop emits the target virtual projectile are acquired, and the duration of the current emission stage in which the virtual prop emits the target virtual projectile is obtained according to the time difference between the current time and the time at which the virtual prop emits the target virtual projectile.
[0153] In S122, if the duration of the current emission stage in which the virtual prop emits the target virtual projectile is greater than or equal to the duration threshold, one or more of the target distance and the target angle corresponding to the current emission stage of the target virtual projectile are acquired.
[0154] It can be understood that if the duration of the virtual prop emitting the target virtual projectile is greater than or equal to the duration threshold, step S130 is executed. If the duration of the virtual prop emitting the target virtual projectile is less than the duration threshold, the duration of emitting the target virtual projectile is continuously acquired in real time until step S130 is executed after the duration of emitting the target virtual projectile is greater than or equal to the duration threshold.
[0155] The present application provides a trajectory control method of a virtual projectile. When a target virtual projectile having a function of changing a movement trajectory along a moving trajectory of a virtual object is emitted, the duration of emitting the target virtual projectile is acquired in real time. When the duration of emitting the target virtual projectile is greater than or equal to a duration threshold, the distance between the target virtual projectile and the virtual object or the angle between the movement direction of the target virtual projectile and the moving direction of the virtual object is acquired in real time, so as to reduce the number of data acquisition times, thereby improving the response speed, reducing the network bandwidth consumption, reducing the server load, improving the query performance, and the like. If the distance between the target virtual projectile and the virtual object is less than a distance threshold, or the angle between the movement direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an angle threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object. The user can avoid the target virtual projectile by quickly changing the direction of movement, so that the target virtual projectile can be adjusted to stop changing the movement trajectory along the moving trajectory of the virtual object, thereby improving the interactivity and user experience.
[0156] In an optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment of the application corresponding to FIG. 21, referring to FIG. 22, step S121 further includes sub-step S1211 to sub-step S1212. Specifically:
[0157] S1211, obtaining the current time and the time when the virtual prop emits the target virtual projectile.
[0158] The current time refers to the time corresponding to the current emission stage, and the time when the virtual prop emits the target virtual projectile refers to the time when the target virtual projectile is emitted.
[0159] S1212, obtaining the time length of the target virtual projectile emitted by the virtual prop in the current emission stage according to the current time and the time when the virtual prop emits the target virtual projectile.
[0160] It can be understood that the time length of the target virtual projectile emitted by the virtual prop in the current emission stage is obtained according to the calculation time difference between the current time and the time when the virtual prop emits the target virtual projectile.
[0161] The application provides a trajectory control method of a virtual projectile, which can accurately obtain the time length of the target virtual projectile emitted by the virtual prop in the current emission stage by calculating the difference between the current time and the time when the virtual prop emits the target virtual projectile, thereby providing a reliable basis for subsequent decision-making.
[0162] In an optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment of the application corresponding to FIG. 21, referring to FIG. 23, step S122 includes sub-step S1221 to step S1222. Specifically:
[0163] S1221, if the time length of the target virtual projectile emitted by the virtual prop is greater than or equal to a first time length threshold and less than or equal to a second time length threshold, obtaining a target distance corresponding to the current emission stage of the target virtual projectile.
[0164] It can be understood that as the time length of the target virtual projectile emitted by the virtual prop increases, when the time length of the target virtual projectile emitted by the virtual prop is greater than or equal to the first time length threshold and less than or equal to the second time length threshold, the target distance corresponding to the current emission stage of the target virtual projectile is obtained.
[0165] S1222, if the time length of the target virtual projectile emitted by the virtual prop is greater than or equal to the second time length threshold, obtaining a target included angle corresponding to the current emission stage of the target virtual projectile.
[0166] It can be understood that, as the time period during which the virtual prop emits the target virtual projectile increases, when the time period during which the virtual prop emits the target virtual projectile is greater than or equal to a second time period threshold, the target angle corresponding to the current emission stage of the target virtual projectile is obtained.
[0167] The first time period threshold is less than the second time period threshold.
[0168] For example, the first time period threshold is 1.6 seconds and the second time period threshold is 2 seconds. When the target virtual projectile is within the first 1.6 seconds after being emitted, the target virtual projectile does not stop following the target. When the time period exceeds 1.6 seconds and is less than 2 seconds, the distance between the target virtual projectile and the virtual object is obtained in real time. When the distance between the target virtual projectile and the virtual object is less than a distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the movement trajectory of the virtual object and to perform straight-line motion in the current motion direction. If the distance between the target virtual projectile and the virtual object is greater than or equal to the distance threshold during the time period of 1.6 seconds and less than 2 seconds, the target virtual projectile is controlled to continue to change the motion trajectory according to the movement trajectory of the virtual object. When the time period during which the target virtual projectile is emitted is greater than or equal to 2 seconds, the angle between the motion direction of the target virtual projectile and the movement direction of the virtual object is obtained in real time. When the angle between the motion direction of the target virtual projectile and the movement direction of the virtual object is greater than or equal to an angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory according to the movement trajectory of the virtual object and to perform straight-line motion in the current motion direction.
[0169] For ease of understanding, please refer to FIG. 24, which is a schematic diagram of the trajectory control method of the virtual projectile. After the virtual projectile is launched, it is determined whether the launched virtual projectile is a target virtual projectile having the function of changing the motion trajectory along with the moving trajectory of the virtual object. If the launched virtual projectile is not the target virtual projectile, the launched virtual projectile moves according to the initial direction and speed curve at the time of launch. If the launched virtual projectile is the target virtual projectile, the time duration for which the virtual prop launches the target virtual projectile is acquired in real time. If the time duration for which the virtual prop launches the target virtual projectile is less than a first time duration threshold, the time duration for which the virtual prop launches the target virtual projectile is continuously acquired. If the time duration for which the virtual prop launches the target virtual projectile is greater than or equal to the first time duration threshold and less than a second time duration threshold, the distance between the target virtual projectile and the virtual object is acquired in real time. When the distance between the target virtual projectile and the virtual object is less than a distance threshold, the target virtual projectile is controlled to stop changing the motion trajectory along with the moving trajectory of the virtual object and to move in a straight line along the current motion direction. If the distance between the target virtual projectile and the virtual object is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue changing the motion trajectory along with the moving trajectory of the virtual object. If the time duration for which the virtual prop launches the target virtual projectile is greater than or equal to the second time duration threshold, the angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is acquired in real time. If the angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along with the moving trajectory of the virtual object and to move in a straight line along the current motion direction. If the angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is less than the angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along with the moving trajectory of the virtual object.
[0170] The application provides a trajectory control method of a virtual projectile. When a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, a time length of launching the target virtual projectile by the virtual object is acquired in real time. According to the relationship between the time length and a first time length threshold and a second time length threshold, a target distance or a target included angle is selected to determine whether to control the target virtual projectile to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the target distance or the target included angle does not need to be acquired at all times, the number of times of acquiring data is reduced, the response speed is improved, the network bandwidth consumption is reduced, the server load is reduced, the query performance is improved and the like. In addition, the target distance is used for judgment in the early stage and the target included angle is used for judgment in the later stage, which is more in line with the physical principle after the target virtual projectile is launched, the target virtual projectile can freely adjust the angle and the distance of stopping following the virtual object, the probability of avoiding the target virtual projectile is reduced, the interactivity and the user experience are improved, the user stickiness is increased, the visual effect of avoiding the virtual object is improved. Moreover, the operation of the user is more effective, the number of times of invalid operations is reduced, the probability of system performance problems is reduced, and the system is stably operated.
[0171] In one optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to FIG. 8 of the application, please refer to FIG. 25, step S130 comprises sub-steps S1311 to S1312. Specifically:
[0172] S1311, acquire the position information corresponding to the target virtual projectile in the current launching stage and the position information of the virtual object in the current launching stage.
[0173] S1312, obtain the target distance according to the position information corresponding to the target virtual projectile and the position information of the virtual object.
[0174] It can be understood that the distance between the target virtual projectile and the virtual object can be calculated by the world coordinates of the target virtual projectile and the world coordinates of the virtual object. For example, if the world coordinates of the target virtual projectile are (x1, y1, z1) and the world coordinates of the virtual object are (x2, y2, z2) in a certain launching stage, the distance between the target virtual projectile and the virtual object can be represented as
[0175] The application provides a trajectory control method of a virtual projectile. The distance between the target virtual projectile and the virtual object can be calculated by the world coordinates of the target virtual projectile and the world coordinates of the virtual object, so that the target distance between the target virtual projectile and the virtual object is accurately acquired, and a basis is provided for subsequent decision-making.
[0176] In an optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to Fig. 8 of the present application, referring to Fig. 26, step S130 comprises sub-steps S1321-S1322. Specifically:
[0177] S1321, obtain the target virtual projectile movement direction in the current launch phase and the virtual object movement direction in the current launch phase.
[0178] S1322, obtain the target included angle according to the target virtual projectile movement direction and the virtual object movement direction.
[0179] It can be understood that the included angle between the target virtual projectile movement direction and the virtual object movement direction can be obtained by the spatial vector of the target virtual projectile movement direction and the spatial vector of the virtual object movement direction. For example, if in a certain launch phase, the spatial vector of the target virtual projectile movement direction is the spatial vector of the virtual object movement direction is the cosine value of the included angle θ between the target virtual projectile movement direction and the virtual object movement direction is:
[0180] wherein,
[0181] The present application provides a trajectory control method of a virtual projectile, the included angle between the target virtual projectile movement direction and the virtual object movement direction can be obtained by the spatial vector of the target virtual projectile movement direction and the spatial vector of the virtual object movement direction, so as to accurately obtain the included angle between the target virtual projectile movement direction and the virtual object movement direction, and provide a basis for subsequent decision-making.
[0182] In an optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to Fig. 8 of the present application, referring to Fig. 27, step S130 further comprises step S150. Specifically:
[0183] S150, in the current launch phase, if the target distance is greater than or equal to the distance threshold, control the target virtual projectile to continue to change the movement trajectory along the virtual object movement trajectory, or if the target included angle is less than the included angle threshold, control the target virtual projectile to continue to change the movement trajectory along the virtual object movement trajectory.
[0184] The application provides a trajectory control method of a virtual projectile. When a condition for controlling a target virtual projectile to stop changing a motion trajectory along a moving trajectory of a virtual object is not met, i.e., when a target distance is greater than or equal to a distance threshold or a target included angle is less than an included angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. When the condition for controlling the target virtual projectile to stop changing the motion trajectory along the moving trajectory of the virtual object is met, i.e., when the target distance is less than the distance threshold or the target included angle is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the target virtual projectile can stably run.
[0185] In an optional embodiment of the trajectory control method of the virtual projectile provided in the embodiment corresponding to FIG. 8 of the application, step S140 comprises: controlling the target virtual projectile to stop changing the motion trajectory along the moving trajectory of the virtual object, and controlling the target virtual projectile to perform straight-line motion along a current motion direction.
[0186] Therefore, when the target virtual projectile stops changing the motion trajectory along the moving trajectory of the virtual object, the target virtual projectile performs straight-line motion or parabolic motion along the current motion direction and motion speed, so that the target virtual projectile can continue to be shot and the motion trajectory of the target virtual projectile can be met.
[0187] The application provides a trajectory control method of a virtual projectile. When a condition for controlling a target virtual projectile to stop changing a motion trajectory along a moving trajectory of a virtual object is not met, i.e., when a target distance is greater than or equal to a distance threshold or a target included angle is less than an included angle threshold, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. When the condition for controlling the target virtual projectile to stop changing the motion trajectory along the moving trajectory of the virtual object is met, i.e., when the target distance is less than the distance threshold or the target included angle is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the target virtual projectile can stably run.
[0188] The trajectory control device of the virtual projectile in the application will be described in detail below. Please refer to FIG. 28. FIG. 28 is a schematic diagram of an embodiment of the trajectory control device 10 of the virtual projectile in the application. The trajectory control device 10 of the virtual projectile comprises a launching module 120, an acquisition module 130 and a control module 140. Specifically:
[0189] The launching module 120 is configured to control the virtual prop to launch a target virtual projectile in response to a launching operation based on the virtual prop, wherein the target virtual projectile is an object launched to a virtual object displayed in a virtual scene, and the target virtual projectile changes a motion trajectory along a moving trajectory of the virtual object;
[0190] The acquisition module 130 is configured to acquire one or more of a target distance and a target included angle corresponding to a current emission phase of the target virtual projectile, where the target distance is a distance between the target virtual projectile and the virtual object, and the target included angle is an included angle between a movement direction of the target virtual projectile and a movement direction of the virtual object.
[0191] The control module 140 is configured to, in the current emission phase, control the target virtual projectile to stop changing a movement trajectory according to a movement trajectory of the virtual object if the target distance is less than a distance threshold, or control the target virtual projectile to stop changing the movement trajectory according to the movement trajectory of the virtual object if the target included angle is greater than or equal to an included angle threshold.
[0192] The present application provides a trajectory control device of a virtual projectile. When a target virtual projectile with a function of changing a movement trajectory according to a movement trajectory of a virtual object is launched, a distance between the target virtual projectile and the virtual object or an included angle between a movement direction of the target virtual projectile and a movement direction of the virtual object is acquired in real time. If the distance between the target virtual projectile and the virtual object is less than a distance threshold, or the included angle between the movement direction of the target virtual projectile and the movement direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the movement trajectory according to the movement trajectory of the virtual object. Thus, when the target virtual projectile approaches the virtual object, the target virtual projectile can be adjusted to stop changing the movement trajectory according to the movement trajectory of the virtual object, so that the virtual object can avoid the target virtual projectile by quickly changing the movement direction, invalid operations become valid operations, the number of invalid operations is reduced, the probability of system performance problems is reduced, and stable system operation is ensured.
[0193] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the present application, referring to FIG. 28, the control module 140 is further configured to:
[0194] acquire a time length in which the virtual prop launches the target virtual projectile in the current emission phase;
[0195] If the time length in which the virtual prop launches the target virtual projectile in the current emission phase is greater than or equal to a time threshold, and the target distance is less than the distance threshold, the control module 140 controls the target virtual projectile to stop changing the movement trajectory according to the movement trajectory of the virtual object.
[0196] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the present application, referring to FIG. 28, the control module 140 is further configured to:
[0197] If the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object;
[0198] If the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object;
[0199] If the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target distance is less than the distance threshold, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object.
[0200] The application provides a trajectory control device for a virtual projectile. When a target virtual projectile with a function of changing a motion trajectory along a movement trajectory of a virtual object is emitted, the distance between the target virtual projectile and the virtual object and the time length of emitting the target virtual projectile are acquired in real time. When the two conditions that the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold, and the distance between the target virtual projectile and the virtual object is less than the distance threshold are met at the same time, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object. If the two conditions are not met at the same time, the target virtual projectile is controlled to continue to change the motion trajectory along the movement trajectory of the virtual object. That is, on the basis that the distance between the target virtual projectile and the virtual object is less than the distance threshold, the condition that the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold is added, so that when the target virtual projectile is emitted for a period of time and gradually approaches the virtual object, the target virtual projectile is controlled to stop changing the motion trajectory along the movement trajectory of the virtual object, the difficulty of avoiding the virtual object is improved, that is, the virtual object not only needs to be close to the target virtual projectile, but also needs to avoid the target virtual projectile after a period of time, so that the virtual object needs to change the direction multiple times to avoid the target virtual projectile. Moreover, the emission operation of the virtual prop needs to be controlled in time, so as to reduce the probability of the virtual object avoiding the target virtual projectile. Thus, by adding the time condition, the uncertainty of whether the target virtual projectile follows the movement of the virtual object is increased, so that the number of operations of the game opponents in the game is increased, the interactivity and user experience are improved, the user stickiness is increased, the visual effect of avoiding the virtual object is improved. Moreover, the operation of the user is more effective, the number of invalid operations is reduced, so that the probability of system performance problems is reduced, and stable operation of the system is ensured.
[0201] In one optional embodiment of the trajectory control apparatus of the virtual projectile provided by the corresponding embodiment of Figure 28 of the present application, referring to Figure 28, the control module 140 is further configured to:
[0202] acquire a time length of the virtual prop launching the target virtual projectile in the current launching phase;
[0203] if the time length of the virtual prop launching the target virtual projectile in the current launching phase is greater than or equal to the time threshold, and the target included angle is greater than or equal to the included angle threshold, control the target virtual projectile to stop changing the motion trajectory along with the movement trajectory of the virtual object.
[0204] In one optional embodiment of the trajectory control apparatus of the virtual projectile provided by the corresponding embodiment of Figure 28 of the present application, referring to Figure 28, the control module 140 is further configured to:
[0205] if the time length of the virtual prop launching the target virtual projectile in the current launching phase is greater than or equal to the time threshold, and the target included angle is less than the included angle threshold, control the target virtual projectile to continue changing the motion trajectory along with the movement trajectory of the virtual object;
[0206] if the time length of the virtual prop launching the target virtual projectile in the current launching phase is less than the time threshold, and the target included angle is less than the included angle threshold, control the target virtual projectile to continue changing the motion trajectory along with the movement trajectory of the virtual object;
[0207] if the time length of the virtual prop launching the target virtual projectile in the current launching phase is less than the time threshold, and the target included angle is greater than or equal to the included angle threshold, control the target virtual projectile to continue changing the motion trajectory along with the movement trajectory of the virtual object.
[0208] The application provides a trajectory control device of a virtual projectile. When a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, the motion direction of the target virtual projectile and the time length of launching the target virtual projectile are acquired in real time. When the time length of launching the target virtual projectile in the current launching stage is greater than or equal to a time threshold value and the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an included angle threshold value, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object. If the two conditions are not met at the same time, the target virtual projectile is controlled to continue changing the motion trajectory along the moving trajectory of the virtual object. That is, on the basis that the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to the included angle threshold value, the condition that the time length of launching the target virtual projectile in the current launching stage is greater than or equal to the time threshold value is added, so that when the target virtual projectile is launched for a period of time and gradually approaches the virtual object, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object, the avoidance difficulty of the virtual object is improved, that is, the virtual object not only needs to be close to the target virtual projectile, but also needs to avoid the target virtual projectile after a period of time, so that the virtual object needs to change the direction multiple times to avoid the target virtual projectile. Moreover, the launching operation of the virtual object needs to be controlled in time, so as to reduce the probability of the virtual object avoiding the target virtual projectile. Thus, by adding the time condition, the uncertainty of whether the target virtual projectile follows the virtual object is increased, so that the operation times of the game opponents in the game are increased, the interactivity and user experience are improved, the user stickiness is increased, the visual effect of the virtual object avoiding is improved. Moreover, the operation of the user is more effective, the number of invalid operations is reduced, so that the probability of system performance problems is reduced, and stable operation of the system is ensured.
[0209] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the application, referring to FIG. 28, the acquisition module 130 is further used for:
[0210] acquiring the time length of launching the target virtual projectile by the virtual object in the current launching stage;
[0211] If the time length of launching the target virtual projectile by the virtual object in the current launching stage is greater than or equal to the time threshold value, the step of acquiring one or more of the target distance and the target included angle corresponding to the current launching stage of the target virtual projectile is performed.
[0212] The application provides a trajectory control device of a virtual projectile, when a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, a time length of launching the target virtual projectile is acquired in real time, when the time length of launching the target virtual projectile is greater than or equal to a time length threshold, a distance between the target virtual projectile and the virtual object or an included angle between a motion direction of the target virtual projectile and a moving direction of the virtual object is acquired in real time, so that the number of acquired data is reduced, the response speed is improved, the network bandwidth consumption is reduced, the server load is reduced, and the query performance is improved. If the distance between the target virtual projectile and the virtual object is less than a distance threshold or the included angle between the motion direction of the target virtual projectile and the moving direction of the virtual object is greater than or equal to an included angle threshold, the target virtual projectile is controlled to stop changing the motion trajectory along the moving trajectory of the virtual object, the user can avoid the target virtual projectile by quickly changing the moving direction, the target virtual projectile can be adjusted to stop changing the motion trajectory along the moving trajectory of the virtual object, and the interactivity and user experience are improved.
[0213] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to Fig. 28 of the application, referring to Fig. 28, the acquisition module 130 is further used for:
[0214] acquiring a current time and a time when the virtual prop launches the target virtual projectile;
[0215] obtaining a time length of launching the target virtual projectile in the current launching stage according to the current time and the time when the virtual prop launches the target virtual projectile.
[0216] The application provides a trajectory control device of a virtual projectile, by calculating a difference between a current time and a time when a virtual prop launches a target virtual projectile, a time length of launching the target virtual projectile in a current launching stage can be accurately acquired, and a reliable basis is provided for subsequent decision-making.
[0217] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to Fig. 28 of the application, referring to Fig. 28, the acquisition module 130 is further used for:
[0218] if the time length of launching the target virtual projectile is greater than or equal to a first time length threshold and less than or equal to a second time length threshold, a target distance corresponding to the current launching stage of the target virtual projectile is acquired;
[0219] if the time length of launching the target virtual projectile is greater than or equal to the second time length threshold, a target included angle corresponding to the current launching stage of the target virtual projectile is acquired.
[0220] The application provides a trajectory control device of a virtual projectile. When a target virtual projectile with a function of changing a motion trajectory along a moving trajectory of a virtual object is launched, a time length for which the virtual projectile is launched to launch the target virtual projectile is acquired in real time. According to a relationship between the time length and a first time length threshold and a second time length threshold, a target distance or a target included angle is selected to determine whether to control the target virtual projectile to stop changing the motion trajectory along the moving trajectory of the virtual object, so that the target distance or the target included angle does not need to be acquired at all times, the number of times of acquiring data is reduced, response speed is improved, network bandwidth consumption is reduced, server load is reduced, query performance is improved and the like. In addition, the target distance is used for determination in an early stage and the target included angle is used for determination in a later stage, which is more in line with a physical principle after the target virtual projectile is launched, the target virtual projectile can freely adjust an angle and a distance for stopping following the virtual object, a probability of avoiding the target virtual projectile is reduced, interactivity and user experience are improved, user stickiness is increased, and a visual effect of avoiding the virtual object is improved. Moreover, user operation is more effective, the number of times of invalid operation is reduced, a probability of system performance problems is reduced, and system stable operation is ensured.
[0221] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the application, referring to FIG. 28, the acquisition module 130 is further used for:
[0222] acquiring position information corresponding to the target virtual projectile in a current launch stage and position information of the virtual object in the current launch stage;
[0223] obtaining the target distance according to the position information corresponding to the target virtual projectile and the position information of the virtual object.
[0224] The application provides a trajectory control device of a virtual projectile. The distance between the target virtual projectile and the virtual object can be calculated by using the world coordinates of the target virtual projectile and the world coordinates of the virtual object, so that the target distance between the target virtual projectile and the virtual object is accurately acquired, and a basis is provided for subsequent decision-making.
[0225] In one optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the application, referring to FIG. 28, the acquisition module 130 is further used for:
[0226] acquiring a motion direction of the target virtual projectile in a current launch stage and a moving direction of the virtual object in the current launch stage;
[0227] obtaining the target included angle according to the motion direction of the target virtual projectile and the moving direction of the virtual object.
[0228] The application provides a trajectory control device of a virtual projectile. An included angle between a movement direction of a target virtual projectile and a moving direction of a virtual object can be calculated by a space vector of the movement direction of the target virtual projectile and a space vector of the moving direction of the virtual object, so that the included angle between the movement direction of the target virtual projectile and the moving direction of the virtual object is accurately obtained, and a basis is provided for subsequent decision-making.
[0229] In an optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the application, referring to FIG. 28, the control module 140 is further used for:
[0230] In the current shooting stage, if the target distance is greater than or equal to the distance threshold, the target virtual projectile is controlled to continue to change the movement trajectory along the moving trajectory of the virtual object, or if the target included angle is less than the included angle threshold, the target virtual projectile is controlled to continue to change the movement trajectory along the moving trajectory of the virtual object.
[0231] The application provides a trajectory control device of a virtual projectile. When the condition of controlling the target virtual projectile to stop changing the movement trajectory along the moving trajectory of the virtual object is not met, that is, when the target distance is greater than or equal to the distance threshold or the target included angle is less than the included angle threshold, the target virtual projectile is controlled to continue to change the movement trajectory along the moving trajectory of the virtual object. When the condition of controlling the target virtual projectile to stop changing the movement trajectory along the moving trajectory of the virtual object is met, that is, when the target distance is less than the distance threshold or the target included angle is greater than or equal to the included angle threshold, the target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, so that the target virtual projectile can stably operate.
[0232] In an optional embodiment of the trajectory control device of the virtual projectile provided in the embodiment corresponding to FIG. 28 of the application, referring to FIG. 28, the control module 140 is further used for:
[0233] The target virtual projectile is controlled to stop changing the movement trajectory along the moving trajectory of the virtual object, and the target virtual projectile is controlled to move linearly along the current movement direction.
[0234] The application provides a trajectory control device of a virtual projectile. When the target virtual projectile stops changing the movement trajectory along the moving trajectory of the virtual object, the target virtual projectile moves linearly or parabolicly along the current movement direction and movement speed, so that the movement trajectory of the target virtual projectile is met while the target virtual projectile continues to be shot.
[0235] FIG. 29 is a schematic diagram of a server structure according to an embodiment of the present application. The server 300 can have a great difference in configuration or performance, and can include one or more central processing units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing applications 342 or data 344. The memory 332 and the storage media 330 can be temporary or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), each of which can include a series of instructions operated in the server. Further, the CPU 322 can be configured to communicate with the storage media 330 and execute the series of instructions operated in the storage media 330 on the server 300.
[0236] The server 300 can further include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
[0237] The steps performed by the server in the above embodiments can be based on the server structure shown in FIG. 29.
[0238] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices and units can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0239] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the above-described device embodiments are only schematic, and the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0240] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed to multiple network units. Part or all of the units may be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0241] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0242] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0243] The above, the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A trajectory control method of a virtual projectile, the method being performed by a computer device, the method comprising: in response to a launch operation based on a virtual prop, controlling the virtual prop to launch a target virtual projectile, wherein the target virtual projectile is an object launched towards a virtual object displayed in a virtual scene, and the target virtual projectile changes a motion trajectory in accordance with a movement trajectory of the virtual object; obtaining one or more of a target distance and a target included angle corresponding to a current launch phase of the target virtual projectile, wherein the target distance is a distance between the target virtual projectile and the virtual object, and the target included angle is an included angle between a motion direction of the target virtual projectile and a movement direction of the virtual object; and in the current launch phase, if the target distance is less than a distance threshold, controlling the target virtual projectile to stop changing the motion trajectory in accordance with the movement trajectory of the virtual object, or if the target included angle is greater than or equal to an included angle threshold, controlling the target virtual projectile to stop changing the motion trajectory in accordance with the movement trajectory of the virtual object. 2.The trajectory control method of a virtual projectile according to claim 1, wherein the controlling the target virtual projectile to stop changing the motion trajectory in accordance with the movement trajectory of the virtual object if the target distance is less than the distance threshold in the current launch phase comprises: obtaining a time length of the virtual prop launching the target virtual projectile in the current launch phase; and if the time length of the virtual prop launching the target virtual projectile in the current launch phase is greater than or equal to a time threshold, and the target distance is less than the distance threshold, controlling the target virtual projectile to stop changing the motion trajectory in accordance with the movement trajectory of the virtual object. 3.The trajectory control method of a virtual projectile according to claim 2, wherein the obtaining the time length of the virtual prop launching the target virtual projectile in the current launch phase further comprises: if the time length of the virtual prop launching the target virtual projectile in the current launch phase is greater than or equal to the time threshold, and the target distance is greater than or equal to the distance threshold, controlling the target virtual projectile to continue changing the motion trajectory in accordance with the movement trajectory of the virtual object; if the time length of the virtual prop launching the target virtual projectile in the current launch phase is less than the time threshold, and the target distance is greater than or equal to the distance threshold, controlling the target virtual projectile to continue changing the motion trajectory in accordance with the movement trajectory of the virtual object; and if the time length of the virtual prop launching the target virtual projectile in the current launch phase is less than the time threshold, and the target distance is less than the distance threshold, controlling the target virtual projectile to continue changing the motion trajectory in accordance with the movement trajectory of the virtual object. 4.The trajectory control method of a virtual projectile according to any one of claims 1-3, wherein the controlling the target virtual projectile to stop changing the motion trajectory in accordance with the movement trajectory of the virtual object if the target included angle is greater than or equal to the included angle threshold in the current launch phase comprises: acquiring a time length of the virtual prop emitting the target virtual projectile in the current emission stage; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to a time threshold, and the target angle is greater than or equal to the angle threshold, controlling the target virtual projectile to stop changing a motion trajectory along with a moving trajectory of the virtual object.
5. The virtual projectile trajectory control method of claim 4, after the step of acquiring the time length of the virtual prop emitting the target virtual projectile in the current emission stage, further comprising: if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to the time threshold, and the target angle is less than the angle threshold, controlling the target virtual projectile to continue changing the motion trajectory along with the moving trajectory of the virtual object; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target angle is less than the angle threshold, controlling the target virtual projectile to continue changing the motion trajectory along with the moving trajectory of the virtual object; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is less than the time threshold, and the target angle is greater than or equal to the angle threshold, controlling the target virtual projectile to continue changing the motion trajectory along with the moving trajectory of the virtual object.
6. The virtual projectile trajectory control method of any one of claims 1-5, before the step of acquiring one or more of the target distance and the target angle corresponding to the current emission stage of the target virtual projectile, further comprising: acquiring a time length of the virtual prop emitting the target virtual projectile in the current emission stage; if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to a time threshold, performing the step of acquiring one or more of the target distance and the target angle corresponding to the current emission stage of the target virtual projectile.
7. The virtual projectile trajectory control method of any one of claims 2-6, the step of acquiring the time length of the virtual prop emitting the target virtual projectile in the current emission stage, comprising: acquiring a current time and a time of the virtual prop emitting the target virtual projectile; according to the current time and the time of the virtual prop emitting the target virtual projectile, obtaining the time length of the virtual prop emitting the target virtual projectile in the current emission stage.
8. The virtual projectile trajectory control method of claim 6, the step of if the time length of the virtual prop emitting the target virtual projectile in the current emission stage is greater than or equal to a time threshold, performing the step of acquiring one or more of the target distance and the target angle corresponding to the current emission stage of the target virtual projectile, comprising: if the time length of the virtual prop emitting the target virtual projectile is greater than or equal to a first time length threshold and less than or equal to a second time length threshold, obtaining a target distance corresponding to a current emission stage of the target virtual projectile; if the time length of the virtual prop emitting the target virtual projectile is greater than or equal to the second time length threshold, obtaining a target included angle corresponding to the current emission stage of the target virtual projectile.
9. The trajectory control method of the virtual projectile according to any one of claims 1-8, wherein the obtaining of one or more of the target distance and the target included angle corresponding to the current emission stage of the target virtual projectile comprises: obtaining position information of the target virtual projectile corresponding to the current emission stage, and position information of the virtual object; obtaining the target distance according to the position information of the target virtual projectile and the position information of the virtual object.
10. The trajectory control method of the virtual projectile according to any one of claims 1-9, wherein the obtaining of one or more of the target distance and the target included angle corresponding to the current emission stage of the target virtual projectile comprises: obtaining a movement direction of the target virtual projectile corresponding to the current emission stage, and a moving direction of the virtual object; obtaining the target included angle according to the movement direction of the target virtual projectile and the moving direction of the virtual object.
11. The trajectory control method of the virtual projectile according to any one of claims 1-10, further comprising, after the obtaining of one or more of the target distance and the target included angle corresponding to the current emission stage of the target virtual projectile: in the current emission stage, if the target distance is greater than or equal to the distance threshold, controlling the target virtual projectile to continue changing the movement trajectory according to the moving trajectory of the virtual object, or if the target included angle is less than the included angle threshold, controlling the target virtual projectile to continue changing the movement trajectory according to the moving trajectory of the virtual object.
12. The trajectory control method of the virtual projectile according to any one of claims 1-11, wherein the controlling of the target virtual projectile to stop changing the movement trajectory according to the moving trajectory of the virtual object comprises: controlling the target virtual projectile to stop changing the movement trajectory according to the moving trajectory of the virtual object, and controlling the target virtual projectile to move in a straight line along the current movement direction.
13. A trajectory control device of a virtual projectile, comprising: an emission module configured to control a virtual prop to emit a target virtual projectile in response to an emission operation based on the virtual prop, wherein the target virtual projectile is an object emitted to a virtual object displayed in a virtual scene, and the target virtual projectile changes a movement trajectory according to a moving trajectory of the virtual object. an acquisition module, configured to acquire one or more of a target distance and a target included angle corresponding to a current emission phase of the target virtual projectile, wherein the target distance is a distance between the target virtual projectile and the virtual object, and the target included angle is an included angle between a movement direction of the target virtual projectile and a moving direction of the virtual object; a control module, configured to control the target virtual projectile to stop changing a movement track according to a moving track of the virtual object in the current emission phase if the target distance is less than a distance threshold, or to control the target virtual projectile to stop changing the movement track according to the moving track of the virtual object if the target included angle is greater than or equal to an included angle threshold.
14. A computer device comprising: a memory, a processor, and a bus system; the memory is configured to store a program; the processor is configured to execute the program in the memory, including executing the track control method of the virtual projectile according to any one of claims 1 to 12; the bus system is configured to connect the memory and the processor, so that the memory and the processor communicate.
15. A computer readable storage medium, including instructions which, when executed on a computer, cause the computer to execute the track control method of the virtual projectile according to any one of claims 1 to 12.
16. A computer program product, including a computer program which, when executed by a processor, executes the track control method of the virtual projectile according to any one of claims 1 to 12.
Citation Information
Patent Citations
Interactive prop control method and device, terminal and storage medium
CN110917619A
Virtual prop control method and device, computer equipment and storage medium
CN113509729A
Virtual item control method and device, computer equipment and storage medium
CN113713382A
Game system, control method, and program
JP2017094062A
Image generation device and information storage medium
US20020190981A1