Crosshair control method, device, electronic device and storage medium in virtual scene
By responding to the player's aiming operation in shooting games, calculating the adsorption correction coefficient to adjust the speed and direction of the sight, it solves the problem that players find it difficult to quickly and accurately aim at the moving target, and improves the aiming accuracy and interaction efficiency of the sight in the game.
Patent Information
- Application Number
- CN202210021991.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-01-10
AI Technical Summary
In shooting games, it is difficult for players to quickly and accurately use the sight of the moving target, resulting in low human-computer interaction efficiency.
By displaying the target virtual object in a virtual scene, obtaining the displacement direction and speed of the star in response to the player's aiming operation, determining the adsorption detection range of the target virtual object, calculating the adsorption correction coefficient, adjusting the movement speed and direction of the star in order to make the star in a slight manner, so that the star in a slight manner can be used to determine the adsorption detection range, calculating the adsorption correction coefficient, adjusting the movement speed and direction of the star in a slight manner, so that the star in a slight manner can be used to determine the adsorption detection range, calculating the adsorption correction coefficient, adjusting the movement speed and direction of the star in a slight manner. Target adsorption velocity moves.
The aiming accuracy and human-computer interaction efficiency of the sight are improved, and the sight can focus on the aiming target more quickly and accurately.
Smart Images

Figure CN114344880B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for controlling a crosshair in a virtual scene. Background Art
[0002] With the development of computer technology and the diversification of terminal functions, more and more types of games can be played on terminals. Among them, shooting games are a relatively popular game. Shooting games usually provide a virtual scene, and players can control virtual objects in the virtual scene to use shooting props to fight.
[0003] When using shooting props for aiming, the crosshairs can be used to indicate the position where the corresponding projectile is expected to point. However, when the player operates manually, it is usually difficult to quickly and accurately focus the crosshairs on the aiming target, and the aiming target is usually in motion, so the player needs to repeatedly debug the crosshairs, that is, the player's human-computer interaction efficiency is low. Summary of the invention
[0004] The embodiment of the present application provides a method, device, electronic device and storage medium for controlling a crosshair in a virtual scene, which can improve the aiming accuracy of virtual props and improve the efficiency of human-computer interaction. The technical solution is as follows:
[0005] On the one hand, a method for controlling a crosshair in a virtual scene is provided, the method comprising:
[0006] Displaying a target virtual object in a virtual scene;
[0007] In response to an aiming operation on a virtual prop, obtaining a displacement direction and a displacement speed of a crosshair of the aiming operation;
[0008] In response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction, acquiring an adsorption correction coefficient matching the displacement direction;
[0009] The crosshair is displayed to move at a target adsorption speed, where the target adsorption speed is obtained by adjusting the displacement speed by the adsorption correction coefficient.
[0010] In a possible implementation, the target adsorption speed is a speed vector, a vector magnitude of the speed vector is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and a vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshair.
[0011] On the one hand, a crosshair control device in a virtual scene is provided, the device comprising:
[0012] A display module, used for displaying a target virtual object in a virtual scene;
[0013] A first acquisition module, configured to acquire, in response to an aiming operation on a virtual prop, a displacement direction and a displacement speed of a crosshair of the aiming operation;
[0014] A second acquisition module, configured to acquire an adsorption correction coefficient matching the displacement direction in response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction;
[0015] The display module is further used to display that the crosshair moves at a target adsorption speed, where the target adsorption speed is obtained by adjusting the displacement speed using the adsorption correction coefficient.
[0016] In a possible implementation manner, the second acquisition module is used to:
[0017] In response to the intersection of the extension line of the displacement direction and the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range, and the step of obtaining the adsorption correction coefficient is performed.
[0018] In a possible implementation manner, the second acquisition module includes:
[0019] An acquisition unit, used for acquiring an adsorption point corresponding to the crosshair in the target virtual object;
[0020] A first determining unit, configured to determine the adsorption correction coefficient as a first correction coefficient in response to the distance between the crosshair and the adsorption point in a current frame being smaller than the distance between the crosshair and the adsorption point in a previous frame;
[0021] The second determining unit is used to determine the adsorption correction coefficient as a second correction coefficient in response to the distance between the crosshair and the adsorption point in the current frame being greater than or equal to the distance between the crosshair and the adsorption point in the previous frame.
[0022] In a possible implementation manner, the first determining unit includes:
[0023] A first determination subunit is used to determine an adsorption acceleration intensity based on the displacement direction, wherein the adsorption acceleration intensity is used to characterize the degree of acceleration of the displacement speed;
[0024] An acquisition subunit, used for acquiring an adsorption acceleration type corresponding to the virtual prop, wherein the adsorption acceleration type is used for representing a method for accelerating the displacement speed;
[0025] The second determining subunit is used to determine the first correction coefficient based on the adsorption acceleration intensity and the adsorption acceleration type.
[0026] In a possible implementation manner, the first determining subunit is used to:
[0027] When the extension line intersects the central axis of the target virtual object, determining the adsorption acceleration intensity to be a first acceleration intensity;
[0028] When the extension line does not intersect the central axis of the target virtual object, the adsorption acceleration intensity is determined to be a second acceleration intensity, and the second acceleration intensity is smaller than the first acceleration intensity.
[0029] In one possible implementation, the adsorption acceleration type includes at least one of the following: a uniform speed correction type, which is used to increase the displacement speed; an acceleration correction type, which is used to set a preset acceleration for the displacement speed; a distance correction type, which is used to set a variable acceleration for the displacement speed, and the variable acceleration is negatively correlated with the distance between the crosshairs and the adsorption point.
[0030] In a possible implementation manner, the second determining unit is configured to:
[0031] The second correction coefficient is obtained by sampling from a correction coefficient curve based on a distance difference between a distance between the crosshair in a current frame and the adsorption point and a distance between the crosshair in a previous frame and the adsorption point.
[0032] In a possible implementation manner, the acquisition unit is used to:
[0033] In response to the horizontal height of the crosshair being greater than or equal to the horizontal height of a target dividing line of the target virtual object, determining a head skeleton point of the target virtual object as the adsorption point, the target dividing line being used to distinguish a head and a body of the target virtual object;
[0034] In response to the horizontal height of the crosshair being less than the horizontal height of the target dividing line, a body skeleton point of the target virtual object is determined as the adsorption point, and the body skeleton point is a skeleton point on the vertical center axis of the target virtual object with the same horizontal height as the crosshair.
[0035] In a possible implementation manner, the acquisition unit is further configured to:
[0036] In the case where the adsorption point is the body bone point, obtaining a lateral offset and a longitudinal offset from the crosshair to the target virtual object, wherein the lateral offset refers to the distance between the crosshair and the vertical center axis of the target virtual object, and the longitudinal offset refers to the distance between the crosshair and the horizontal center axis of the target virtual object;
[0037] The maximum value of the lateral offset and the longitudinal offset is determined as the distance between the crosshair and the adsorption point.
[0038] In one possible implementation, the device further includes:
[0039] A determination module, configured to determine a friction correction coefficient corresponding to the crosshair in response to the crosshair being located in a friction detection range within the adsorption detection range;
[0040] a correction module, configured to, in response to a steering operation on the sight, correct a steering angle corresponding to the steering operation based on the friction correction coefficient to obtain a target steering angle;
[0041] The first control module is used to control the direction of the crosshair in the virtual scene to rotate the target turning angle.
[0042] In a possible implementation manner, the friction detection range includes a first target point and a second target point, the friction correction coefficient at the first target point is a minimum value, and the friction correction coefficient at the second target point is a maximum value;
[0043] The determination module comprises:
[0044] An interpolation operation unit is used to perform an interpolation operation between the minimum value and the maximum value based on the position coordinates of the crosshair to obtain the friction correction coefficient, wherein the friction correction coefficient is positively correlated with the distance from the crosshair to the first target point.
[0045] In a possible implementation manner, the horizontal distance from the first target point to the second target point is a horizontal threshold, and the vertical distance from the first target point to the second target point is a vertical threshold;
[0046] The interpolation operation unit is used for:
[0047] Obtaining the horizontal distance and the vertical distance from the crosshair to the first target point;
[0048] When the ratio of the horizontal distance to the horizontal threshold is greater than or equal to the ratio of the vertical distance to the vertical threshold, performing an interpolation operation between the minimum value and the maximum value based on the ratio of the horizontal distance to the horizontal threshold;
[0049] When the ratio of the horizontal distance to the horizontal threshold is smaller than the ratio of the vertical distance to the vertical threshold, an interpolation operation is performed between the minimum value and the maximum value based on the ratio of the vertical distance to the vertical threshold.
[0050] In one possible implementation, the device further includes:
[0051] The cancellation module is used for canceling the correction of the displacement speed by the adsorption correction coefficient in response to the crosshair moving from within the adsorption detection range to outside the adsorption detection range and the time length of being outside the adsorption detection range exceeds a first time length.
[0052] In a possible implementation manner, the device further includes:
[0053] The second control module is configured to control the crosshair to move to the first virtual object in response to the crosshair being located within the adsorption detection range of the first virtual object; wherein the first virtual object is a virtual object that supports being adsorbed in the virtual scene.
[0054] In a possible implementation manner, the second control module is further configured to:
[0055] When the first virtual object is displaced, the crosshair is controlled to move following the first virtual object at a target speed.
[0056] In a possible implementation manner, the second control module is further configured to:
[0057] When the adsorption time of the crosshair to the first virtual object is less than a second time, in response to the displacement of the first virtual object, the crosshair is controlled to move following the first virtual object.
[0058] In a possible implementation, the target adsorption speed is a speed vector, a vector magnitude of the speed vector is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and a vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshair.
[0059] On the one hand, an electronic device is provided, which includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the at least one computer program is loaded and executed by the one or more processors to implement the crosshair control method in the virtual scene as described above.
[0060] On the one hand, a storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the crosshair control method in the virtual scene as described above.
[0061] In one aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes one or more program codes, and the one or more program codes are stored in a computer-readable storage medium. One or more processors of an electronic device can read the one or more program codes from the computer-readable storage medium, and the one or more processors execute the one or more program codes, so that the electronic device can perform the crosshair control method in the virtual scene.
[0062] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0063] Based on the aiming operation originally performed by the user, if it is determined that the aiming target is associated with the adsorption detection range of the target virtual object, it means that the user has an aiming intention on the target virtual object. At this time, an adsorption correction coefficient is applied to the original displacement speed, and the displacement speed is adjusted by the adsorption correction coefficient, so that the adjusted target adsorption speed is more in line with the user's aiming intention, which makes it easier for the crosshairs to focus on the aiming target more accurately, greatly improving the efficiency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 It is a schematic diagram of an implementation environment of a crosshair control method in a virtual scene provided by an embodiment of the present application;
[0066] Figure 2 is a flow chart of a crosshair control method in a virtual scene provided by an embodiment of the present application;
[0067] Figure 3 is a flow chart of a crosshair control method in a virtual scene provided by an embodiment of the present application;
[0068] Figure 4 It is a schematic diagram of the principle of an adsorption detection method provided in an embodiment of the present application;
[0069] Figure 5 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application;
[0070] Figure 6 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application;
[0071] Figure 7 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application;
[0072] Figure 8 It is a schematic diagram of the principle of a correction coefficient curve provided in an embodiment of the present application;
[0073] Fig. 9 It is a schematic diagram of the principle of an active adsorption method provided in an embodiment of the present application;
[0074] Fig.10 It is a schematic diagram of the principle of failure conditions of an active adsorption method provided in an embodiment of the present application;
[0075] Fig.11 is a schematic diagram of an interface of an aiming screen provided in an embodiment of the present application;
[0076] Fig.12 is a schematic diagram of an interface of an aiming screen provided in an embodiment of the present application;
[0077] Fig.13 is a schematic diagram of an interface of an aiming screen provided in an embodiment of the present application;
[0078] Fig.14 is a schematic diagram of an interface of an aiming screen provided in an embodiment of the present application;
[0079] Fig.15 is a schematic diagram of an interface of an aiming screen provided in an embodiment of the present application;
[0080] Fig.16 It is a schematic diagram of a principle of a friction detection range provided in an embodiment of the present application;
[0081] Fig.17 is a structural schematic diagram of a crosshair control device in a virtual scene provided by an embodiment of the present application;
[0082] Fig.18 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0083] Fig.19 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0085] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0086] In the present application, the term "at least one" means one or more, and the meaning of "plurality" means two or more. For example, a plurality of first positions means two or more first positions.
[0087] In this application, the term "including at least one of A or B" refers to the following situations: including only A, including only B, and including both A and B.
[0088] Virtual scene: is a virtual environment displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene. Optionally, the virtual scene can also be used for virtual scene confrontation between at least two virtual objects, and there are virtual resources in the virtual scene that can be used by at least two virtual objects.
[0089] Virtual object: refers to an movable object in a virtual scene. The movable object may be a virtual person, a virtual animal, a cartoon character, etc., such as a person, an animal, a plant, an oil drum, a wall, a stone, etc. displayed in a virtual scene. The virtual object may be a virtual image in the virtual scene that is used to represent the user. The virtual scene may include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object may be a three-dimensional stereo model, which may be a three-dimensional character built based on three-dimensional human skeleton technology. The same virtual object may show different external images by wearing different skins. In some embodiments, the virtual object may also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.
[0090] Optionally, the virtual object may be a player character controlled by an operation on the client, or a non-player character (NPC) set in the virtual scene interaction. Optionally, the virtual object may be a virtual person competing in the virtual scene. Optionally, the number of virtual objects participating in the interaction in the virtual scene may be pre-set, or may be dynamically determined according to the number of clients joining the interaction.
[0091] Shooter Game (STG): refers to a type of game in which virtual objects use virtual props such as hot weapons to perform long-range attacks. Shooter games are a type of action game with obvious action game characteristics. Optionally, shooting games include but are not limited to first-person shooting games, third-person shooting games, top-down shooting games, head-up shooting games, platform shooting games, scroll shooting games, keyboard and mouse shooting games, shooting range games, etc. The embodiments of this application do not specifically limit the types of shooting games.
[0092] First-Person Shooting (FPS) games: First-Person Shooting games are a branch of action games, but like RTS (Real-Time Strategy) games, they have developed into a separate genre due to their rapid popularity in the world. FPS games refer to shooting games that users can play from a first-person perspective (i.e., the player's subjective perspective), and the images of the virtual scenes in the game are images of the virtual scenes observed from the perspective of the virtual objects controlled by the terminal. In FPS games, users no longer manipulate virtual objects on the screen to play the game like other games, but experience the visual impact brought by the game in an immersive way, which greatly enhances the initiative and realism of the game. Generally, FPS games provide richer plots, exquisite images and vivid sound effects.
[0093] In an FPS game, at least two virtual objects engage in a single-game confrontation mode in a virtual scene. The virtual objects survive in the virtual scene by avoiding damage initiated by other virtual objects and dangers in the virtual scene (e.g., poison gas circles, swamps, etc.). When the life value of the virtual object in the virtual scene is zero, the life of the virtual object in the virtual scene ends, and the virtual object that survives in the virtual scene at last is the winner. Optionally, the above-mentioned confrontation takes the moment when the first terminal joins the game as the starting moment and the moment when the last terminal exits the game as the ending moment. Each terminal can control one or more virtual objects in the virtual scene. Optionally, the competitive mode of the confrontation includes a single-player confrontation mode, a two-player team confrontation mode, or a multi-player group confrontation mode, etc. The embodiment of the present application does not specifically limit the competitive mode.
[0094] Taking FPS games as an example, users can control virtual objects to freely fall, glide, or open parachutes to fall in the sky of the virtual scene, run, jump, crawl, bend forward, etc. on land, and can also control virtual objects to swim, float, or dive in the ocean. Of course, users can also control virtual objects to move in virtual vehicles in the virtual scene. For example, the virtual vehicles include virtual cars, virtual aircraft, virtual yachts, etc., which are only illustrated by the above scenes, and the embodiments of the present application are not specifically limited to this. Users can also control virtual objects to fight against other virtual objects through virtual props. For example, the virtual props include: throwing props that can only take effect after throwing, shooting props that can only take effect after the projectile is launched, and cold weapon props used for close-range attacks.
[0095] Field of View (FOV): Field of View, that is, the field of view of the camera mounted on the main virtual object of the current terminal, measured in degrees; in other words, the angle range in which the camera can receive images in the virtual scene is called the field of view of the main virtual object. In FPS games, since users observe the virtual scene from a first-person perspective, the field of view of the main virtual object in FPS games refers to the virtual scene image that can be seen on the display (i.e., the terminal screen). This virtual scene image represents the field of view of the game world that the main virtual object can currently observe.
[0096] Crosshair: In FPS games, it is the center point within the field of view. It is used to indicate the landing point of the projectile of the virtual prop when the user initiates the shooting. In FPS games that tend to be more game-like rather than realistic, the crosshair is located in the center of the screen to assist the aiming operation of the virtual prop, representing the logical direction of the projectile of the virtual prop.
[0097] Observation equipment: Virtual equipment in FPS games is usually made of metal. When the scope is not equipped, it is used to position the virtual props and the aiming target on the same straight line to assist the virtual props in aiming at a specific aiming target. At this time, the angle of the camera will move behind the scope of the virtual prop, so that the virtual props can be accurately aimed, and it can also provide a certain zoom ratio to provide higher usability at a farther range. When the scope is equipped, a scale or a specially designed aiming line is usually provided to magnify the image of the aiming target onto the retina, making aiming easier and more accurate. The magnification is proportional to the diameter of the objective lens of the scope. A larger objective lens diameter can make the image clearer and brighter, but it may be accompanied by a narrowing of the field of view at high magnifications.
[0098] Scope shooting: that is, when a scope is equipped, first turn on the scope (referred to as scope opening), adjust the crosshairs so that the crosshairs are aligned with the target, and then trigger the virtual props to complete the firing.
[0099] Shooting without a scope: also known as hip-firing. Hip-firing is a primitive way of aiming. Because it is shooting without a scope, the accuracy of the shooting crosshairs is often not high and is prone to deviation or shaking.
[0100] Firing animation: An animation associated with a virtual prop that is played when the virtual prop fires in a shooting game. Usually, the firing animation is used to show the movement of the torso and parts of the virtual prop as the prop fires. For example, the firing animation involves the forward and backward movement of the torso of the virtual prop, the linkage movement of pulling the handle (i.e., the firing mechanism on the torso), the forward and backward movement of the upper slide, the linkage movement of the movable parts on the torso, etc., to enhance the realism and immersion of the firing performance.
[0101] Character animation: Animation associated with virtual objects played when virtual props are fired in shooting games. Character animation is usually used to show the firing action of virtual objects holding virtual props. For example, character animation involves the actions of virtual objects when they are subjected to the recoil of virtual props in the vertical and horizontal directions. The above actions include but are not limited to the swing of the upper body of the virtual object, the follow-up of the lower limbs, the vibration of the arms, the head movement and facial expressions, etc., so as to truly show the power of the virtual props when firing and enhance the realism and immersion of shooting games.
[0102] Aiming assistance: When FPS games are not operated by keyboard and mouse, aiming assistance can be added. Compared with using keyboard and mouse to play shooting games, using handles and touch screens on mobile terminals usually requires higher operation requirements and is more difficult to operate. Users may not be used to the operation methods on mobile terminals. By adding aiming assistance, users can operate the game smoothly on mobile terminals. In terms of performance, by controlling the direction of the camera, the crosshairs can be automatically aimed at the target in the field of view.
[0103] Active adsorption: The active adsorption involved in the embodiments of the present application refers to when the player actively initiates the aiming operation, because the player has the intention to actively move the crosshairs to the aiming target (i.e., the target to be aimed at this time), when the aiming target is associated with the adsorption detection range of any virtual object in the virtual scene (for example, it is within the adsorption detection range, or moves from the outside to the adsorption detection range), the active adsorption logic is triggered. Under the active adsorption logic, the crosshairs will automatically point the aiming target to the virtual object and briefly follow the virtual object. Optionally, when the user moves the crosshairs or fires at the virtual props, the active adsorption logic can be triggered when the above-mentioned active adsorption judgment conditions are met.
[0104] Passive adsorption: The embodiments of the present application involve passive adsorption, which means that when the player does not perform an aiming operation, because the crosshair is within the adsorption detection range of any virtual object in the virtual scene, the crosshair is automatically controlled to be adsorbed to the virtual object at a certain speed and briefly follow the virtual object without relying on the user's aiming operation.
[0105] Skeleton hanging point: a socket (hanging point) mounted on the skeleton of the object model of the virtual object. The head skeleton point and the torso skeleton point involved in the embodiment of the present application are both skeleton hanging points, wherein the head skeleton point is mounted on the head skeleton of the object model, and the torso skeleton point is mounted on the torso skeleton of the object model. The relative position of the skeleton hanging point and the model skeleton remains unchanged, that is, the skeleton hanging point will move with the movement of the model skeleton.
[0106] The following is an introduction to the system architecture involved in this application.
[0107] Figure 1 Schematic diagram of the implementation environment of a crosshair control method in a virtual scene provided by an embodiment of the present application. Figure 1 The implementation environment includes: a first terminal 120, a server 140 and a second terminal 160.
[0108] The first terminal 120 is installed and runs an application that supports virtual scenes. Optionally, the application includes: any one of: FPS games, third-person shooting games, MOBA (Multiplayer Online Battle Arena, multiplayer online tactical competitive) games, virtual reality applications, three-dimensional map programs, or multiplayer machine survival games. In some embodiments, the first terminal 120 is a terminal used by the first user. When the first terminal 120 runs the application, the user interface of the application is displayed on the screen of the first terminal 120, and based on the opening operation of the first user in the user interface, the virtual scene is loaded and displayed in the application. The first user uses the first terminal 120 to operate the first virtual object in the virtual scene to perform activities, and the activities include but are not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and confronting. Schematically, the first virtual object is a first virtual character, such as a simulated character or an anime character.
[0109] The first terminal 120 and the second terminal 160 are directly or indirectly connected to the server 140 through a wireless network or a wired network.
[0110] The server 140 includes at least one of a single server, multiple servers, a cloud computing platform, or a virtualization center. The server 140 is used to provide background services for applications that support virtual scenes. Optionally, the server 140 undertakes the main computing work, and the first terminal 120 and the second terminal 160 undertake the secondary computing work; or, the server 140 undertakes the secondary computing work, and the first terminal 120 and the second terminal 160 undertake the main computing work; or, the server 140, the first terminal 120 and the second terminal 160 adopt a distributed computing architecture for collaborative computing.
[0111] Optionally, server 140 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0112] The second terminal 160 is installed and runs an application that supports virtual scenes. Optionally, the application includes any one of an FPS game, a third-person shooter game, a MOBA game, a virtual reality application, a three-dimensional map program, or a multiplayer shooting survival game. In some embodiments, the second terminal 160 is a terminal used by the second user. When the second terminal 160 runs the application, the user interface of the application is displayed on the screen of the second terminal 160, and based on the opening operation of the second user in the user interface, the virtual scene is loaded and displayed in the application. The second user uses the second terminal 160 to operate the second virtual object located in the virtual scene to perform activities, and the activities include but are not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and confronting. Schematically, the second virtual object is a second virtual character, such as a simulated character or an anime character.
[0113] Optionally, the first virtual object controlled by the first terminal 120 and the second virtual object controlled by the second terminal 160 are in the same virtual scene, and the first virtual object can interact with the second virtual object in the virtual scene. Schematically, the first virtual object and the second virtual object are in an adversarial relationship. For example, the first virtual object and the second virtual object belong to different camps, and the virtual objects in the adversarial relationship can interact in an adversarial manner on land, such as throwing throwing props to each other. In other embodiments, the first virtual object and the second virtual object are in a collaborative relationship. For example, the first virtual character and the second virtual character belong to the same camp, the same team, have a friend relationship, or have temporary communication permissions.
[0114] Optionally, the applications installed on the first terminal 120 and the second terminal 160 are the same, or the applications installed on the two terminals are the same type of applications on different operating system platforms. The first terminal 120 and the second terminal 160 both refer to one of a plurality of terminals, and the embodiments of the present application only take the first terminal 120 and the second terminal 160 as examples.
[0115] The first terminal 120 and the second terminal 160 are of the same or different device types, and the device types include at least one of: a smart phone, a tablet computer, a smart speaker, a smart watch, a smart handheld game device, a vehicle-mounted terminal, a laptop computer, and a desktop computer, but are not limited thereto. For example, the first terminal 120 and the second terminal 160 are both smart phones, or other handheld portable game devices. The following embodiments are illustrated by taking the terminal including a smart phone as an example.
[0116] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.
[0117] Figure 2 is a flow chart of a crosshair control method in a virtual scene provided by an embodiment of the present application. Figure 2 This embodiment is executed by an electronic device and is described by taking the electronic device as a terminal as an example. This embodiment includes the following steps:
[0118] 201. The terminal displays a target virtual object in a virtual scene.
[0119] The terminal refers to an electronic device used by a user, such as a smart phone, a smart handheld game console, a portable game device, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. An application supporting a virtual scene is installed and run on the terminal. Schematically, the application refers to a game application or a game client. For example, in the embodiment of the present application, a game client of a shooting game will be used as an example for explanation, but it should not constitute a limitation on the game type corresponding to the game client.
[0120] The target virtual object refers to a virtual object that can be adsorbed and is located in the virtual scene. The target virtual object includes but is not limited to: virtual items, virtual buildings, virtual objects that are not controlled by the user (such as wild monsters), game companion AI (Artificial Intelligence) objects, virtual objects controlled by other terminals in the same game, etc. The embodiment of the present application does not specifically limit the type of the target virtual object.
[0121] In some embodiments, the user starts the game client on the terminal and logs in the user's game account in the game client. Then, a user interface is displayed in the game client, which includes account information of the game account, selection controls for game mode, selection controls for scene map, and start options. The user can select the game mode he wants to start through the selection control for the game mode, and can select the scene map he wants to enter through the selection control for the map scene. After the user has made his selection, the terminal is triggered to enter a new round of game play by performing a trigger operation on the start option.
[0122] It should be noted that the above-mentioned operation of selecting the scene map is not a step that must be performed. For example, in some games, users are allowed to select the scene map by themselves, but in other games, users are not allowed to select the scene map by themselves (instead, the server randomly assigns the scene map for this game at the start of the game); or, in some game modes, users are allowed to select the scene map by themselves, but in other game modes, users are not allowed to select the scene map by themselves. The embodiments of the present application do not specifically limit whether the user must select the scene map before the start of the game or whether the user has the right to select the scene map.
[0123] Taking the current round of game as the target game as an example, after the user performs a trigger operation on the opening option, the game client enters the target game and loads the virtual scene corresponding to the target game. Optionally, the game client downloads the multimedia resources of the virtual scene from the server and uses the rendering engine to render the multimedia resources of the virtual scene, thereby displaying the virtual scene in the game client. The target game refers to any game that supports the auxiliary aiming function for the main control virtual object.
[0124] In some embodiments, the terminal displays a master virtual object in the virtual scene, wherein the master virtual object refers to a virtual object currently controlled by the terminal (also called a main virtual object, a controlled virtual object, etc.). Optionally, the terminal pulls multimedia resources of the master virtual object from the server, and uses a rendering engine to render the multimedia resources of the master virtual object to display the master virtual object in the virtual scene.
[0125] In some embodiments, for some FPS games, since the virtual scene is observed from a first-person perspective (i.e., the perspective of the master virtual object), what is displayed on the terminal screen is a virtual scene picture based on the perspective of the master virtual object to observe the virtual scene, but the master virtual object does not necessarily need to be displayed in the virtual scene picture. For example, only the back of the master virtual object is displayed, or only a part of the body of the master virtual object (such as the upper body) is displayed, or the master virtual object is not displayed. The embodiments of the present application do not specifically limit whether the master virtual object is displayed in the virtual scene.
[0126] In some embodiments, the terminal determines a target virtual object within the field of view of the master virtual object, wherein the target virtual object is an adsorbable virtual object within the field of view of the master virtual object. Optionally, the terminal pulls multimedia resources of the target virtual object from the server, and uses a rendering engine to render the multimedia resources of the target virtual object to display the target virtual object in the virtual scene.
[0127] 202. In response to the aiming operation on the virtual prop, the terminal obtains the displacement direction and displacement speed of the crosshair of the aiming operation.
[0128] Among them, the virtual prop refers to a prop with a projectile that has been equipped on the main virtual object. After being triggered by the user's firing operation, the virtual prop will launch the projectile corresponding to the virtual prop to the landing point indicated by the crosshair, so that the projectile will take effect when it reaches the landing point, or the projectile will take effect in advance when it encounters an obstacle (such as a wall, a bunker, a vehicle, etc.) during the launch.
[0129] Optionally, the virtual prop is a shooting prop or a throwing prop. When the virtual prop is a shooting prop, the projectile refers to the projectile loaded inside the virtual prop. When the virtual prop is a throwing prop, the projectile refers to the virtual prop itself. The embodiment of the present application does not specifically limit the virtual prop.
[0130] In some embodiments, the user controls the master virtual object to assemble the virtual prop. For example, after the master virtual object picks up the virtual prop, the virtual prop is displayed in the virtual backpack of the master virtual object. When the user selects the virtual prop in the virtual backpack, an assembly option for the virtual prop is provided. In response to a triggering operation on the assembly option, the master virtual object assembles the virtual prop to the virtual prop bar or the equipment bar, for example, establishing a binding relationship between the master virtual object and the virtual prop.
[0131] In some embodiments, after the user controls the master virtual object to pick up the virtual prop, the system automatically equips the master virtual object with the virtual prop. The embodiment of the present application does not specifically limit whether the virtual prop is automatically assembled after picking up.
[0132] Optionally, when the master virtual object approaches the virtual prop in the virtual scene, the automatic picking logic of the virtual prop can be triggered, and the system automatically adds the virtual prop to the virtual backpack of the master virtual object. Optionally, when the master virtual object approaches the virtual prop in the virtual scene, the manual picking logic of the virtual prop can be triggered. At this time, the picking control of the virtual prop appears in the virtual scene. In response to the triggering operation of the picking control, the master virtual object is controlled to pick up the virtual prop. The embodiment of the present application does not specifically limit whether to automatically pick up the virtual prop.
[0133] Optionally, the virtual props do not need to be picked up by the main virtual object after the game starts. Instead, the user pre-selects the virtual props to be brought into the target game before the game starts, that is, the main virtual object is equipped with the virtual props in the initial state in the virtual scene. The embodiment of the present application does not specifically limit whether the virtual props are props selected before the game starts or props picked up after the game starts.
[0134] In some embodiments, when the user equips the virtual prop, the user performs a trigger operation on the virtual prop, so that the terminal switches the prop currently used by the main virtual object to the virtual prop in response to the trigger operation on the virtual prop. Optionally, the terminal also displays the virtual prop on a designated part of the main virtual object to intuitively show that the virtual prop is the currently used prop, wherein the designated part is determined based on the prop type of the virtual prop. For example, when the virtual prop is a throwing prop, the corresponding designated part is the hand, that is, the throwing prop is displayed on the hand of the main virtual object. For another example, when the virtual prop is a shooting prop, the corresponding designated part is the shoulder, that is, the shooting prop is displayed on the shoulder of the main virtual object.
[0135] In some embodiments, when the prop currently used by the master virtual object is the virtual prop, at least the aiming control of the virtual prop is displayed in the virtual scene, so that when it is detected that the user has performed a trigger operation on the aiming control of the virtual prop, the aiming screen of the virtual prop is determined based on the field of view of the master virtual object in the virtual scene, and the aiming screen is displayed in the game client. It should be noted that the crosshair adsorption method involved in the embodiments of the present application is applicable to both aiming and shooting without aiming (i.e., hip shooting), so there is no specific limitation here on whether the aiming screen is the aiming screen after aiming or the aiming screen without aiming.
[0136] Optionally, an aiming control and a launching control of the virtual prop are displayed in the virtual scene, the aiming control is used to open an aiming target of a projectile aimed at the virtual prop, and the launching control is used to trigger the launch of the projectile corresponding to the virtual prop.
[0137] Optionally, only the aiming control is displayed in the virtual scene, and after detecting that a trigger operation is performed on the aiming control, the aiming screen is displayed, the aiming control is canceled, and the launch control is displayed at the same time.
[0138] Optionally, the aiming control and the launching control are integrated into one interactive control, so that the user presses the aiming control to trigger the adjustment of the crosshairs to align the crosshairs with the aiming target, and the user releases the aiming control (i.e., no longer presses it) to trigger the launch of the projectile of the virtual prop. At this time, the interactive control can be regarded as an aiming control or a launching control, and this embodiment of the present application does not specifically limit this.
[0139] When displaying the aiming screen, for the situation of scoped shooting, that is, the main control virtual object is equipped with a scope and uses the scoped shooting mode, the field of view of the main control virtual object (that is, the image that can be observed by the camera mounted on the main control virtual object) is first determined, and then based on the objective lens diameter and magnification of the scope, the field of view is enlarged to obtain the aiming screen.
[0140] When displaying the aiming screen, for the situation of shooting without a scope, that is, the main virtual object is not equipped with a scope, or the main virtual object is equipped with a scope but uses the shooting mode without a scope, the field of view of the main virtual object (that is, the image that can be observed by the camera mounted on the main virtual object) is determined as the aiming screen.
[0141] In some embodiments, a crosshair is displayed in the aiming screen to indicate the expected landing point of the projectile corresponding to the virtual prop in the virtual scene when the user performs a launch operation on the virtual prop. The aiming screen is equivalent to an imaging screen in which the virtual scene within the field of view is projected onto the eyepiece of the sight, or, because the eyes of the master virtual object are close to the sight, the aiming screen is also regarded as an imaging screen in which the virtual scene within the field of view is magnified by the sight and projected onto the retina of the master virtual object, that is, the aiming screen is essentially an imaging screen in which the virtual scene is projected onto a two-dimensional plane and finally displayed on the terminal screen, so the aiming screen can be regarded as a projection surface.
[0142] It should be noted that if the projectile does not hit an obstacle during flight, the projectile will be controlled to move from the position of the virtual prop to the landing point indicated by the crosshairs, and take effect at the landing point indicated by the crosshairs. If the projectile hits an obstacle during flight, the projectile will be controlled to take effect in advance at the collision position with the obstacle. The effect of the projectile is determined by the virtual prop. For example, when the virtual prop is a damage-type prop, it will cause damage to the virtual object within the range of action of the projectile, which is reflected in the deduction of the virtual life value of the virtual prop within the range of action. For another example, when the virtual prop is a prop that blocks the field of view, it will block the field of view of the virtual object within the range of action of the projectile, which is reflected in blinding the virtual object within the range of action for a certain period of time (i.e., the duration of the projectile's action). The embodiments of the present application do not specifically limit this.
[0143] Optionally, for some FPS games, in order to facilitate the user's aiming, the crosshairs are always displayed at the center point of the aiming screen, so that when the user adjusts the crosshairs, it is actually reflected by changing the content of the aiming screen that the crosshairs are aimed at different aiming targets, thereby achieving an immersive experience in which the sight follows the movement of the crosshairs to select the aiming target in a real shooting scene. For example, in the open-scope shooting mode, the crosshairs is the center point of the aiming screen, that is, the center of the scope. At this time, the relative position of the crosshairs and the scope is always unchanged. Therefore, when adjusting the crosshairs, the adjustment is actually completed by rotating the scope to drive the crosshairs as the center of the scope. At this time, the crosshairs are always located in the center of the field of view, but the observed aiming screen will change with the rotation of the scope.
[0144] Optionally, for other FPS games or third-person shooter games, the crosshairs are not fixed at the center point of the aiming screen, so that when the user adjusts the crosshairs, the movement of the crosshairs is directly displayed in the aiming screen. The embodiment of the present application does not specifically define whether the crosshairs are fixed at the center point of the aiming screen. Schematically, when the crosshairs move in the central area of the aiming screen, the fixed sight, that is, the aiming screen does not change. When the crosshairs move to the edge area of the aiming screen (that is, the area other than the central area), the sight is driven to move in the same direction to display the aiming screen outside the original lens, and the crosshairs are located in the central area of the new aiming screen, wherein the central area or the edge area is set by the technician, and the embodiment of the present application does not specifically define this.
[0145] Since the crosshairs indicate the expected landing point of the projectile of the virtual prop, the user's adjustment operation on the crosshairs is essentially an aiming operation on the virtual prop. In other words, the aiming operation on the virtual prop involved in the embodiment of the present application refers to the adjustment operation on the crosshairs, and the adjustment operation includes: displacement of the crosshairs (position change), turning of the crosshairs (direction change), etc. Optionally, when the crosshairs are fixed at the center point of the aiming screen, since the relative positions of the crosshairs and the sight remain unchanged (i.e., the crosshairs are always the center point of the sight), the adjustment operation on the crosshairs also refers to the adjustment operation on the sight. In other words, the sight is adjusted by controlling the main virtual object, thereby driving the crosshairs located at the center point of the sight to make corresponding adjustments. Optionally, since the scope itself is also bound to the virtual prop, the adjustment operation on the scope can also be regarded as the adjustment operation on the camera mounted on the virtual prop; or, since the master virtual object itself will put its eyes close to the scope for observation, the adjustment operation on the scope can also be regarded as the adjustment operation on the camera mounted on the master virtual object. The embodiments of the present application do not specifically limit this.
[0146] In some embodiments, the user can adjust the crosshairs in any of the following ways or a combination of multiple ways: 1) the user clicks on the aiming control in the virtual scene to trigger the display of the aiming screen, and the aiming control becomes an interactive wheel. The user continues to press the aiming control and slides his finger to control the corresponding displacement of the crosshairs; 2) the user can let go after clicking on the aiming control to trigger the display of the aiming screen, and a new interactive wheel is displayed in the aiming screen. The user continues to press the interactive wheel and slides his finger to control the corresponding displacement of the crosshairs; 3) the user can let go after clicking on the aiming control to trigger the display of the aiming screen, and continue to press any position in the aiming screen and slide his finger to control the corresponding displacement of the crosshairs, that is, any position in the aiming screen can trigger the adjustment of the crosshairs, not limited to the interactive wheel. 4) The user can let go after clicking the aiming control to trigger the aiming screen. At this time, the user can rotate the terminal in any direction, so that after the sensor senses the rotation operation of the terminal, the crosshairs can be controlled to move accordingly; 5) The user can let go after clicking the aiming control to trigger the aiming screen. The user can refocus the crosshairs on the clicked position by clicking any position in the aiming screen again; 6) The user controls the crosshairs to move accordingly according to the instructions of the voice instructions through voice instructions; 7) The user controls the crosshairs to move accordingly according to the instructions of the gesture instructions through gesture instructions, for example, tapping the left edge of the screen to control the crosshairs to move to the left, and for example, one hand is suspended above the screen (the hand does not touch the screen), and the camera is waved to the left to control the crosshairs to move to the left, etc. The embodiment of the present application does not specifically limit the gesture instructions. It should be noted that here are only some exemplary descriptions of the adjustment operation of the crosshairs, but the adjustment operation of the crosshairs can also be performed in other ways other than the above-mentioned methods, and the embodiment of the present application does not specifically limit this.
[0147] In some embodiments, after the user performs an adjustment operation on the crosshair in any of the above methods, the terminal determines that an aiming operation on the virtual prop is detected, and in response to the aiming operation of the virtual prop, obtains the displacement direction and displacement speed of the crosshair of the aiming operation.
[0148] Illustratively, when the crosshairs are adjusted by pressing the screen and sliding in the above-mentioned methods 1)-3), the pressure sensor of the terminal can sense the pressure point of the pressure signal applied by the user's finger to the terminal screen, and the pressure point will continue to change during the sliding process to form a sliding trajectory (also called a sliding curve), and the tangent direction of the sliding trajectory at the endpoint in the current frame (i.e., the screen frame at the current moment) is determined as the displacement direction of the crosshairs, and the displacement speed of the crosshairs is determined based on the sliding speed of the user's finger in the current frame. For example, the displacement speed is obtained by scaling the sliding speed according to a first preset ratio, and the first preset ratio is a value greater than 0, and the first preset ratio is set by a technician.
[0149] Illustratively, when the crosshairs are adjusted by rotating the terminal in the above-mentioned method 4), the rotation direction and rotation speed of the user's rotation operation on the terminal can be sensed by the gyroscope sensor of the terminal, and the opposite direction of the rotation direction is used as the displacement direction of the crosshairs, and the displacement speed of the crosshairs is determined based on the rotation speed. For example, the displacement speed is obtained by scaling the rotation speed according to a second preset ratio, and the second preset ratio is a value greater than 0, and the second preset ratio is set by a technician.
[0150] Illustratively, when a certain position is clicked in the above method 5) to move the crosshairs to the clicked position, the ray pattern pointing from the current position of the crosshairs to the clicked position can be used as the displacement direction of the crosshairs, and a preset displacement speed is obtained. The preset displacement speed is a value greater than 0, and the preset displacement speed is set by a technician.
[0151] Illustratively, when the voice command in the above-mentioned method 6) or the gesture command in the method 7) is used to adjust the crosshairs, the displacement direction and displacement speed of the crosshairs are determined by the instructions of the voice command or the gesture command. If the voice command or the gesture command does not indicate the displacement speed, the preset displacement speed is obtained, which is not elaborated here.
[0152] 203. In response to determining that the aiming target of the aiming operation is associated with an adsorption detection range of the target virtual object based on the displacement direction, the terminal acquires an adsorption correction coefficient matching the displacement direction.
[0153] Among them, the adsorption detection range is a spatial range or plane area located outside the target virtual object and including the target virtual object. Optionally, the adsorption detection range is a three-dimensional spatial range centered on the object model of the target virtual object in the virtual scene, and the object model of the target virtual object is located within the three-dimensional spatial range. In one example, the object model of the target virtual object is a capsule-shaped model, and the three-dimensional spatial range is a rectangular space range located outside the capsule and including the capsule. Optionally, the adsorption detection range is a two-dimensional plane area centered on the model projection of the target virtual object in the aiming screen. The model projection of the target virtual object refers to the two-dimensional projection image of the object model of the target virtual object in the aiming screen. In one example, the two-dimensional plane area is a rectangular plane area that includes the model projection.
[0154] In some embodiments, since the crosshairs can indicate the expected landing point of the projectile of the virtual prop, and the displacement direction of the crosshairs represents the displacement direction in which the user wants to control the change of the expected landing point when adjusting the crosshairs, it reflects the user's aiming intention to aim at a target near the crosshairs or in the displacement direction. In other words, it represents that there is an aiming target of the user's current aiming operation near the crosshairs or in the displacement direction. On this basis, if it is determined based on the displacement direction that the aiming target is associated with the adsorption detection range of the target virtual object within the current field of view, it means that it is very likely that the target virtual object is the aiming target of this aiming operation, and thus the active adsorption logic of the crosshairs can be triggered.
[0155] In some embodiments, when the crosshairs is outside the adsorption detection range of the target virtual object, if the displacement direction is close to the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range of the target virtual object within the current field of view, that is, although the crosshairs is outside the adsorption detection range, as long as the crosshairs is displaced in a direction close to the adsorption detection range, it can also be regarded as the aiming target of the target virtual object, thereby triggering the active adsorption logic.
[0156] In some embodiments, when the crosshairs is within the adsorption detection range of the target virtual object, it is determined that the aiming target is associated with the adsorption detection range of the target virtual object within the current field of view, that is, as long as the crosshairs is within the adsorption detection range, no matter in which direction the crosshairs is displaced, it can be regarded as a fine-tuning of the aiming target with the target virtual object as the aiming target, thereby triggering the active adsorption logic.
[0157] In some embodiments, when it is determined that the aiming target is associated with the adsorption detection range of the target virtual object within the current field of view, an adsorption correction coefficient matching the displacement direction can be obtained, and the adsorption correction coefficient is used to adjust the original displacement speed of the crosshairs, that is, the adsorption correction coefficient is equivalent to an adjustment factor for the original displacement speed of the crosshairs under the triggering of the active adsorption logic. Optionally, different adsorption correction coefficients are pre-configured for different displacement directions, thereby selecting the pre-configured adsorption correction coefficient corresponding to the displacement direction, or dynamically determining the adsorption correction coefficient through the rules described in the following embodiments. The embodiments of the present application do not specifically limit the method for obtaining the adsorption correction coefficient.
[0158] 204. The terminal displays that the crosshair moves at a target adsorption speed, where the target adsorption speed is obtained by adjusting the displacement speed using the adsorption correction coefficient.
[0159] In some embodiments, the "target adsorption speed" involved in the embodiments of the present application is a speed vector, that is, the target adsorption speed not only indicates the speed of the movement of the crosshairs (controlled by the vector size), but also indicates the direction of the movement of the crosshairs (controlled by the vector direction).
[0160] Optionally, under the active adsorption logic, only the vector size of the target adsorption speed is adjusted without changing the vector direction, that is, the displacement speed is adjusted only based on the adsorption correction coefficient to obtain the vector size of the speed vector (i.e., the rate value), and the vector direction of the speed vector is determined as the original displacement direction of the crosshairs. This is equivalent to applying an adjustment coefficient to the original displacement speed of the crosshairs without changing the displacement direction, so that without changing the user's own aiming intention for the displacement direction, the adjustment coefficient can be used to facilitate the rapid dragging of the crosshairs to the target virtual object, i.e., the aiming target.
[0161] Optionally, under the active adsorption logic, not only the vector size of the target adsorption speed is adjusted, but also the vector direction of the target adsorption speed is adjusted, that is, the displacement speed is adjusted based on the adsorption correction coefficient to obtain the vector size of the speed vector (that is, the rate value), and the displacement direction is adjusted based on the adsorption point of the crosshairs to obtain the vector direction of the speed vector, which is equivalent to not only applying an adjustment coefficient to the original displacement speed of the crosshairs, but also applying an adjustment angle to the original displacement direction of the crosshairs, so that when the overall displacement trend remains unchanged, both the displacement direction and the displacement speed are fine-tuned, so that the crosshairs can be better adsorbed to the target virtual object, that is, the aiming target, quickly.
[0162] In some embodiments, for each frame in the process of the displacement of the crosshair, after the displacement speed and displacement direction of the crosshair of the current frame are determined by real-time detection, the terminal adjusts the displacement speed based on the adsorption correction coefficient to obtain the target adsorption speed, i.e., the vector magnitude of the velocity vector. Then, the target direction from the crosshair to the adsorption point is obtained, so that an initial vector can be determined based on the original displacement speed and displacement direction, and a correction vector can be determined based on the vector magnitude obtained by the above adjustment and the target direction. The initial vector and the correction vector are vector summed to obtain a target vector. The direction of this target vector is the target adsorption speed, i.e., the vector direction of the velocity vector. Thus, according to the vector magnitude and vector direction determined above, a velocity vector, i.e., the target adsorption speed, can be uniquely determined. This target adsorption speed can characterize the velocity vector of the crosshair of the current frame. For the next frame, since the displacement direction and displacement speed have changed, it is necessary to re-execute steps 202-204 to determine the velocity vector of the crosshair of the next frame, and so on, which will not be described in detail here. It should be noted that if the displacement direction and the target direction are the same, the vector direction of the target vector is also equal to the displacement direction and the target direction, i.e., the displacement direction of the crosshair will not change.
[0163] In some embodiments, when the displacement direction is close to the adsorption detection range, the adsorption correction coefficient is used to accelerate the displacement speed to speed up the speed at which the crosshairs approach the target virtual object, making it easier for the crosshairs to quickly align with the target virtual object. When the displacement direction is away from the adsorption detection range, the adsorption correction coefficient is used to decelerate the displacement speed to slow down the speed at which the crosshairs move away from the target virtual object, thereby improving the situation where the user misoperates due to excessive sliding when adjusting the crosshairs.
[0164] For the case where the displacement direction is close to the adsorption detection range, when the crosshairs moves at a uniform speed, the displacement speed is increased based on the adsorption correction coefficient to obtain a corrected target adsorption speed, so that the crosshairs moves at a uniform speed at an adsorption correction speed greater than the original displacement speed; or, based on the adsorption correction coefficient, a fixed preset acceleration is applied to the displacement speed, so that the crosshairs takes the displacement speed as the initial speed and moves with uniform acceleration under the action of the preset acceleration; or, based on the adsorption correction coefficient, a variable acceleration is applied to the displacement speed, so that the crosshairs takes the displacement speed as the initial speed and moves with variable acceleration under the action of the variable acceleration, for example, the variable acceleration is negatively correlated with the distance between the crosshairs and the corresponding adsorption point, so that when the crosshairs is closer to the adsorption point, the variable acceleration value is larger, and when the crosshairs is farther from the adsorption point, the variable acceleration value is smaller.
[0165] In some embodiments, when the crosshair is always fixed at the center point of the aiming screen, when the crosshair is controlled to move along the displacement direction at the target adsorption speed, since the relative positions of the crosshair and the aiming screen remain unchanged, the terminal needs to control the camera mounted on the main control virtual object to change its direction as the crosshair moves, that is, control the camera to move at the target adsorption speed, thereby driving the aiming screen that can be observed by the camera to be modified accordingly. Since the crosshair is located at the center of the aiming screen, changes in the aiming screen will drive the crosshair to move together, so that after multiple frames of displacement, the crosshair can finally be aligned to the adsorption point of the target virtual object, that is, the process of the aiming screen observed in the sight moving synchronously with the movement of the crosshair is presented on the terminal.
[0166] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0167] The method provided in the embodiment of the present application, based on the aiming operation originally performed by the user, if it is determined that the aiming target is associated with the adsorption detection range of the target virtual object, it means that the user has an aiming intention on the target virtual object. At this time, an adsorption correction coefficient is applied to the original displacement speed, and the displacement speed is adjusted by the adsorption correction coefficient, so that the adjusted target adsorption speed is more in line with the user's aiming intention, which makes it easier for the crosshairs to focus on the aiming target more accurately, thereby greatly improving the efficiency of human-computer interaction.
[0168] Furthermore, since the above-mentioned active adsorption logic is activated based on the aiming operation manually triggered by the user, the adsorption performance is to make a fine-tuning correction to the speed or direction based on the original aiming operation, instead of aiming at the target instantly. Therefore, the adsorption performance is natural and smooth, not abrupt, and the triggering method is carried out together with the aiming operation. There will be no situation where the user does not drag the finger but the crosshairs suddenly align with a target virtual object. It is closer to the result of the player's own operation and reduces the user perception during the assisted aiming process.
[0169] Furthermore, since the displacement direction either remains unchanged or the angle is fine-tuned in the original displacement direction, it is consistent with the overall trend of the player's original aiming operation. Even if the player wants to control the crosshairs to move away from the target, the crosshairs will not be always attached to the target and cannot be dragged. Instead, it only provides a distance correction coefficient (that is, the adsorption is manifested in slower dragging, not that it cannot be dragged). The overall adsorption process will not interfere with the player's aiming intention, and the player can personalize different adsorption correction methods for different weapons (such as uniform speed correction, acceleration correction, distance correction, etc.), which is more in line with the player's aiming operation habits.
[0170] Figure 3 is a flow chart of a crosshair control method in a virtual scene provided by an embodiment of the present application. Figure 3 This embodiment is executed by an electronic device and is described by taking the electronic device as a terminal as an example. This embodiment includes the following steps:
[0171] 301. The terminal displays a target virtual object in a virtual scene.
[0172] The above step 301 is similar to the above step 201 and will not be described in detail here.
[0173] 302. In response to the aiming operation on the virtual prop, the terminal obtains the displacement direction and displacement speed of the crosshair of the aiming operation.
[0174] The above step 303 is similar to the above step 202 and will not be described in detail here.
[0175] 303. In response to the intersection between the extension line of the displacement direction and the adsorption detection range of the target virtual object, the terminal determines that the aiming target of the aiming operation is associated with the adsorption detection range.
[0176] The adsorption detection range is a spatial range or a plane area that is located outside the target virtual object and includes the target virtual object.
[0177] The "intersection" between the extension line and the adsorption detection range involved in the embodiment of the present application means that the extension line is tangent to or intersects with the adsorption detection range (spatial range or plane area), or, in other words, it is determined that there is at least one overlapping pixel between the extension line and the adsorption detection range, that is, the extension line is considered to have an intersection with the adsorption detection range, which will not be elaborated later.
[0178] Optionally, the adsorption detection range is a three-dimensional space range in the virtual scene centered on the object model of the target virtual object, and the object model of the target virtual object is located within the three-dimensional space range. In one example, the object model of the target virtual object is a capsule-shaped model, and the three-dimensional space range is a rectangular space range located outside the capsule and including the capsule.
[0179] Optionally, the adsorption detection range is a two-dimensional plane area in the aiming screen centered on the model projection of the target virtual object, and the model projection of the target virtual object refers to the two-dimensional projection image of the object model of the target virtual object in the aiming screen. In an example, the two-dimensional plane area is a rectangular plane area that includes the model projection.
[0180] In the above embodiment, two situations that can trigger the active adsorption logic are introduced. The first situation is that the crosshair is outside the adsorption detection range, but the displacement direction is close to the adsorption detection range, and the second situation is that the crosshair is within the adsorption detection range of the target virtual object (in this case, there is no need to determine the displacement direction). In the embodiment of the present application, the detection of the above two situations can be combined into the same detection logic through the detection method of step 303, that is, by detecting whether the extension line of the displacement direction intersects with the adsorption detection range, it is determined whether the aiming target of the aiming operation is associated with the adsorption detection range, thereby deciding whether the active adsorption logic needs to be triggered.
[0181] The following is a principle explanation of the above detection logic. When the crosshairs is outside the adsorption detection range, if the extension line of the crosshairs displacement direction intersects with the adsorption detection range, it can be seen that the crosshairs must have a tendency to approach the adsorption detection range, that is, the displacement direction is close to the adsorption detection range, which meets the first situation mentioned above and triggers the active adsorption logic; when the crosshairs is within the adsorption detection range, no matter which side the displacement direction of the crosshairs points to, the rays emitted from any point in the adsorption detection range to any direction (representing the extension line of the crosshairs at any position pointing to any displacement direction) must intersect with the adsorption detection range, so it meets the second situation mentioned above and triggers the active adsorption logic. In other words, the detection method of the above step 303 can fully detect the two situations that can trigger the active adsorption logic involved in the above embodiment only by detecting whether the extension line of the displacement direction intersects with the adsorption detection range, so that when the extension line of the displacement direction intersects with the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range, and enters the following step 304. When the extension line of the displacement direction does not intersect with the adsorption detection range, it means that the crosshairs is outside the adsorption detection range and the displacement direction is away from the target virtual object. It is determined that the aiming target has no association with the adsorption detection range, that is, the user has no intention to aim at the target virtual object, and the process exits.
[0182] In the following, for two scenarios where the adsorption detection range is a three-dimensional space range or a two-dimensional plane area, how to determine whether the extension line of the displacement direction intersects with the adsorption detection range will be described respectively.
[0183] Optionally, if the adsorption detection range is a three-dimensional space range mounted on the target virtual object in the virtual scene, "mounting" here means that the adsorption detection range moves with the movement of the target virtual object. For example, the adsorption detection range is a detection box mounted on the object model of the target virtual object. In addition, the shape of the three-dimensional space range may be consistent with or inconsistent with the shape of the target virtual object. Here, the rectangular space range is used as an example. The embodiment of the present application does not specifically limit the shape of the adsorption detection range. In the case where the adsorption detection range is a three-dimensional space range, since the displacement direction of the crosshairs is a two-dimensional plane vector determined based on the aiming screen, the displacement direction of the crosshairs can be reversely projected into the virtual scene, that is, the two-dimensional plane vector is converted into a three-dimensional direction vector. The direction vector represents the displacement direction of the expected landing point of the projectile of the virtual prop indicated by the crosshairs in the virtual scene when the crosshairs moves in the displacement direction determined in the aiming screen. The reverse projection method can be regarded as a coordinate conversion process, such as converting the direction vector from the screen coordinate system to the world coordinate system. Next, since the adsorption detection range is the three-dimensional space range in the virtual scene, and the direction vector is a three-dimensional vector in the virtual scene, an extension line can be drawn for the direction vector in the virtual scene. It should be noted that since the direction vector is a directed vector, the extension line is a ray starting from the starting point of the direction vector rather than a straight line (i.e., only the forward extension line is determined, and the reverse extension line is not considered). Then, it is determined whether the extension line of the direction vector intersects with the adsorption detection range mounted on the target virtual object in the virtual scene. The existence of an intersection means whether the extension line of the direction vector passes through the adsorption detection range, or whether the extension line of the direction vector intersects with the adsorption detection range.
[0184] Optionally, if the adsorption detection range is a two-dimensional plane area in the aiming screen in which the target virtual object is nested, the shape of the two-dimensional plane area may be consistent with or inconsistent with the shape of the target virtual object. Here, a rectangular plane area is used as an example for explanation. The embodiment of the present application does not specifically limit the shape of the adsorption detection range. In the case where the adsorption detection range is a two-dimensional plane area, only because the displacement direction of the crosshairs itself is a two-dimensional plane vector in the same aiming screen, and because the aiming screen itself contains the two-dimensional projection image of the target virtual object in the virtual scene in the aiming screen, no additional processing is required. It is only necessary to determine the extension line of the plane vector of the displacement direction in the aiming screen (here only refers to the forward extension line), and then determine whether the extension line has an intersection with the two-dimensional plane area. The existence of an intersection means whether the extension line of the plane vector intersects with the boundary of the two-dimensional plane area, or whether the extension line of the plane vector passes through the two-dimensional plane area.
[0185] Figure 4is a schematic diagram of the principle of an adsorption detection method provided in an embodiment of the present application, such as Figure 4 As shown, in an exemplary scenario, taking the adsorption detection range as a two-dimensional plane area as an example, a corresponding adsorption detection range 410 is determined for the target virtual object 400 in the aiming screen, and the adsorption detection range 410 is also called the adsorption frame or adsorption detection frame of the target virtual object. For the aiming star 420, an extension line 430 is drawn along its displacement direction. When the extension line 430 intersects with the adsorption detection range 410, for example, the extension line 430 intersects with the boundary of the adsorption detection range 410, it is determined that the aiming target is associated with the adsorption detection range, and the following step 304 is entered. When the extension line 430 does not intersect with the adsorption detection range 410, it is determined that the aiming target has no association with the adsorption detection range, and the process is exited.
[0186] 304. The terminal obtains an adsorption point corresponding to the crosshair in the target virtual object.
[0187] When it is determined through step 303 that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object, it means that the user has an aiming intention with the target virtual object as the aiming target, so the terminal can execute steps 304-305 to obtain an adsorption correction coefficient matching the displacement direction.
[0188] When obtaining the adsorption correction coefficient, it can be determined whether to adsorb to the head or torso of the target virtual object based on the horizontal height of the crosshair, wherein the horizontal height refers to the height difference between the crosshair and the horizon.
[0189] In some embodiments, the shoulder line of the target virtual object is used as the target dividing line to divide the head and torso of the target virtual object. In other words, the target dividing line is used to distinguish the head and torso of the target virtual object. Therefore, in the object model of the target virtual object, the model part above the target dividing line is the head, and the model part below the target dividing line is the torso.
[0190] Next, the horizontal height of the crosshair is compared with the horizontal height of the target dividing line. Optionally, in response to the horizontal height of the crosshair being greater than or equal to the horizontal height of the target dividing line, the head bone point of the target virtual object is determined to be the adsorption point, wherein the head bone point refers to the bone hanging point of the model head mounted on the target virtual object, and the head bone point is configured by a technician, for example, the head bone point is the lowest point of the mandible of the target virtual object, or the head bone point is the center point of the head of the target virtual object, etc. The embodiment of the present application does not specifically limit the head bone point. Optionally, in response to the horizontal height of the crosshairs being less than the horizontal height of the target dividing line, a body skeleton point of the target virtual object is determined to be the adsorption point, wherein the body skeleton point refers to a skeleton hanging point of a model body (such as a spine) mounted on the target virtual object. Schematically, a plurality of preset skeleton hanging points (these skeleton hanging points have different horizontal heights) are mounted on the spine, and a skeleton hanging point closest to the horizontal height of the crosshairs is selected from the plurality of skeleton hanging points as the body skeleton point. Schematically, each position on the spine can be sampled as a body skeleton point. At this time, sampling is performed on the vertical central axis of the target virtual object, and a skeleton point on the vertical central axis with the same horizontal height as the crosshairs is sampled as the body skeleton point. In other words, at this time, the body skeleton point is a skeleton point on the vertical central axis of the target virtual object with the same horizontal height as the crosshairs.
[0191] Figure 5 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application, such as Figure 5 As shown, an object model 500 of a target virtual object is shown. At this time, the object model 500 corresponds to a rectangular adsorption detection range 510, and the adsorption detection range 510 is also called an adsorption frame or adsorption detection frame of the target virtual object. In the object model 500, the shoulder line is used as the target dividing line 501, and the head and body of the target virtual object can be divided, wherein the model part located above the target dividing line 501 in the object model 500 is the head, and the model part located below the target dividing line 501 is the body. Further, the adsorption detection range 510 is also divided into a head adsorption area 511 and a body adsorption area 512 by the target dividing line 501, that is, when the horizontal height of the crosshairs is greater than or equal to the horizontal height of the target dividing line 501, the crosshairs will be adsorbed to a preset head bone point in the head adsorption area 511, and when the horizontal height of the crosshairs is less than the horizontal height of the target dividing line 501, the crosshairs will be adsorbed to a body bone point in the body adsorption area 512 that is the same as the horizontal height of the crosshairs.
[0192] In the above process, by determining the adsorption point that matches the horizontal height of the crosshair from the bone hanging points mounted on the object model of the target virtual object according to the horizontal height of the crosshair, the adsorption of the crosshair can be smoother and more natural. Because if no separate adsorption point is set for the head, but the adsorption point at the same height as the crosshair is determined from the vertical central axis, the horizontal height of the crosshair may exceed the top of the object model, resulting in the adsorption point of the crosshair being outside the object model. In this case, the adsorption effect will be abrupt and unnatural. Therefore, by setting different adsorption point determination logics for the head and torso, the smoothness and naturalness of the adsorption of the crosshair can be improved.
[0193] In other embodiments, another method of obtaining the adsorption point corresponding to the crosshair is provided, that is, if the extension line of the displacement direction of the crosshair intersects with the vertical center axis of the target virtual object, the intersection of the extension line and the vertical center axis is used as the adsorption point, otherwise, the processing logic of determining whether the head bone point or the body bone point is used as the adsorption point according to the horizontal height of the crosshair in the above description is performed.
[0194] 305. The terminal obtains an adsorption correction coefficient based on the distances between the crosshair and the adsorption point in the current frame and the previous frame.
[0195] When the adsorption point is determined as described above, the terminal obtains the distance between the crosshair in the current frame (i.e., the screen frame at the current moment) and the adsorption point, as well as the distance between the previous frame of the current frame and the adsorption point. For example, the terminal calculates the distance between the crosshair and the adsorption point frame by frame, thereby obtaining the two distances calculated for the current frame corresponding to the current moment and the previous frame.
[0196] Optionally, in the case where the adsorption point is a head bone point, the straight-line distance between the position coordinates of the crosshair and the position coordinates of the head bone point is directly obtained, and the straight-line distance between the two points is the distance between the crosshair and the adsorption point, that is, d=distance(crosshair, head bone point), where d represents the distance between the crosshair and the adsorption point, and distance represents the straight-line distance between the two points in the brackets. The terminal calculates the straight-line distance between the crosshair and the head bone point for the current frame and the previous frame respectively.
[0197] Optionally, for the case where the adsorption point is a body bone point, the straight-line distance between the two points can be used as the distance between the crosshairs and the adsorption point for the current frame and the previous frame, and the method of obtaining this distance will not be described here; in addition, in this case, another method of obtaining the distance between the crosshairs and the adsorption point is also involved, that is, in the current frame and the previous frame, the respective offsets of the crosshairs and the adsorption point are determined in the horizontal and vertical directions, and the larger offset is used as the distance between the crosshairs and the adsorption point.
[0198] In other words, the terminal obtains the lateral offset and longitudinal offset of the crosshair to the target virtual object, the lateral offset refers to the distance between the crosshair and the vertical center axis of the target virtual object, that is, the absolute value of the horizontal coordinate difference between the horizontal coordinate of the crosshair and the horizontal coordinate of the vertical center axis is determined as the lateral offset, and the longitudinal offset refers to the distance between the crosshair and the horizontal center axis of the target virtual object, that is, the absolute value of the vertical coordinate difference between the vertical coordinate of the crosshair and the vertical coordinate of the horizontal center axis is determined as the longitudinal offset, and then the magnitude relationship of the lateral offset and the longitudinal offset is compared, and then the maximum value of the lateral offset and the longitudinal offset is determined as the distance between the crosshair and the adsorption point. In one example, the horizontal coordinate, i.e., the horizontal coordinate, is represented by the X coordinate, and it is assumed that the lateral offset is greater than the longitudinal offset. At this time, the maximum value of the lateral offset and the longitudinal offset is the lateral offset, and at this time d=Abs(vertical center axis X coordinate-crosshair X coordinate), d represents the distance between the crosshair and the adsorption point, and Abs represents the absolute value of the value in the brackets.
[0199] In the above process, since the head bone points are usually fixed, the straight-line distance between the two points can accurately show whether the crosshairs and the adsorption point are close or far away, while the body bone points will change dynamically with the horizontal height of the crosshairs. Therefore, when both the crosshairs and the adsorption points (body bone points) are changing, if the straight-line distance between the two points is still used as the distance between the crosshairs and the adsorption points, the accuracy of the judgment of whether the crosshairs and the adsorption points are close or far away will be reduced, and further the accuracy of the configuration of the adsorption correction coefficient will be reduced. Therefore, by calculating the lateral offset and the longitudinal offset, and taking the larger offset between the two as the distance between the crosshairs and the adsorption point, it is possible to finely judge whether the crosshairs and the adsorption point are close or far away in the faster moving axis, thereby making accurate configuration of the adsorption correction coefficient.
[0200] In some embodiments, after the distance d between the crosshair and the adsorption point is obtained for the current frame based on the above method, and the distance dLastFrame between the crosshair and the adsorption point is also obtained for the previous frame based on the above method, if the distance between the crosshair and the adsorption point in the current frame is less than the distance between the crosshair and the adsorption point in the previous frame, that is, d<dLastFrame, execute the following step 305-A, using the first correction coefficient as the adsorption correction coefficient; if the distance between the crosshair and the adsorption point in the current frame is greater than or equal to the distance between the crosshair and the adsorption point in the previous frame, that is, d≥dLastFrame, execute the following step 305-B, using the second correction coefficient as the adsorption correction coefficient.
[0201] 305-A. In response to the distance between the crosshair and the adsorption point in the current frame being smaller than the distance between the crosshair and the adsorption point in the previous frame, determining the adsorption correction coefficient to be the first correction coefficient.
[0202] In the above process, since the distance between the crosshair and the adsorption point in the current frame is smaller than the distance between the crosshair and the adsorption point in the previous frame, it means that the crosshair is gradually approaching the adsorption point on the target virtual object, and the displacement speed needs to be accelerated so that the crosshair can be adsorbed to the adsorption point faster. Therefore, the first correction coefficient can be used as the adsorption correction coefficient, wherein the first correction coefficient is used to increase the displacement speed of the crosshair, also known as the acceleration correction coefficient, the approach correction coefficient, etc., and the embodiment of the present application does not specifically limit this.
[0203] In some embodiments, when obtaining the first correction coefficient, the following steps A1) to A3) are performed:
[0204] A1) Based on the displacement direction, an adsorption acceleration intensity is determined, and the adsorption acceleration intensity is used to characterize the degree of acceleration of the displacement speed.
[0205] In some embodiments, the adsorption acceleration intensity for this time can be selected from pre-configured acceleration intensity according to whether the extension line of the displacement direction (i.e., the positive extension line) intersects with the central axis of the target virtual object. Optionally, the technician pre-configures the first acceleration intensity Adsorption1 and the second acceleration intensity Adsorption2 on the server side, and the first acceleration intensity Adsorption1 and the second acceleration intensity Adsorption2 are values greater than 0. In addition, the technician can configure more or less acceleration intensity according to business needs, and the embodiments of the present application do not specifically limit this.
[0206] In an exemplary scenario, taking the example that the second acceleration intensity Adsorption2 is less than the first acceleration intensity Adsorption1, when the extension line intersects with the central axis of the target virtual object, it indicates that there is a stronger aiming intention for the target virtual object, and thus the adsorption acceleration intensity is determined to be the first acceleration intensity Adsorption1 with a larger value; when the extension line does not intersect with the central axis of the target virtual object, it indicates that there is a weaker aiming intention for the target virtual object, and thus the adsorption acceleration intensity is determined to be the second acceleration intensity Adsorption2 with a smaller value.
[0207] Optionally, since the target virtual object actually includes a horizontal central axis and a vertical central axis, in the above process of determining whether the extension line intersects with the central axis of the target virtual object, it can be determined whether the extension line intersects with either the horizontal central axis or the vertical central axis, that is, when the extension line intersects with the horizontal central axis, or intersects with the vertical central axis, or intersects with both the horizontal central axis and the vertical central axis, it is determined that the extension line intersects with the central axis of the target virtual object, and when the extension line does not intersect with either the horizontal central axis or the vertical central axis, it is determined that the extension line does not intersect with the central axis of the target virtual object. Optionally, it is also possible to determine only whether the extension line intersects with the vertical central axis, or only determine whether the extension line intersects with the horizontal central axis, and the embodiments of the present application do not specifically limit this.
[0208] Figure 6 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application, such as Figure 6 As shown, for the object model 600 of the target virtual object, there is a rectangular adsorption detection range 610 outside, and the target virtual object has a vertical center axis 601 and a horizontal center axis 602. Assuming that the crosshair 620 is located inside the adsorption detection range 610 in the current frame, an extension line 630 is drawn along the displacement direction of the crosshair 620, and at this time, the extension line 630 intersects with the vertical center axis 601 of the target virtual object, so the adsorption acceleration intensity is determined to be the first acceleration intensity Adsorption1 with a larger value.
[0209] Figure 7 is a schematic diagram of a principle of an object model of a target virtual object provided in an embodiment of the present application, such as Figure 7 As shown, for the object model 700 of the target virtual object, there is a rectangular adsorption detection range 710 outside, and the target virtual object has a vertical center axis 701 and a horizontal center axis 702. Assuming that the crosshair 720 is located inside the adsorption detection range 710 in the current frame, an extension line 730 is drawn along the displacement direction of the crosshair 720. At this time, the extension line 730 does not intersect with the vertical center axis 701 and the horizontal center axis 702 of the target virtual object. It should be noted that the horizontal center axis 701 and the vertical center axis 702 are both terminated at the boundary of the adsorption detection range 710 and will not extend infinitely in the aiming picture, that is, the horizontal center axis 701 and the vertical center axis 702 are both line segments that stop extending at the boundary of the adsorption detection range 710, so the adsorption acceleration intensity is determined to be the second acceleration intensity Adsorption2 with a smaller value.
[0210] In the above process, by selecting different sizes of adsorption acceleration strength according to different situations, the adsorption acceleration strength can be more compatible with the user's aiming intention for the target virtual object, thereby achieving a more natural and smooth adsorption effect.
[0211] A2) obtaining an adsorption acceleration type corresponding to the virtual prop, wherein the adsorption acceleration type is used to characterize a method of accelerating the displacement speed.
[0212] In some embodiments, a technician configures different default adsorption acceleration types for different virtual props on the server side. Optionally, if the user has not set the adsorption acceleration type on the terminal, the default adsorption acceleration type corresponding to the virtual prop is determined. If the user has personalized the adsorption acceleration type on the terminal, the adsorption acceleration type of the virtual prop that the user has customized and modified is determined. The embodiment of the present application does not specifically limit the method for obtaining the adsorption acceleration type.
[0213] In some embodiments, the terminal associates and stores the prop identification (ID) of the virtual prop with the corresponding adsorption acceleration type K. At this time, if the user does not set the adsorption acceleration type, the default adsorption deceleration type K is associated and stored with the prop ID of each virtual prop. If the user has personalized the adsorption acceleration type K corresponding to any virtual prop, the adsorption acceleration type K associated and stored with the prop ID of the virtual prop will be modified in the cache. Then, when obtaining the adsorption acceleration type of the current virtual prop, it is only necessary to use the prop ID of the currently used virtual prop as an index to query the adsorption acceleration type K stored in association with the index.
[0214] In some embodiments, the adsorption acceleration type K includes at least one of the following: a uniform speed correction type K1, which is used to increase the displacement speed; an acceleration correction type K2, which is used to set a preset acceleration for the displacement speed; a distance correction type K3, which is used to set a variable acceleration for the displacement speed, and the variable acceleration is negatively correlated with the distance between the crosshairs and the adsorption point.
[0215] Optionally, when the above-mentioned uniform speed correction type K1 is selected, the displacement speed after the adsorption acceleration strength correction will be scaled by a K1 ratio on the basis of acceleration with the adsorption acceleration strength, thereby directly increasing the displacement speed. This is equivalent to making the crosshairs move at a uniform speed at a greater speed.
[0216] Optionally, when the above-mentioned acceleration correction type K2 is selected, a preset acceleration K2 will be applied to the displacement speed after correction by the adsorption acceleration intensity on the basis of acceleration with the adsorption acceleration intensity, thereby applying a fixed preset acceleration to the displacement speed. At this time, it is equivalent to making the crosshairs move with uniform acceleration under the action of the preset acceleration.
[0217] Optionally, when the above-mentioned distance correction type K3 is selected, a variable acceleration K3 that varies with the distance is applied to the displacement speed after the correction of the adsorption acceleration strength on the basis of acceleration with the adsorption acceleration strength, thereby applying a variable acceleration that varies with the distance between the crosshairs and the adsorption point to the displacement speed. At this time, it is equivalent to making the crosshairs move with variable acceleration under the action of the variable acceleration. For example, the variable acceleration is negatively correlated with the distance between the crosshairs and the adsorption point, so that when the crosshairs is closer to the adsorption point, the variable acceleration value is larger, and when the crosshairs is farther from the adsorption point, the variable acceleration value is smaller.
[0218] In the above process, by configuring multiple adsorption acceleration types for different virtual props and supporting users to personalize the adsorption acceleration types, users can set the adsorption acceleration type that best feels for different virtual props, thereby optimizing the adsorption effect and improving the user experience.
[0219] A3) determining the first correction coefficient based on the adsorption acceleration intensity and the adsorption acceleration type.
[0220] In some embodiments, the adsorption acceleration strength is integrated with the adsorption acceleration type to obtain the first correction coefficient. For example, the adsorption acceleration strength Adsorption is multiplied by the adsorption acceleration type K to obtain the first correction coefficient, that is, the first correction coefficient = Adsorption × K. In one example, the adsorption acceleration strength Adsorption is flexibly configured according to the displacement direction of the crosshair, and its value includes Adsorption1 or Adsorption2. The adsorption acceleration type K is flexibly configured according to the default settings of the currently used virtual props or the user's personalized settings, and its value includes K1, K2 or K3. At this time, the adsorption acceleration strength Adsorption is equivalent to a basic acceleration factor, and the adsorption acceleration type K is equivalent to an adjustment factor.
[0221] Optionally, the terminal may also only execute the above step A1 and directly determine the adsorption acceleration intensity Adsorption as the first correction coefficient, or only execute the above step A2 and determine the adsorption acceleration type K as the first correction coefficient, which is not specifically limited in the embodiment of the present application.
[0222] 305-B. In response to the distance between the crosshair and the adsorption point in the current frame being greater than or equal to the distance between the crosshair and the adsorption point in the previous frame, determining the adsorption correction coefficient to be a second correction coefficient.
[0223] In the above process, since the distance between the crosshair and the adsorption point in the current frame is greater than or equal to the distance between the crosshair and the adsorption point in the previous frame, it means that the crosshair is gradually moving away from the adsorption point on the target virtual object, and the displacement speed needs to be decelerated to provide a certain resistance to prevent the user from misoperating or sliding excessively on the screen. Therefore, the second correction coefficient can be used as the adsorption correction coefficient, wherein the second correction coefficient is used to reduce the displacement speed of the crosshair, also known as the deceleration correction coefficient, the distance correction coefficient, etc., and the embodiments of the present application do not specifically limit this.
[0224] In some embodiments, when obtaining the second correction coefficient, a correction coefficient curve can be determined first, the horizontal coordinate of the correction coefficient curve is used to indicate the relative displacement of the crosshairs and the adsorption point between two adjacent frames, and the relative displacement is used to indicate the distance difference between the crosshairs and the adsorption point between two adjacent frames. The vertical coordinate of the correction coefficient curve is used to indicate the value of the second correction coefficient. Therefore, after obtaining the distance between the crosshairs and the adsorption point in the current frame and the distance between the crosshairs and the adsorption point in the previous frame, the second correction coefficient can be sampled from the correction coefficient curve based on the distance difference between the above two distances.
[0225] Figure 8 is a schematic diagram of a correction coefficient curve provided in an embodiment of the present application, such as Figure 8 As shown, the distance between the crosshair in the current frame and the adsorption point is used as the horizontal coordinate, and the vertical coordinate calculated after substituting into the correction coefficient curve 800 is the value of the second correction coefficient in the current frame.
[0226] Schematically, factorAwayMin represents the second correction coefficient, PC->RotationInputCache.Yaw represents the relative displacement between the crosshair and the adsorption point in the current frame and the previous frame (i.e., the distance difference between the crosshair and the adsorption point in the current frame and the distance between the crosshair and the adsorption point in the previous frame), the function FMath::Abs() represents taking the absolute value of the value in the brackets, and the function LockDegressFactorAwayMid->GetFloatValue() represents substituting the value in the brackets into the abscissa of the correction coefficient curve LockDegressFactorAwayMid and then calculating its corresponding ordinate. Therefore, the above process of sampling the correction coefficient curve to obtain the second correction coefficient can be expressed as the following code:
[0227] factorAwayMin=LockDegressFactorAwayMid->GetFloatValue(FMath::Abs(PC->RotationInputCache.Yaw));
[0228] 306. The terminal adjusts the displacement speed of the crosshair based on the adsorption correction coefficient to obtain a vector magnitude of the target adsorption speed.
[0229] In some embodiments, the "target adsorption speed" involved in the embodiments of the present application is a speed vector, that is, the target adsorption speed not only indicates the speed of the movement of the crosshairs (controlled by the vector size), but also indicates the direction of the movement of the crosshairs (controlled by the vector direction).
[0230] Optionally, under the active adsorption logic, only the vector size of the target adsorption speed is adjusted without changing the vector direction, that is, the vector size of the speed vector (i.e., the rate value) is obtained by adjusting the displacement speed based on the adsorption correction coefficient. In other words, the target adsorption speed is obtained by adjusting the displacement speed by the adsorption correction coefficient, and the vector direction of the speed vector is determined as the displacement direction of the original crosshair, skipping the following step 307 and directly entering step 308, which is equivalent to applying an adjustment coefficient to the original displacement speed of the crosshair without changing the displacement direction, so that without changing the user's own aiming intention for the displacement direction, the adjustment coefficient is used to facilitate the crosshair to be quickly dragged to the target virtual object, i.e., the aiming target.
[0231] In some embodiments, the terminal adjusts the displacement speed based on the adsorption correction coefficient to obtain the target adsorption speed. Optionally, when the distance between the crosshair and the adsorption point in the current frame is less than the distance between the crosshair and the adsorption point in the previous frame, it means that the displacement direction of the crosshair is close to the adsorption detection range, and the first correction coefficient obtained in the above step 305-A is used to accelerate the displacement speed to speed up the speed at which the crosshair approaches the target virtual object, making it convenient for the crosshair to quickly align with the target virtual object. When the distance between the crosshair and the adsorption point in the current frame is greater than or equal to the distance between the crosshair and the adsorption point in the previous frame, it means that the displacement direction of the crosshair is far away from the adsorption detection range, and the second correction coefficient obtained in the above step 305-B is used to decelerate the displacement speed to slow down the speed at which the crosshair moves away from the target virtual object, thereby improving the situation where the user misoperates due to excessive sliding when adjusting the crosshair.
[0232] 307. The terminal adjusts the displacement direction based on the adsorption point of the crosshair to obtain the vector direction of the target adsorption speed.
[0233] In the embodiment of the present application, an example is taken in which not only the vector magnitude of the target adsorption speed but also the vector direction of the target adsorption speed is adjusted under the active adsorption logic, that is, the vector magnitude of the speed vector (i.e., the rate value) is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and the vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshairs. This is equivalent to applying an adjustment coefficient to the original displacement speed of the crosshairs and an adjustment angle to the original displacement direction of the crosshairs, so that when the overall displacement trend remains unchanged, both the displacement direction and the displacement speed are fine-tuned, so that the crosshairs can be better adsorbed to the target virtual object, i.e., the aiming target, quickly.
[0234] In some embodiments, for each frame in the process of displacement of the crosshair, after real-time detection is performed to determine the displacement speed and displacement direction of the crosshair of the current frame, the terminal adjusts the displacement speed based on the adsorption correction coefficient through the above step 306 to obtain the target adsorption speed, that is, the vector size of the velocity vector. Then, in this step 307, the target direction from the crosshair to the adsorption point is obtained, so that an initial vector can be determined based on the original displacement speed and displacement direction, and a correction vector can be determined based on the vector size obtained by the above adjustment and the target direction. The initial vector and the correction vector are vector-summed to obtain a target vector. The direction of this target vector is the target adsorption speed, that is, the vector direction of the velocity vector. Therefore, according to the vector size and vector direction determined above, a velocity vector, that is, the target adsorption speed, can be uniquely determined. This target adsorption speed can characterize the velocity vector of the crosshair of the current frame. For the next frame, since the displacement direction and displacement speed have changed, it is necessary to re-execute steps 302-307 to determine the velocity vector of the crosshair of the next frame, and so on, which will not be repeated here. It should be noted that if the displacement direction and the target direction are the same, the vector direction of the target vector is also equal to the displacement direction and the target direction, that is, the displacement direction of the crosshair will not change.
[0235] 308. The terminal displays that the crosshair moves based on a speed vector determined by the vector magnitude and the vector direction, that is, a target adsorption speed.
[0236] In some embodiments, when the crosshairs are not fixed at the center point of the aiming picture, the crosshairs are directly displayed in the aiming picture moving along the displacement direction at the target adsorption speed adjusted by the adsorption correction coefficient.
[0237] In other embodiments, when the crosshair is always fixed at the center point of the aiming screen, when the crosshair is controlled to move along the displacement direction at the target adsorption speed, since the relative positions of the crosshair and the aiming screen remain unchanged, the terminal needs to control the camera mounted on the main control virtual object to change its direction as the crosshair moves, that is, control the camera to move at the target adsorption speed, thereby driving the aiming screen that can be observed by the camera to be modified accordingly. Since the crosshair is located at the center of the aiming screen, changes in the aiming screen will drive the crosshair to move together, so that after multiple frames of displacement, the crosshair can finally be aligned to the adsorption point of the target virtual object, that is, the process of the aiming screen observed in the sight moving synchronously with the movement of the crosshair is presented on the terminal.
[0238] Fig. 9 It is a schematic diagram of the principle of an active adsorption method provided in an embodiment of the present application, such as Fig. 9 As shown, when it is determined that the aiming target is associated with the adsorption detection range 910 of the target virtual object 900 based on the method of the above step 303, the active adsorption logic of the crosshair is triggered, and the active adsorption logic means that the crosshair 920 will be gradually adsorbed to the adsorption point 901 that matches the displacement direction indicated by the user. Please refer to the description of the above step 304 for the acquisition method of the adsorption point 901. Here, the adsorption point 901 is taken as the intersection of the extension line of the displacement direction of the crosshair 920 and the vertical center axis of the target virtual object 900. Schematically, the intersection happens to be the head bone point of the target virtual object 900. At the same time, under the active adsorption logic, the corresponding adsorption correction coefficient is determined based on the above step 305. Since the displacement direction of the crosshairs 920 is close to the adsorption detection range 910, the first correction coefficient involved in the above step 305-A is used as the adsorption correction coefficient to accelerate the original displacement speed of the crosshairs 920 to a certain extent, thereby speeding up the speed at which the crosshairs 920 is adsorbed to the adsorption point 901.
[0239] In some embodiments, a possible failure condition is provided for the active adsorption mode, that is, when the user moves the crosshair from the adsorption detection range of the target virtual object to the outside of the adsorption detection range and maintains the first duration, the active adsorption logic for the crosshair is canceled, wherein the first duration is any duration greater than 0, such as 0.5 seconds, or 0.3 seconds, etc. In other words, since the user's aiming operation on the virtual prop is a real-time dynamic process, each frame will adjust the displacement speed at the current moment based on the latest real-time adsorption correction coefficient. On this basis, in response to the crosshair moving from the adsorption detection range to the outside of the adsorption detection range, and the duration of being outside the adsorption detection range exceeds the first duration, the correction of the displacement speed by the adsorption correction coefficient is canceled. At this time, since there is no need to correct the displacement speed, it is only necessary to control the crosshair to move in the displacement direction at the current moment according to the displacement speed at the current moment, which will not be elaborated here.
[0240] Fig.10 is a schematic diagram of the principle of failure conditions of an active adsorption method provided in an embodiment of the present application, such as Fig.10 As shown, when it is determined that the aiming target is associated with the adsorption detection range 1010 of the target virtual object 1000 based on the method of the above step 303, after the active adsorption logic of the crosshairs is triggered, the adsorption correction coefficient calculated in real time will be used to adjust the displacement speed of each frame, and the active adsorption logic will continue to take effect. If it is detected in a certain frame that the crosshairs 1020 moves from the adsorption detection range 1010 to the outside of the adsorption detection range 1010, the time length of the crosshairs 1020 being outside the adsorption detection range 1010 is timed until the time length of the crosshairs 1020 being outside the adsorption detection range 1010 exceeds the first time length, the active adsorption logic is invalidated, that is, the adsorption correction coefficient is no longer calculated in real time, and the adsorption correction coefficient is no longer used to adjust the displacement speed of each frame. It should be noted that after the active adsorption logic fails, if it is re-determined that the triggering condition (i.e., the effective condition) of the active adsorption logic is met, the active adsorption logic will be turned on again.
[0241] Below, the interface performance of the active adsorption method will be introduced in conjunction with a possible game interface of an FPS game. The active adsorption method provided in the embodiment of the present application can improve the operating accuracy of the user using virtual props to aim at the target on the mobile terminal, and can achieve assisted aiming along the movement trend of the crosshairs actively operated by the user. By accelerating or decelerating the movement of the crosshairs, the adsorption can help the user quickly align the crosshairs with the target on the mobile terminal, and make the adsorption performance of assisted aiming more natural, and can be simultaneously applicable to the different adsorption performances required by multiple different types of virtual props.
[0242] Fig.11is a schematic diagram of an interface of a aiming screen provided in an embodiment of the present application, such as Fig.11 As shown, a aiming screen 1100 is displayed on the terminal screen, and a virtual prop 1101 and a crosshair 1102 are displayed in the aiming screen 1100. The virtual prop 1101 is the virtual prop currently used by the main control virtual object, and the crosshair 1102 is fixed to the center point of the aiming screen 1100. Schematically, a launch control 1103 is also displayed in the aiming screen 1100. The launch control 1103 is commonly known as a fire button. The user can perform a trigger operation on the launch control 1103 to trigger the main control virtual object to control the virtual prop to launch the corresponding missile, so that the missile flies to the landing point indicated by the crosshair. It can be seen that a target virtual object 1104 is also displayed in the aiming screen 1100. When the user actively aims at the target virtual object 1104, the user needs to control the crosshairs 1102 to be pulled toward the target virtual object 1104. The terminal determines the displacement direction of the crosshairs for each frame. When the extension line of the displacement direction intersects with the adsorption detection range of the target virtual object 1104, the active adsorption logic of the crosshairs 1102 is triggered. At this time, the crosshairs 1102 will be affected by an adsorption force pointing to the target virtual object 1104. The crosshairs 1102 will obtain an adsorption correction coefficient pointing to the target virtual object 1104 based on the original displacement speed.
[0243] Fig.12 This is a schematic diagram of an aiming screen interface provided in an embodiment of the present application. Please refer to Fig.12 , the aiming picture 1200 is displayed on the terminal screen, Fig.11 On the basis of triggering the active adsorption logic of the crosshair 1102, the displacement speed of the crosshair 1102 will be affected by the adsorption correction coefficient. Taking the adsorption correction coefficient as the first correction coefficient as an example, the first correction coefficient will provide an acceleration to the displacement speed, so that the crosshair 1102 moves faster to the adsorbed target, that is, the target virtual object 1104, until the crosshair 1102 moves to the target virtual object 1104, as shown in FIG. Fig.12 As shown, it can be seen that the crosshair 1102 has overlapped with the target virtual object 1104. At this time, the user can press the firing control 1103 to fire the virtual prop, play the firing animation, and control the missile corresponding to the virtual prop to fly toward the target virtual object 1104 indicated by the crosshair 1102. When the missile hits the target virtual object 1104, a corresponding effect can be generated, for example, deducting the virtual health value of the target virtual object 1104.
[0244] The active adsorption method introduced in the embodiments of the present application is applicable to both the scoped shooting mode and the non-scoped shooting mode, and is applicable to both the aiming screen under the first-person perspective and the aiming screen under the third-person perspective. The adsorption acceleration strength and adsorption acceleration type of different virtual props can be pre-configured or personalized by the server to adapt to the aiming habits of different users. It has good universality and is easy to promote and apply in different scenarios.
[0245] Furthermore, when the crosshair is adsorbed, it is based on the aiming operation originally performed by the user (i.e., the operation of adjusting the crosshair). If the user manually aims the crosshair at the target virtual object, a directional acceleration is provided to the displacement speed in the original displacement direction, which is consistent with the trend of the user's original aiming operation, rather than instantly aiming the crosshair at the target virtual object. Therefore, the adsorption effect of the crosshair is natural, smooth, and not abrupt, and the active adsorption method is triggered during the user's adjustment of the crosshair, and the triggering method is also natural, smooth, and not abrupt, which is more in line with the aiming result of the user's own manual operation. And when the user manually separates the crosshair from the target virtual object, the displacement direction of the crosshair will not be changed, but a directional deceleration will be provided to the original displacement speed, that is, the dragging of the crosshair will be slowed down, and the situation where the crosshair cannot be dragged over and is always adsorbed on the target virtual object will not be caused, that is, the adsorption performance will not cause a pull with the user's subjective aiming intention.
[0246] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0247] The method provided in the embodiment of the present application, based on the aiming operation originally performed by the user, if it is determined that the aiming target is associated with the adsorption detection range of the target virtual object, it means that the user has an aiming intention on the target virtual object. At this time, an adsorption correction coefficient is applied to the original displacement speed, and the displacement speed is adjusted by the adsorption correction coefficient, so that the adjusted target adsorption speed is more in line with the user's aiming intention, which makes it easier for the crosshairs to focus on the aiming target more accurately, thereby greatly improving the efficiency of human-computer interaction.
[0248] In the above embodiment, the triggering conditions of the active adsorption mode and how to correct the displacement speed according to the adsorption correction coefficient are described in detail. In the embodiment of the present application, it also involves an adsorption logic that is not based on the aiming operation actively started by the user (called passive adsorption logic), that is, when the crosshairs is within the adsorption detection range of the first virtual object, the passive adsorption logic of the crosshairs is triggered. In other words, the active adsorption logic depends on the aiming operation performed by the user. When the user does not perform the aiming operation, the active adsorption logic will not be turned on, while the passive adsorption logic does not depend on the aiming operation performed by the user. When the user does not perform the aiming operation, as long as the crosshairs is within the adsorption detection range of the first virtual object, the passive adsorption logic of the crosshairs can be triggered.
[0249] In some embodiments, in response to the crosshairs being within the adsorption detection range of the first virtual object, the terminal controls the crosshairs to automatically move to the first virtual object, wherein the first virtual object is a virtual object that supports adsorption in the virtual scene, and the first virtual object includes the target virtual object involved in the above embodiments. The process of detecting whether the crosshairs is within the adsorption detection range can be performed for each frame in the game match to determine whether the crosshairs is within the adsorption detection range of any first virtual object, thereby deciding whether to trigger the passive adsorption logic. For the case where the adsorption detection range is a three-dimensional space range, the above detection process refers to detecting whether the projection point of the crosshairs reversely projected into the virtual scene is within the three-dimensional space range. For the case where the adsorption detection range is a two-dimensional plane area, the above detection process refers to detecting whether the crosshairs is within the two-dimensional plane area corresponding to the first virtual object in the aiming screen. The embodiment of the present application does not specifically limit the method for detecting whether the crosshairs is within the adsorption detection range.
[0250] In some embodiments, the process of controlling the crosshairs to move to the first virtual object refers to controlling the crosshairs to be adsorbed onto the first virtual object at a preset adsorption speed, wherein the preset adsorption speed refers to the adsorption speed pre-configured by a technician under the passive adsorption logic. Under the passive adsorption logic, the method for obtaining the adsorption point corresponding to the crosshairs is similar to step 304 above, and will not be repeated here. After obtaining the adsorption point, the direction from the crosshairs to the adsorption point is the displacement direction of the crosshairs under the passive adsorption logic, and the adsorption speed of the crosshairs is the preset adsorption speed under the passive adsorption logic, thereby controlling the crosshairs to automatically move along the displacement direction at the preset adsorption speed to the corresponding adsorption point on the first virtual object.
[0251] Fig.13 is a schematic diagram of an interface of a aiming screen provided in an embodiment of the present application, such as Fig.13As shown, a sighting picture 1300 is displayed on the terminal screen, and a crosshair 1301 of a virtual prop is displayed at the center of the sighting picture 1300. Optionally, a launch control 1302 is also displayed in the sighting picture 1300. The launch control 1302 is commonly known as a fire button. The user can perform a trigger operation on the launch control 1302 to trigger the main control virtual object to control the virtual prop to launch the corresponding projectile, so that the projectile flies to the landing point indicated by the crosshair 1301. Schematically, a first virtual object 1303 is also displayed in the sighting picture 1300. In the case where the user does not manually adjust the crosshair 1301, that is, does not perform the sighting operation, assuming that the terminal detects that the crosshair 1301 is located within the adsorption detection range of the first virtual object 1303 in the current frame, the passive adsorption logic of the crosshair 1301 is triggered, that is, the crosshair 1301 is controlled to be automatically adsorbed to the first virtual object 1303.
[0252] Fig.14 This is a schematic diagram of an aiming screen interface provided in an embodiment of the present application. Please refer to Fig.14 , the aiming picture 1400 is displayed on the terminal screen, Fig.13 On the basis of triggering the passive adsorption logic of the crosshair 1301, the terminal controls the crosshair 1301 to automatically move toward the first virtual object 1303 until the crosshair 1301 moves to the corresponding adsorption point on the first virtual object 1303, such as Fig.14 As shown, it can be seen that the crosshair 1301 has overlapped with the first virtual object 1303. At this time, the user can press the firing control 1302 to fire the virtual prop, play the firing animation, and control the missile corresponding to the virtual prop to fly toward the first virtual object 1303 indicated by the crosshair 1301. When the missile hits the first virtual object 1303, a corresponding effect can be generated, for example, deducting the virtual health value of the first virtual object 1303.
[0253] In some embodiments, when the passive adsorption logic is turned on, it is possible that the first virtual object itself will be affected by the operation of other users in the current game and move in the virtual scene. Therefore, when the first virtual object moves, the terminal can automatically control the crosshairs to follow the first virtual object at the target speed. The target speed refers to the following speed of the crosshairs. Optionally, the target speed is also a speed pre-configured by the technician, presenting an effect that the crosshairs asynchronously follow the displacement of the first virtual object, which is more in line with the visual effect of the user finding the enemy escape and continuing to track in the real scene, or the target speed is always consistent with the displacement speed of the first virtual object, presenting an effect that the crosshairs synchronously follow the displacement of the first virtual object, which can improve the aiming accuracy of the crosshairs and facilitate the user to fire at any time.
[0254] Fig.15 is a schematic diagram of an interface of a aiming screen provided in an embodiment of the present application, such as Fig.15 As shown, the aiming picture 1500 is displayed on the terminal screen. Fig.14 Based on the above, at this time, the crosshair 1301 has been automatically adsorbed to the corresponding adsorption point on the first virtual object 1303 based on the influence of the passive adsorption logic without the user performing an aiming operation. It can be seen that compared with Fig.14 For example, the first virtual object 1303 is displaced in the virtual scene (translated to the right for a distance), but the crosshair 1301 is still locked on the corresponding adsorption point on the first virtual object 1303, that is, the crosshair 1301 moves with the first virtual object 1303.
[0255] In some embodiments, when the passive adsorption logic is turned on, if the crosshairs continuously aim at the first virtual object but the user does not fire for a long time, it means that the first virtual object is likely not the user's aiming target. Therefore, a failure condition of the passive adsorption logic is provided, that is, a time threshold of the adsorption time of the crosshairs on the first virtual object is set to a second time. The second time is any value greater than 0, such as 1 second, 1.5 seconds, etc. The embodiment of the present application does not specifically limit the second time.
[0256] Optionally, when the attachment time of the crosshair to the first virtual object is less than a second time, in response to the displacement of the first virtual object, the crosshair is controlled to move with the first virtual object, and the passive attachment logic continues to be effective; when the attachment time of the crosshair to the first virtual object is greater than or equal to the second time, the crosshair is no longer controlled to move with the first virtual object, that is, the attachment of the crosshair to the first virtual object is canceled, and the passive attachment logic has failed.
[0257] In the embodiment of the present application, the passive adsorption method and how to automatically adsorb the crosshairs to the aiming target without the user performing the aiming operation are described in detail. Optionally, when the crosshairs is within the adsorption detection range of the first virtual object, if the horizontal height of the crosshairs is greater than or equal to the horizontal height of the target dividing line of the first virtual object, the head bone point of the first virtual object is used as the adsorption point. If the horizontal height of the crosshairs is less than the horizontal height of the target dividing line of the first virtual object, the body bone point on the vertical central axis of the first virtual object with the same horizontal height as the crosshairs is used as the adsorption point. In addition, the above-mentioned passive adsorption logic can essentially be regarded as a modification of the orientation of the camera mounted on the main control virtual object. When the crosshairs are controlled to move to the adsorption point, the crosshairs can be gradually moved from the current position of the current frame to the adsorption point through interpolation operation. It should be noted that the passive adsorption method is applicable to both the open-scope shooting mode and the non-open-scope shooting mode, and is applicable to both the aiming screen under the first-person perspective and the aiming screen under the third-person perspective. The embodiment of the present application does not specifically limit this.
[0258] In the above two embodiments, the active adsorption method and the passive adsorption method are respectively introduced in detail. Both adsorption methods are applicable to both the scope shooting mode and the non-scope shooting mode, and are applicable to both the aiming screen under the first-person perspective and the aiming screen under the third-person perspective. They have high universality and a wide range of application scenarios, can meet the needs of various competitive shooting games with high real-time and precision requirements, and improve the aiming accuracy of virtual props, the realism of the aiming process, and the ease of use of the auxiliary aiming function.
[0259] In the embodiment of the present application, for the situation where the crosshairs is within the adsorption detection range, a friction detection range can be further configured for each target virtual object within the adsorption detection range according to the configuration of the technician on the server side. The friction detection range is used to determine whether it is necessary to activate the friction-based correction logic for the crosshairs. It should be noted that the friction-based correction logic can be effective at the same time as the active adsorption logic or the passive adsorption logic of the above-mentioned embodiment. That is, when the crosshairs is within the friction detection range, since the friction detection range is within the adsorption detection range, it means that the crosshairs also meet the requirement of being within the adsorption detection range. It can be determined whether to activate the active adsorption logic or the passive adsorption logic based on whether the user performs the aiming operation to control the crosshairs to be adsorbed to the aiming target. At the same time, based on the friction-based correction logic involved in the embodiment of the present application, it will directly act on the camera mounted on the main control virtual object to provide a friction resistance for the turning operation of the crosshairs caused by the turning of the camera, as explained below.
[0260] In some embodiments, when the crosshairs is within the adsorption detection range of the target virtual object (or the first virtual object), the terminal detects whether the crosshairs is within the friction detection range within the adsorption detection range for each frame, and in response to the crosshairs being within the friction detection range within the adsorption detection range, determines the friction correction coefficient corresponding to the crosshairs, wherein the friction correction coefficient is a value greater than or equal to 0 and less than or equal to 1. Then, in response to the steering operation of the crosshairs, based on the friction correction coefficient, the steering angle corresponding to the steering operation is corrected to obtain the target steering angle, thereby controlling the crosshairs in the virtual scene to rotate to the target steering angle. In other words, the friction correction coefficient is the steering angle that directly acts on the steering operation of the crosshairs, and is a correction logic for the steering angle.
[0261] In the above process, the steering angle of the steering operation is corrected by the friction correction coefficient, so that when the crosshairs is within the friction detection range, if the user tries to control the crosshairs away from the aiming target, since the target steering angle is affected by the friction correction coefficient, and the value range of the friction correction coefficient is [0,1], the corrected target steering angle will be smaller than the original real steering angle, which is perceived by the user as a decrease in the rotation speed of the crosshairs, so that the crosshairs stays more within the adsorption detection range of the aiming target, so that after the user controls the crosshairs to enter the friction detection range, it will feel that it becomes difficult to operate the crosshairs to turn.
[0262] The following describes how to obtain the friction correction coefficient.
[0263] Optionally, the friction detection range includes a first target point (horzontalMin, verticalMin) and a second target point (horzontalMax, verticalMax), the friction correction coefficient at the first target point is the minimum value TurnInputScaleFact.x, for example, the minimum value TurnInputScaleFact.x is configured to 0, 0.1, 0.2 or other values, and the friction correction coefficient at the second target point is the maximum value TurnInputScaleFact.y, for example, the maximum value TurnInputScaleFact.y is configured to 1, 0.9, 0.8 or other values. When configuring the minimum value TurnInputScaleFact.x and the maximum value TurnInputScaleFact.y, it is only necessary to ensure that the minimum value TurnInputScaleFact.x and the maximum value TurnInputScaleFact.y both conform to the value range [0,1] of the friction correction coefficient, and the minimum value TurnInputScaleFact.x is less than the maximum value TurnInputScaleFact.y. The embodiments of the present application do not specifically limit this.
[0264] Fig.16 is a schematic diagram of a friction detection range provided in an embodiment of the present application, such as Fig.16 As shown, a target virtual object 1600 is shown, and a friction inner frame 1601 is configured outside the target virtual object 1600. The upper left vertex of the friction inner frame 1601 is the first target point (horzontalMin, verticalMin). When the front sight is located at the first target point, the friction correction coefficient of the front sight is set to the minimum value TurnInputScaleFact.x. A friction outer frame 1602 is configured outside the friction inner frame 1602. The upper left vertex of the friction outer frame 1602 is the second target point (horzontalMax, verticalMax). When the front sight is located at the second target point, the friction correction coefficient of the front sight is set to the maximum value TurnInputScaleFact.y. Among them, the friction outer frame 1602 is the boundary of the friction detection range involved in the embodiment of the present application. In addition, an adsorption detection frame 1603 is also configured outside the friction outer frame 1602, and the adsorption detection frame 1603 is the boundary of the adsorption detection range involved in the embodiment of the present application. The current position of the crosshair 1604 is represented as (aim2D.x, aim2D.y). Since the crosshair 1604 is currently located inside the friction force frame 1602, it will be affected by both the influence of the adsorption force on the displacement speed and the influence of the friction force on the rotation angle.
[0265] On the basis of providing the minimum value TurnInputScaleFact.x and the maximum value TurnInputScaleFact.y, the terminal can perform an interpolation operation between the minimum value TurnInputScaleFact.x and the maximum value TurnInputScaleFact.y based on the position coordinates (aim2D.x, aim2D.y) of the crosshairs to obtain the friction correction coefficient, wherein the friction correction coefficient is positively correlated with the distance from the crosshairs to the first target point, that is, when the distance between the crosshairs and the first target point is closer, the friction correction coefficient is smaller and the friction force is greater; when the distance between the crosshairs and the first target point is farther, the friction correction coefficient is larger and the friction force is smaller, until the crosshairs leaves the friction detection range (the crosshairs is outside the friction force outer frame 1602) and is no longer affected by the friction.
[0266] In some embodiments, the horizontal distance from the first target point (horzontalMin, verticalMin) to the second target point (horzontalMax, verticalMax) is obtained as the horizontal threshold, and the horizontal threshold can be expressed as: horizontalMax-horizontalMin; then, the vertical distance from the first target point (horzontalMin, verticalMin) to the second target point (horzontalMax, verticalMax) is obtained as the vertical threshold, and the vertical threshold can be expressed as: verticalMax-verticalMin.
[0267] In some embodiments, when performing interpolation between the minimum value and the maximum value, the horizontal distance and vertical distance from the sight (aim2D.x, aim2D.y) to the first target point (horzontalMin, verticalMin) can be obtained first, and the horizontal distance can be expressed as aim2D.x-horizontalMin, and the vertical distance can be expressed as aim2D.y-verticalMin. Then, the ratio hRatio of the horizontal distance to the horizontal threshold and the ratio vRatio of the vertical distance to the vertical threshold are obtained, where hRatio and vRatio can be expressed as the following formulas respectively:
[0268] hRatio=(aim2D.x-horizontalMin) / (horizontalMax-horizontalMin);
[0269] vRatio=(aim2D.y-verticalMin) / (verticalMax-verticalMin);
[0270] Furthermore, when the ratio of the horizontal distance to the horizontal threshold is greater than or equal to the ratio of the vertical distance to the vertical threshold, that is, hRatio≥vRatio, interpolation operation is performed between the minimum value and the maximum value based on the ratio of the horizontal distance to the horizontal threshold; when the ratio of the horizontal distance to the horizontal threshold is less than the ratio of the vertical distance to the vertical threshold, that is, hRatio<vRatio, interpolation operation is performed between the minimum value and the maximum value based on the ratio of the vertical distance to the vertical threshold.
[0271] Schematically, the interpolation operation is implemented by the interpolation operation function FMath::Lerp(F1, F2, F3), wherein the interpolation operation function requires the input of three parameters F1 to F3, F1 represents the minimum value in the interpolation operation, i.e. the starting point, F2 represents the maximum value of the interpolation operation, i.e. the end point, and F3 represents a variable ratio.
[0272] Schematically, when hRatio ≥ vRatio, for the interpolation operation function, F1 = TurnInputScaleFact.x, F2 = TurnInputScaleFact.y, F3 = hRatio are configured, and the friction correction coefficient fact is expressed as the following formula:
[0273] fact=FMath::Lerp(TurnInputScaleFact.x,TurnInputScaleFact.y,hRatio);
[0274] Schematically, when hRatio<vRatio, for the interpolation operation function, F1=TurnInputScaleFact.x, F2=TurnInputScaleFact.y, F3=vRatio are configured, and the friction correction coefficient fact is expressed as the following formula:
[0275] fact=FMath::Lerp(TurnInputScaleFact.x,TurnInputScaleFact.y,vRatio);
[0276] In this case, assuming that the steering angle of the user's steering operation on the sight in the current frame (that is, the steering angle of the camera) is represented as deltaRotator, then the target steering angle deltaRotator after correction by the friction correction coefficient fact = deltaRotator*fact, that is, the product of the friction correction coefficient and the original steering angle deltaRotator*fact is assigned to deltaRotator.
[0277] In other words, assuming that the difference between the side lengths of the outer friction frame and the inner friction frame is called the friction frame width, since the first target point is located at the upper left vertex of the inner friction frame and the second target point is located at the upper left vertex of the outer friction frame, the horizontal threshold is equivalent to half of the friction frame width on the horizontal axis, and the vertical threshold is equivalent to half of the friction frame width on the vertical axis. Therefore, the above friction correction coefficient formula can be integrated and expressed as:
[0278] Friction coefficient = lerp (Min friction, Max friction, distance between the crosshair and the adsorption point / (0.5 × adsorption frame width)).
[0279] Among them, lerp still refers to the interpolation operation function, Min friction refers to the minimum value of the friction correction coefficient TurnInputScaleFact.x, Max friction refers to the maximum value of the friction correction coefficient TurnInputScaleFact.y, and the distance between the crosshair and the adsorption point / (0.5×adsorption frame width) takes the maximum value between hRatio and vRatio.
[0280] In the embodiment of the present application, by introducing that when the crosshairs is within the friction detection range within the adsorption detection range, a correction is provided based on the friction correction coefficient to correct the steering angle of the user's steering operation on the crosshairs, so that when the crosshairs is within the friction detection range, if the user attempts to manipulate the crosshairs away from the aiming target, the corrected target steering angle will be smaller than the original real steering angle, which is perceived by the user as a decrease in the rotation speed of the crosshairs when rotating, so that the crosshairs stay more within the adsorption detection range of the aiming target, so that the user will feel that it becomes difficult to operate the crosshairs to turn, thereby improving the aiming accuracy of the virtual props and improving the efficiency of human-computer interaction. Furthermore, since the maximum value of hRatio and vRatio is used to complete the interpolation operation, no matter for the friction detection range of square, rectangular, circular or various irregular shapes, two ratios hRatio and vRatio can be calculated after specifying the first target point and the second target point, and the friction correction coefficient is calculated accordingly, thereby improving the calculation accuracy of the friction correction coefficient.
[0281] Fig.17 This is a structural diagram of a crosshair control device in a virtual scene provided in an embodiment of the present application. Please refer to Fig.17 , the device comprises:
[0282] Display module 1701, used for displaying the target virtual object in the virtual scene;
[0283] A first acquisition module 1702 is used to acquire the displacement direction and displacement speed of the crosshairs of the aiming operation in response to the aiming operation on the virtual prop;
[0284] A second acquisition module 1703 is configured to acquire an adsorption correction coefficient matching the displacement direction in response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction;
[0285] The display module 1701 is also used to display that the crosshair moves at a target adsorption speed, where the target adsorption speed is obtained by adjusting the displacement speed using the adsorption correction coefficient.
[0286] The device provided in the embodiment of the present application, based on the aiming operation originally performed by the user, if it is determined that the aiming target is associated with the adsorption detection range of the target virtual object, it means that the user has an aiming intention on the target virtual object. At this time, an adsorption correction coefficient is applied to the original displacement speed, and the displacement speed is adjusted by the adsorption correction coefficient, so that the adjusted target adsorption speed is more in line with the user's aiming intention, which makes it easier for the crosshairs to focus on the aiming target more accurately, thereby greatly improving the efficiency of human-computer interaction.
[0287] In a possible implementation manner, the second acquisition module 1703 is used to:
[0288] In response to the intersection of the extension line of the displacement direction and the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range, and the step of obtaining the adsorption correction coefficient is performed.
[0289] In one possible implementation, based on Fig.17 The second acquisition module 1703 includes:
[0290] An acquisition unit, used for acquiring an adsorption point corresponding to the crosshair in the target virtual object;
[0291] A first determining unit, configured to determine the adsorption correction coefficient as a first correction coefficient in response to the distance between the crosshair and the adsorption point in a current frame being smaller than the distance between the crosshair and the adsorption point in a previous frame;
[0292] The second determining unit is used to determine the adsorption correction coefficient as a second correction coefficient in response to the distance between the crosshair and the adsorption point in the current frame being greater than or equal to the distance between the crosshair and the adsorption point in the previous frame.
[0293] In one possible implementation, based on Fig.17 The first determining unit comprises:
[0294] A first determination subunit is used to determine an adsorption acceleration intensity based on the displacement direction, where the adsorption acceleration intensity is used to characterize the degree of acceleration of the displacement speed;
[0295] An acquisition subunit is used to acquire the adsorption acceleration type corresponding to the virtual prop, and the adsorption acceleration type is used to characterize the way of accelerating the displacement speed;
[0296] The second determining subunit is used to determine the first correction coefficient based on the adsorption acceleration intensity and the adsorption acceleration type.
[0297] In a possible implementation manner, the first determining subunit is used to:
[0298] When the extension line intersects the central axis of the target virtual object, determining the adsorption acceleration intensity as the first acceleration intensity;
[0299] When the extension line does not intersect the central axis of the target virtual object, the adsorption acceleration intensity is determined to be a second acceleration intensity, and the second acceleration intensity is less than the first acceleration intensity.
[0300] In one possible implementation, the adsorption acceleration type includes at least one of the following: a uniform speed correction type, which is used to increase the displacement speed; an acceleration correction type, which is used to set a preset acceleration for the displacement speed; a distance correction type, which is used to set a variable acceleration for the displacement speed, and the variable acceleration is negatively correlated with the distance between the crosshairs and the adsorption point.
[0301] In a possible implementation manner, the second determining unit is used to:
[0302] The second correction coefficient is obtained by sampling from the correction coefficient curve based on the distance difference between the distance between the crosshair in the current frame and the adsorption point and the distance between the crosshair in the previous frame and the adsorption point.
[0303] In a possible implementation manner, the acquisition unit is used to:
[0304] In response to the horizontal height of the crosshair being greater than or equal to the horizontal height of a target dividing line of the target virtual object, determining a head skeleton point of the target virtual object as the adsorption point, the target dividing line being used to distinguish a head and a body of the target virtual object;
[0305] In response to the horizontal height of the crosshair being less than the horizontal height of the target dividing line, a body skeleton point of the target virtual object is determined as the adsorption point, and the body skeleton point is a skeleton point on the vertical center axis of the target virtual object with the same horizontal height as the crosshair.
[0306] In a possible implementation manner, the acquisition unit is further configured to:
[0307] When the adsorption point is the body bone point, obtain the lateral offset and longitudinal offset from the crosshair to the target virtual object, wherein the lateral offset refers to the distance between the crosshair and the vertical center axis of the target virtual object, and the longitudinal offset refers to the distance between the crosshair and the horizontal center axis of the target virtual object;
[0308] The maximum value of the lateral offset and the longitudinal offset is determined as the distance between the crosshair and the adsorption point.
[0309] In one possible implementation, based on Fig.17 The device is composed of:
[0310] a determination module, configured to determine a friction correction coefficient corresponding to the crosshair in response to the crosshair being located within the friction detection range within the adsorption detection range;
[0311] A correction module, configured to, in response to a steering operation on the sight, correct a steering angle corresponding to the steering operation based on the friction correction coefficient to obtain a target steering angle;
[0312] The first control module is used to control the direction of the crosshair in the virtual scene to rotate the target turning angle.
[0313] In a possible implementation manner, the friction detection range includes a first target point and a second target point, the friction correction coefficient at the first target point is a minimum value, and the friction correction coefficient at the second target point is a maximum value;
[0314] based on Fig.17 The device is composed of, the determination module includes:
[0315] The interpolation operation unit is used to perform an interpolation operation between the minimum value and the maximum value based on the position coordinates of the crosshair to obtain the friction correction coefficient, wherein the friction correction coefficient is positively correlated with the distance from the crosshair to the first target point.
[0316] In a possible implementation manner, a horizontal distance from the first target point to the second target point is a horizontal threshold, and a vertical distance from the first target point to the second target point is a vertical threshold;
[0317] The interpolation unit is used to:
[0318] Obtaining the horizontal distance and vertical distance from the crosshair to the first target point;
[0319] When the ratio of the horizontal distance to the horizontal threshold is greater than or equal to the ratio of the vertical distance to the vertical threshold, performing an interpolation operation between the minimum value and the maximum value based on the ratio of the horizontal distance to the horizontal threshold;
[0320] When the ratio of the horizontal distance to the horizontal threshold is smaller than the ratio of the vertical distance to the vertical threshold, an interpolation operation is performed between the minimum value and the maximum value based on the ratio of the vertical distance to the vertical threshold.
[0321] In one possible implementation, based on Fig.17 The device is composed of:
[0322] The cancellation module is used to cancel the correction of the displacement speed by the adsorption correction coefficient in response to the crosshair moving from within the adsorption detection range to outside the adsorption detection range and the time length of being outside the adsorption detection range exceeds a first time length.
[0323] In one possible implementation, based on Fig.17 The device is composed of:
[0324] The second control module is used to control the crosshair to move to the first virtual object in response to the crosshair being located within the adsorption detection range of the first virtual object; wherein the first virtual object is a virtual object that supports being adsorbed in the virtual scene.
[0325] In a possible implementation manner, the second control module is further used for:
[0326] When the first virtual object is displaced, the crosshair is controlled to move following the first virtual object at a target speed.
[0327] In a possible implementation manner, the second control module is further used for:
[0328] When the adsorption time of the crosshair to the first virtual object is less than the second time, in response to the displacement of the first virtual object, the crosshair is controlled to move following the first virtual object.
[0329] In a possible implementation, the target adsorption speed is a speed vector, the vector magnitude of the speed vector is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and the vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshair.
[0330] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0331] It should be noted that: the crosshair control device in the virtual scene provided by the above embodiment only uses the division of the above functional modules as an example to illustrate when controlling the crosshair. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. In addition, the crosshair control device in the virtual scene provided by the above embodiment and the embodiment of the crosshair control method in the virtual scene belong to the same concept. The specific implementation process is detailed in the embodiment of the crosshair control method in the virtual scene, which will not be repeated here.
[0332] Fig.18 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application, such as Fig.18 As shown, the terminal 1800 is an exemplary description of an electronic device. Optionally, the device type of the terminal 1800 includes: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a laptop or a desktop computer. The terminal 1800 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.
[0333] Typically, the terminal 1800 includes: a processor 1801 and a memory 1802 .
[0334] Optionally, the processor 1801 includes one or more processing cores, such as a 4-core processor, an 8-core processor, etc. Optionally, the processor 1801 is implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). In some embodiments, the processor 1801 includes a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1801 is integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1801 also includes an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0335] In some embodiments, the memory 1802 includes one or more computer-readable storage media, and optionally, the computer-readable storage medium is non-transitory. Optionally, the memory 1802 also includes a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1802 is used to store at least one program code, and the at least one program code is used to be executed by the processor 1801 to implement the crosshair control method in the virtual scene provided in each embodiment of the present application.
[0336] In some embodiments, the terminal 1800 may further optionally include: a peripheral device interface 1803 and at least one peripheral device. The processor 1801, the memory 1802 and the peripheral device interface 1803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1804, a display screen 1805, a camera assembly 1806, an audio circuit 1807 and a power supply 1808.
[0337] The peripheral device interface 1803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1801 and the memory 1802. In some embodiments, the processor 1801, the memory 1802, and the peripheral device interface 1803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1801, the memory 1802, and the peripheral device interface 1803 are implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0338] The radio frequency circuit 1804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1804 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1804 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. Optionally, the radio frequency circuit 1804 communicates with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1804 also includes circuits related to NFC (Near Field Communication), which is not limited in this application.
[0339] The display screen 1805 is used to display a UI (User Interface). Optionally, the UI includes graphics, text, icons, videos, and any combination thereof. When the display screen 1805 is a touch display screen, the display screen 1805 also has the ability to collect touch signals on the surface or above the surface of the display screen 1805. The touch signal can be input to the processor 1801 as a control signal for processing. Optionally, the display screen 1805 is also used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1805 is one, and the front panel of the terminal 1800 is set; in other embodiments, the display screen 1805 is at least two, which are respectively set on different surfaces of the terminal 1800 or are folded; in some other embodiments, the display screen 1805 is a flexible display screen, which is set on the curved surface or folded surface of the terminal 1800. Even, optionally, the display screen 1805 is set to a non-rectangular irregular shape, that is, a special-shaped screen. Optionally, the display screen 1805 is made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0340] The camera assembly 1806 is used to capture images or videos. Optionally, the camera assembly 1806 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1806 also includes a flash. Optionally, the flash is a monochrome temperature flash, or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which is used for light compensation at different color temperatures.
[0341] In some embodiments, the audio circuit 1807 includes a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1801 for processing, or input them into the radio frequency circuit 1804 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there are multiple microphones, which are respectively arranged at different parts of the terminal 1800. Optionally, the microphone is an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1801 or the radio frequency circuit 1804 into sound waves. Optionally, the speaker is a traditional film speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1807 also includes a headphone jack.
[0342] The power supply 1808 is used to power various components in the terminal 1800. Optionally, the power supply 1808 is an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1808 includes a rechargeable battery, the rechargeable battery supports wired charging or wireless charging. The rechargeable battery is also used to support fast charging technology.
[0343] In some embodiments, the terminal 1800 further includes one or more sensors 1810 , including but not limited to: an acceleration sensor 1811 , a gyroscope sensor 1812 , a pressure sensor 1813 , an optical sensor 1814 , and a proximity sensor 1815 .
[0344] In some embodiments, the acceleration sensor 1811 detects the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1800. For example, the acceleration sensor 1811 is used to detect the components of gravity acceleration on the three coordinate axes. Optionally, the processor 1801 controls the display screen 1805 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1811. The acceleration sensor 1811 is also used to collect motion data of games or users.
[0345] In some embodiments, the gyroscope sensor 1812 detects the body direction and rotation angle of the terminal 1800, and the gyroscope sensor 1812 and the acceleration sensor 1811 cooperate to collect the user's 3D actions on the terminal 1800. The processor 1801 implements the following functions based on the data collected by the gyroscope sensor 1812: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0346] Optionally, the pressure sensor 1813 is arranged on the side frame of the terminal 1800 and / or the lower layer of the display screen 1805. When the pressure sensor 1813 is arranged on the side frame of the terminal 1800, it can detect the user's holding signal of the terminal 1800, and the processor 1801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1813. When the pressure sensor 1813 is arranged on the lower layer of the display screen 1805, the processor 1801 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0347] The optical sensor 1814 is used to collect the ambient light intensity. In one embodiment, the processor 1801 controls the display brightness of the display screen 1805 according to the ambient light intensity collected by the optical sensor 1814. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1805 is increased; when the ambient light intensity is low, the display brightness of the display screen 1805 is decreased. In another embodiment, the processor 1801 also dynamically adjusts the shooting parameters of the camera assembly 1806 according to the ambient light intensity collected by the optical sensor 1814.
[0348] The proximity sensor 1815, also called a distance sensor, is usually arranged on the front panel of the terminal 1800. The proximity sensor 1815 is used to collect the distance between the user and the front of the terminal 1800. In one embodiment, when the proximity sensor 1815 detects that the distance between the user and the front of the terminal 1800 is gradually decreasing, the processor 1801 controls the display screen 1805 to switch from the screen-on state to the screen-off state; when the proximity sensor 1815 detects that the distance between the user and the front of the terminal 1800 is gradually increasing, the processor 1801 controls the display screen 1805 to switch from the screen-off state to the screen-on state.
[0349] Those skilled in the art will understand that Fig.18 The structure shown in the figure does not constitute a limitation on the terminal 1800, and the terminal 1800 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0350] Fig.191 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1900 may have relatively large differences due to different configurations or performances. The electronic device 1900 includes one or more processors (Central Processing Units, CPU) 1901 and one or more memories 1902, wherein the memory 1902 stores at least one computer program, and the at least one computer program is loaded and executed by the one or more processors 1901 to implement the crosshair control method in the virtual scene provided in the above-mentioned various embodiments. Optionally, the electronic device 1900 also has components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 1900 also includes other components for realizing the functions of the device, which will not be repeated here.
[0351] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including at least one computer program, and the at least one computer program can be executed by a processor in a terminal to complete the crosshair control method in a virtual scene in each of the above embodiments. For example, the computer-readable storage medium includes ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.
[0352] In an exemplary embodiment, a computer program product or a computer program is also provided, including one or more program codes, which are stored in a computer-readable storage medium. One or more processors of an electronic device can read the one or more program codes from the computer-readable storage medium, and the one or more processors execute the one or more program codes, so that the electronic device can execute to complete the crosshair control method in the virtual scene in the above embodiment.
[0353] A person of ordinary skill in the art will understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing related hardware through a program. Optionally, the program is stored in a computer-readable storage medium. Optionally, the above-mentioned storage medium is a read-only memory, a disk or an optical disk, etc.
[0354] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A crosshair control method in a virtual scene, characterized in that: The method comprises: Displaying a target virtual object in a virtual scene; In response to an aiming operation on a virtual prop, obtaining a displacement direction and a displacement speed of a crosshair of the aiming operation; In response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction, acquiring an adsorption correction coefficient matching the displacement direction; the adsorption correction coefficient is a first correction coefficient or a second correction coefficient; Displaying that the crosshair moves at a target adsorption speed, wherein the target adsorption speed is obtained by adjusting the displacement speed by the adsorption correction coefficient; The process of obtaining the first correction coefficient includes: Based on the displacement direction, determining an adsorption acceleration intensity, wherein the adsorption acceleration intensity is used to characterize the degree of acceleration of the displacement speed; Obtaining an adsorption acceleration type corresponding to the virtual prop, wherein the adsorption acceleration type is used to characterize a method of accelerating the displacement speed; determining the first correction coefficient based on at least one of the adsorption acceleration intensity and the adsorption acceleration type; The process of obtaining the second correction coefficient includes: The second correction coefficient is obtained by sampling from a correction coefficient curve based on a distance difference between the distance between the crosshair in a current frame and an adsorption point and a distance between the crosshair in a previous frame and the adsorption point, where the adsorption point is a position in the target virtual object corresponding to the crosshair.
2. The method according to claim 1, characterized in that In response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction, acquiring an adsorption correction coefficient matching the displacement direction includes: In response to the intersection of the extension line of the displacement direction and the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range, and the step of obtaining the adsorption correction coefficient matching the displacement direction is performed.
3. The method according to claim 1 or 2, characterized in that: The obtaining of the adsorption correction coefficient matching the displacement direction comprises: Acquire an adsorption point corresponding to the crosshair in the target virtual object; In response to the distance between the crosshair and the adsorption point in the current frame being smaller than the distance between the crosshair and the adsorption point in the previous frame, determining the adsorption correction coefficient to be the first correction coefficient; In response to the distance between the crosshair and the adsorption point in the current frame being greater than or equal to the distance between the crosshair and the adsorption point in the previous frame, the adsorption correction coefficient is determined to be the second correction coefficient.
4. The method according to claim 1, characterized in that: Determining the adsorption acceleration intensity based on the displacement direction includes: When the extension line of the displacement direction intersects the central axis of the target virtual object, determining the adsorption acceleration intensity to be a first acceleration intensity; When the extension line of the displacement direction does not intersect the central axis of the target virtual object, the adsorption acceleration intensity is determined to be a second acceleration intensity, and the second acceleration intensity is smaller than the first acceleration intensity.
5. The method according to claim 1, characterized in that The adsorption acceleration type includes at least one of the following: a uniform speed correction type, which is used to increase the displacement speed; an acceleration correction type, which is used to set a preset acceleration for the displacement speed; A distance correction type, wherein the distance correction type is used to set a variable acceleration for the displacement speed, wherein the variable acceleration is negatively correlated with the distance between the crosshair and the adsorption point.
6. The method according to claim 3, characterized in that The acquiring of the adsorption point corresponding to the crosshair in the target virtual object comprises: In response to the horizontal height of the crosshair being greater than or equal to the horizontal height of a target dividing line of the target virtual object, determining a head skeleton point of the target virtual object as the adsorption point, the target dividing line being used to distinguish a head and a body of the target virtual object; In response to the horizontal height of the crosshair being less than the horizontal height of the target dividing line, a body skeleton point of the target virtual object is determined as the adsorption point, and the body skeleton point is a skeleton point on the vertical center axis of the target virtual object with the same horizontal height as the crosshair.
7. The method according to claim 6, characterized in that The method further comprises: In the case where the adsorption point is the body bone point, obtaining a lateral offset and a longitudinal offset from the crosshair to the target virtual object, wherein the lateral offset refers to the distance between the crosshair and the vertical center axis of the target virtual object, and the longitudinal offset refers to the distance between the crosshair and the horizontal center axis of the target virtual object; The maximum value of the lateral offset and the longitudinal offset is determined as the distance between the crosshair and the adsorption point.
8. The method according to claim 1, characterized in that The method further comprises: In response to the crosshair being located within the friction detection range within the adsorption detection range, determining a friction correction coefficient corresponding to the crosshair; In response to a steering operation on the sight, based on the friction correction coefficient, a steering angle corresponding to the steering operation is corrected to obtain a target steering angle; The orientation of the crosshair in the virtual scene is controlled to rotate the target turning angle.
9. The method according to claim 8, characterized in that The friction detection range includes a first target point and a second target point, the friction correction coefficient at the first target point is a minimum value, and the friction correction coefficient at the second target point is a maximum value; Determining the friction correction coefficient corresponding to the front sight includes: Based on the position coordinates of the crosshairs, an interpolation operation is performed between the minimum value and the maximum value to obtain the friction correction coefficient, wherein the friction correction coefficient is positively correlated with the distance from the crosshairs to the first target point.
10. The method according to claim 9, characterized in that The horizontal distance from the first target point to the second target point is a horizontal threshold, and the vertical distance from the first target point to the second target point is a vertical threshold; The interpolation operation between the minimum value and the maximum value based on the position coordinates of the crosshair comprises: Obtaining the horizontal distance and the vertical distance from the crosshair to the first target point; When the ratio of the horizontal distance to the horizontal threshold is greater than or equal to the ratio of the vertical distance to the vertical threshold, performing an interpolation operation between the minimum value and the maximum value based on the ratio of the horizontal distance to the horizontal threshold; When the ratio of the horizontal distance to the horizontal threshold is smaller than the ratio of the vertical distance to the vertical threshold, an interpolation operation is performed between the minimum value and the maximum value based on the ratio of the vertical distance to the vertical threshold.
11. The method according to claim 1, characterized in that The method further comprises: In response to the crosshair moving from within the adsorption detection range to outside the adsorption detection range, and the duration of being outside the adsorption detection range exceeds a first duration, the correction of the displacement speed by the adsorption correction coefficient is canceled.
12. The method according to claim 1, characterized in that The method further comprises: In response to the crosshair being located within the adsorption detection range of the first virtual object, the crosshair is controlled to move to the first virtual object; wherein the first virtual object is a virtual object that supports being adsorbed in the virtual scene.
13. The method according to claim 12, characterized in that The method further comprises: When the first virtual object is displaced, the crosshair is controlled to move following the first virtual object at a target speed.
14. The method according to claim 12, characterized in that The method further comprises: When the adsorption time of the crosshair to the first virtual object is less than a second time, in response to the displacement of the first virtual object, the crosshair is controlled to move following the first virtual object.
15. The method according to claim 1, characterized in that The target adsorption speed is a speed vector, the vector magnitude of the speed vector is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and the vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshair.
16. A crosshair control device in a virtual scene, characterized in that: The device comprises: A display module, used for displaying a target virtual object in a virtual scene; A first acquisition module, configured to acquire, in response to an aiming operation on a virtual prop, a displacement direction and a displacement speed of a crosshair of the aiming operation; A second acquisition module is configured to acquire an adsorption correction coefficient that matches the displacement direction in response to determining that the aiming target of the aiming operation is associated with the adsorption detection range of the target virtual object based on the displacement direction; the adsorption correction coefficient is a first correction coefficient or a second correction coefficient; The display module is further used to display that the crosshair moves at a target adsorption speed, where the target adsorption speed is obtained by adjusting the displacement speed by the adsorption correction coefficient; The second acquisition module includes a first determination unit and a second determination unit, and the first determination unit includes a first determination subunit, an acquisition subunit and a second determination subunit; The first determination subunit is used to determine an adsorption acceleration intensity based on the displacement direction, wherein the adsorption acceleration intensity is used to characterize the degree of acceleration of the displacement speed; The acquisition subunit is used to acquire the adsorption acceleration type corresponding to the virtual prop, and the adsorption acceleration type is used to characterize the way of accelerating the displacement speed; The second determination subunit is used to determine the first correction coefficient based on at least one of the adsorption acceleration intensity and the adsorption acceleration type; The second determination unit is used to sample the second correction coefficient from the correction coefficient curve based on the distance difference between the distance between the crosshair in the current frame and the adsorption point and the distance between the crosshair in the previous frame and the adsorption point, where the adsorption point is a position in the target virtual object corresponding to the crosshair.
17. The device according to claim 16, characterized in that The second acquisition module is used for: In response to the intersection of the extension line of the displacement direction and the adsorption detection range, it is determined that the aiming target is associated with the adsorption detection range, and the step of obtaining the adsorption correction coefficient matching the displacement direction is performed.
18. The device according to claim 16 or 17, characterized in that The second acquisition module includes: An acquisition unit, used for acquiring an adsorption point corresponding to the crosshair in the target virtual object; The first determining unit is configured to determine the adsorption correction coefficient as the first correction coefficient in response to the distance between the crosshair and the adsorption point in the current frame being smaller than the distance between the crosshair and the adsorption point in the previous frame; The second determination unit is used to determine the adsorption correction coefficient as the second correction coefficient in response to the distance between the crosshair and the adsorption point in the current frame being greater than or equal to the distance between the crosshair and the adsorption point in the previous frame.
19. The device according to claim 16, characterized in that The first determining subunit is used for: When the extension line of the displacement direction intersects the central axis of the target virtual object, determining the adsorption acceleration intensity to be a first acceleration intensity; When the extension line of the displacement direction does not intersect the central axis of the target virtual object, the adsorption acceleration intensity is determined to be a second acceleration intensity, and the second acceleration intensity is smaller than the first acceleration intensity.
20. The device according to claim 16, characterized in that The adsorption acceleration type includes at least one of the following: a uniform speed correction type, which is used to increase the displacement speed; an acceleration correction type, which is used to set a preset acceleration for the displacement speed; A distance correction type, wherein the distance correction type is used to set a variable acceleration for the displacement speed, wherein the variable acceleration is negatively correlated with the distance between the crosshair and the adsorption point.
21. The device according to claim 18, characterized in that The acquisition unit is used for: In response to the horizontal height of the crosshair being greater than or equal to the horizontal height of a target dividing line of the target virtual object, determining a head skeleton point of the target virtual object as the adsorption point, the target dividing line being used to distinguish a head and a body of the target virtual object; In response to the horizontal height of the crosshair being less than the horizontal height of the target dividing line, a body skeleton point of the target virtual object is determined as the adsorption point, and the body skeleton point is a skeleton point on the vertical center axis of the target virtual object with the same horizontal height as the crosshair.
22. The device according to claim 21, characterized in that The acquisition unit is also used for: In the case where the adsorption point is the body bone point, obtaining a lateral offset and a longitudinal offset from the crosshair to the target virtual object, wherein the lateral offset refers to the distance between the crosshair and the vertical center axis of the target virtual object, and the longitudinal offset refers to the distance between the crosshair and the horizontal center axis of the target virtual object; The maximum value of the lateral offset and the longitudinal offset is determined as the distance between the crosshair and the adsorption point.
23. The device according to claim 16, characterized in that The device also includes: A determination module, configured to determine a friction correction coefficient corresponding to the crosshair in response to the crosshair being located in a friction detection range within the adsorption detection range; a correction module, configured to, in response to a steering operation on the sight, correct a steering angle corresponding to the steering operation based on the friction correction coefficient to obtain a target steering angle; The first control module is used to control the direction of the crosshair in the virtual scene to rotate the target turning angle.
24. The device according to claim 23, characterized in that The friction detection range includes a first target point and a second target point, the friction correction coefficient at the first target point is a minimum value, and the friction correction coefficient at the second target point is a maximum value; The determination module comprises: An interpolation operation unit is used to perform an interpolation operation between the minimum value and the maximum value based on the position coordinates of the crosshair to obtain the friction correction coefficient, wherein the friction correction coefficient is positively correlated with the distance from the crosshair to the first target point.
25. The device according to claim 24, characterized in that The horizontal distance from the first target point to the second target point is a horizontal threshold, and the vertical distance from the first target point to the second target point is a vertical threshold; The interpolation operation unit is used for: Obtaining the horizontal distance and the vertical distance from the crosshair to the first target point; When the ratio of the horizontal distance to the horizontal threshold is greater than or equal to the ratio of the vertical distance to the vertical threshold, performing an interpolation operation between the minimum value and the maximum value based on the ratio of the horizontal distance to the horizontal threshold; When the ratio of the horizontal distance to the horizontal threshold is smaller than the ratio of the vertical distance to the vertical threshold, an interpolation operation is performed between the minimum value and the maximum value based on the ratio of the vertical distance to the vertical threshold.
26. The device according to claim 16, characterized in that The device also includes: The cancellation module is used for canceling the correction of the displacement speed by the adsorption correction coefficient in response to the crosshair moving from within the adsorption detection range to outside the adsorption detection range and the time length of being outside the adsorption detection range exceeds a first time length.
27. The device according to claim 16, characterized in that The device also includes: The second control module is configured to control the crosshair to move to the first virtual object in response to the crosshair being located within the adsorption detection range of the first virtual object; wherein the first virtual object is a virtual object that supports being adsorbed in the virtual scene.
28. The device according to claim 27, characterized in that The second control module is also used for: When the first virtual object is displaced, the crosshair is controlled to move following the first virtual object at a target speed.
29. The device according to claim 27, characterized in that The second control module is also used for: When the adsorption time of the crosshair to the first virtual object is less than a second time, in response to the displacement of the first virtual object, the crosshair is controlled to move following the first virtual object.
30. The device according to claim 16, characterized in that The target adsorption speed is a speed vector, the vector magnitude of the speed vector is obtained by adjusting the displacement speed based on the adsorption correction coefficient, and the vector direction of the speed vector is obtained by adjusting the displacement direction based on the adsorption point of the crosshair.
31. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the at least one computer program is loaded and executed by the one or more processors to implement the crosshair control method in a virtual scene as described in any one of claims 1 to 15.
32. A storage medium, characterized in that: At least one computer program is stored in the storage medium, and the at least one computer program is loaded and executed by the processor to implement the crosshair control method in the virtual scene according to any one of claims 1 to 15.
33. A computer program product, characterized in that The computer program product comprises at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the crosshair control method in a virtual scene as claimed in any one of claims 1 to 15.
