Front sight control method and device, computer equipment and storage medium
By determining the adsorption point within the adsorption range of the virtual object and automatically adjusting the movement of the sight, the problem of low efficiency of user adjustment of sight is solved, and the accuracy and user experience of sight in battle games are improved.
Patent Information
- Application Number
- CN202310545776.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2024-11-15
AI Technical Summary
In battle games, the process of users adjusting their sights to aim at virtual objects is inefficient, resulting in operation difficulties and low accuracy.
By determining the adsorption point within the adsorption range of the virtual object, and automatically adjusting the movement direction and speed of the front star based on the motion posture and user operation, so that the front star can quickly and accurately aim at the virtual object.
It improves the efficiency and accuracy of users' adjustment of sights, improves the human-computer interaction experience, and reduces the complexity and error of user operations.
Smart Images

Figure CN118949402A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a crosshair control method, device, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, the types of games are becoming more and more diverse. In current fighting games, a crosshair is usually displayed in the scene interface of a virtual scene, so that the user can aim at a virtual object in the virtual scene through the displayed crosshair, and then interact with the aimed virtual object. However, in the process of the user adjusting the crosshair to aim at the virtual object, the user needs to make repeated adjustments, and the adjustment efficiency is low. Summary of the invention
[0003] The embodiments of the present application provide a crosshair control method, device, computer equipment and storage medium, which can improve the adjustment efficiency and thus improve the human-computer interaction efficiency. The technical solution is as follows:
[0004] In one aspect, a method for controlling a crosshair is provided, the method comprising:
[0005] A scene interface for displaying a virtual scene, wherein the scene interface displays a first virtual object and a crosshair;
[0006] In response to a first movement operation on the crosshair, determining a first movement direction of the first movement operation;
[0007] When the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, determining a first adsorption point from the first virtual object based on a motion posture of the first virtual object;
[0008] In the scene interface, the crosshair is displayed moving toward the first adsorption point.
[0009] In a possible implementation, the auxiliary sight line includes a first line segment, a second line segment, and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; determining the first adsorption point based on an intersection of a ray along the first moving direction and the auxiliary sight line includes:
[0010] In the case where the intersection point is the intersection point of the ray and the first line segment, the head key point is determined as the first adsorption point; or,
[0011] In the case where the intersection point is the intersection point of the ray and the second line segment, the trunk key point is determined as the first adsorption point; or,
[0012] When the intersection point is the intersection point of the ray and the third line segment, the intersection point of the ray and the third line segment is determined as the first adsorption point.
[0013] In another possible implementation, the auxiliary sight line includes a first line segment, a second line segment, and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; determining the first adsorption point based on a point in the auxiliary sight line that is on the same horizontal line as the crosshair includes:
[0014] When the crosshair and the point in the first line segment are located on the same horizontal line, the key point of the head is determined as the first adsorption point; or
[0015] When the crosshair and the point in the second line segment are located on the same horizontal line, the torso key point is determined as the first adsorption point; or,
[0016] When the crosshair and the point in the third line segment are located on the same horizontal line, the point in the third line segment that is located on the same horizontal line as the crosshair is determined as the first adsorption point.
[0017] On the other hand, a crosshair control device is provided, the device comprising:
[0018] A display module, used to display a scene interface of a virtual scene, wherein the scene interface displays a first virtual object and a crosshair;
[0019] a determination module, configured to determine a first moving direction of the first moving operation in response to a first moving operation on the crosshair;
[0020] An acquisition module, configured to determine a first adsorption point from the first virtual object based on a motion posture of the first virtual object when the crosshair is within an adsorption range of the first virtual object and the first moving direction is close to the first virtual object;
[0021] The display module is further used to display the movement of the crosshair toward the first adsorption point in the scene interface.
[0022] In a possible implementation, the acquisition module is configured to determine an auxiliary sight line of the first virtual object based on a motion posture of the first virtual object; and determine the first adsorption point from the auxiliary sight line of the first virtual object.
[0023] In another possible implementation, the acquisition module is used to determine positions of key points on the first virtual object in the motion posture of the first virtual object; and connect the determined key points to form the auxiliary aiming line.
[0024] In another possible implementation, the acquisition module is used to determine the first adsorption point based on the intersection of a ray along the first moving direction and the auxiliary sight line, the ray starting from the current position of the crosshair; or, determine the first adsorption point based on a point in the auxiliary sight line that is on the same horizontal line as the crosshair; or, determine the point in the auxiliary sight line that has the smallest distance to the crosshair as the first adsorption point.
[0025] In another possible implementation, the auxiliary aiming line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; the determination module is used to determine the head key point as the first adsorption point when the intersection point is the intersection point of the ray and the first line segment; or, when the intersection point is the intersection point of the ray and the second line segment, determine the torso key point as the first adsorption point; or, when the intersection point is the intersection point of the ray and the third line segment, determine the intersection point of the ray and the third line segment as the first adsorption point.
[0026] In another possible implementation, the auxiliary sight line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; the determination module is used to determine the head key point as the first adsorption point when the crosshair and a point in the first line segment are on the same horizontal line; or, when the crosshair and a point in the second line segment are on the same horizontal line, determine the torso key point as the first adsorption point; or, when the crosshair and a point in the third line segment are on the same horizontal line, determine the point in the third line segment on the same horizontal line as the crosshair as the first adsorption point.
[0027] In another possible implementation, the adsorption range includes a plurality of sub-ranges; the first adsorption point is located in a first sub-range of the plurality of sub-ranges;
[0028] The determining module is further configured to determine, in response to the crosshair entering a second subrange from the first subrange, a second adsorption point located in the second subrange from the auxiliary sight line, wherein the second subrange is a subrange adjacent to the first subrange among the plurality of subranges;
[0029] The acquisition module is further used to acquire a fifth moving speed based on the existence time of the crosshair in the second sub-range and the current moving speed of the crosshair;
[0030] The display module is further used to display, in the scene interface, the movement of the crosshair toward the second adsorption point at the fifth moving speed.
[0031] In another possible implementation, the acquisition module is further configured to acquire a third movement speed based on a distance between a second virtual object controlled by the local device and the first virtual object and a second movement speed, wherein the second movement speed is a movement speed of the first movement operation, and the third movement speed is negatively correlated with the distance;
[0032] The display module is used to display, in the scene interface, the movement of the crosshair toward the first adsorption point at the third moving speed.
[0033] In another possible implementation, the acquisition module is configured to acquire the third moving speed based on the distance between the second virtual object and the first virtual object and the second moving speed when the second moving speed is greater than a speed threshold.
[0034] In another possible implementation, the acquisition module is used to query a first corresponding relationship based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, wherein the first corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; and the product of the first adjustment coefficient corresponding to the distance and the second moving speed is determined as the third moving speed.
[0035] In another possible implementation, the crosshairs are displayed when the second virtual object holds a virtual prop; the acquisition module is used to query a first corresponding relationship based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, the first corresponding relationship being a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshairs moves toward the first virtual object; obtain the adjustment coefficient corresponding to the virtual prop; and determine the third moving speed as the product of the adjustment coefficient corresponding to the virtual prop, the first adjustment coefficient corresponding to the distance, and the second moving speed.
[0036] In another possible implementation, the acquisition module is used to query a first correspondence based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, the first correspondence being a correspondence between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; obtain a scaling ratio, the scaling ratio being used to map a second moving speed of the first moving operation to the virtual scene; and determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance, the scaling ratio, and the second moving speed.
[0037] In another possible implementation, multiple virtual objects are displayed in the scene interface; the acquisition module is used to determine a first virtual object that is closest to a second virtual object among the multiple virtual objects when the crosshairs is located within the adsorption range of the multiple virtual objects and the first moving direction points to the multiple virtual objects, and the second virtual object is a virtual object controlled by the local device; based on the motion posture of the first virtual object, determine the first adsorption point from the first virtual object.
[0038] In another possible implementation, the display module is further configured to display the crosshair moving along with the first virtual object in response to the first virtual object moving in the virtual scene in a direction away from the crosshair.
[0039] In another possible implementation, the display module is used to obtain a fourth moving speed in response to the first virtual object moving in the virtual scene away from the crosshair based on a difference between the displacement of the first movement operation and the displacement of the first virtual object and a third moving speed, wherein the third moving speed is the speed at which the crosshair moves toward the first adsorption point; and in the scene interface, display the movement of the crosshair following the first virtual object at the fourth moving speed.
[0040] In another possible implementation, the device further includes:
[0041] The determination module is further configured to determine a second moving direction and a moving speed of the second moving operation in response to a second moving operation on the crosshair;
[0042] a query module, configured to query a second corresponding relationship based on the distance between the second virtual object controlled by the local device and the first virtual object when the crosshair is within the adsorption range of the first virtual object and the second moving direction is away from the first virtual object, so as to obtain a second adjustment coefficient corresponding to the distance, wherein the second corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves in a direction away from the first virtual object;
[0043] The determining module is further configured to determine a fifth moving speed by multiplying a second adjustment coefficient corresponding to the distance by a moving speed of the second moving operation;
[0044] The display module is further used to display, in the scene interface, the crosshair moving in a direction away from the first virtual object at the fifth moving speed.
[0045] In another possible implementation, the acquisition module is further used to acquire an adjustment parameter corresponding to the moving speed of the second moving operation;
[0046] The determination module is used to determine the fifth moving speed by multiplying a second adjustment coefficient corresponding to the distance, an adjustment parameter corresponding to the moving speed of the second moving operation, and the moving speed of the second moving operation.
[0047] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the crosshair control method as described in the above aspects.
[0048] On the other hand, a computer-readable 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 operations performed by the crosshair control method as described in the above aspects.
[0049] On the other hand, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the operations performed by the crosshair control method as described in the above aspects are implemented.
[0050] In the solution provided by the embodiment of the present application, a virtual object in a virtual scene is provided with an adsorption range, a crosshair is located within the adsorption range of a certain virtual object, and when a user controls the crosshair to approach a first virtual object, a first adsorption point is determined from the first virtual object based on the motion posture of the first virtual object, so that the crosshair moves to the first adsorption point, so that the crosshair can aim at the first virtual object as soon as possible. This auxiliary aiming method can adapt to various motion postures of the first virtual object, so that the crosshair moves to the first adsorption point in the auxiliary aiming line that matches the motion posture, so as to avoid the situation where the aiming accuracy of the first virtual object is low under different motion postures, facilitates the user to aim at the virtual object through the crosshair, and ensures that the expected effect of the crosshair aiming at the first virtual object is closer to the result of the user's own operation, thereby ensuring the user's sense of control, improving the efficiency of human-computer interaction, and further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 It is a structural diagram of an implementation environment provided by an embodiment of the present application;
[0053] Figure 2 is a flow chart of a crosshair control method provided in an embodiment of the present application;
[0054] Figure 3 is a flow chart of another crosshair control method provided in an embodiment of the present application;
[0055] Figure 4 is a schematic diagram of an adsorption range and an auxiliary aiming line provided in an embodiment of the present application;
[0056] Figure 5 is a schematic diagram of another adsorption range and auxiliary aiming line provided in an embodiment of the present application;
[0057] Figure 6 is a schematic diagram of another adsorption range and auxiliary aiming line provided in an embodiment of the present application;
[0058] Figure 7 is a schematic diagram of another adsorption range and auxiliary aiming line provided in an embodiment of the present application;
[0059] Figure 8 is a schematic diagram of another adsorption range and auxiliary aiming line provided in an embodiment of the present application;
[0060] Fig. 9 is a schematic diagram of a crosshair moving toward a first virtual object provided by an embodiment of the present application;
[0061] Fig.10 is a flow chart of another crosshair control method provided in an embodiment of the present application;
[0062] Fig.11 is a flow chart of another crosshair control method provided in an embodiment of the present application;
[0063] Fig.12 is a flow chart of another crosshair control method provided in an embodiment of the present application;
[0064] Fig.13 It is a structural schematic diagram of a crosshair control device provided in an embodiment of the present application;
[0065] Fig.14 is a structural schematic diagram of another crosshair control device provided in an embodiment of the present application;
[0066] Fig.15 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0067] Fig.16 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the embodiments 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.
[0069] The terms "first", "second", "third", "fourth", etc. used in this application may be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, a first moving speed may be referred to as a second moving speed, and similarly, a second moving speed may be referred to as a first moving speed without departing from the scope of this application.
[0070] The terms "at least one", "a plurality", "each", and "any" used in this application include one, two, or more than two, a plurality includes two or more than two, each refers to each of the corresponding plurality, and any refers to any one of the plurality. For example, the plurality of virtual objects includes three virtual objects, and each refers to each virtual object of the three virtual objects, and any refers to any one of the three virtual objects, which can be the first virtual object, or the second virtual object, or the third virtual object.
[0071] In order to facilitate understanding of the embodiments of the present application, some terms involved in the embodiments of the present application are first explained:
[0072] Virtual scene: a virtual scene displayed (or provided) when the application is running on the terminal, that is, a scene displayed when the terminal runs a game. For example, if the game is a shooting game, the virtual scene is a scene displayed when the terminal runs the game. The virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene or a three-dimensional virtual scene, and this application does not limit this. For example, the virtual scene includes the sky, land, ocean, etc., and the land includes environmental elements such as deserts and cities. The user can control the virtual object to move in the virtual scene. Of course, the virtual scene also includes virtual props, such as virtual throwing objects, virtual buildings, virtual machinery and other props. The virtual scene can also be used to simulate the real environment under different weather conditions, such as sunny days, rainy days, foggy days or night weather. A variety of scene elements enhance the diversity and authenticity of the virtual scene. Taking the open virtual world provided by the virtual scene for the game as an example, the virtual scene in the development virtual world indicates that it is completely free and open. Players can control virtual objects to move forward and explore freely in any direction. The distance between the boundaries of various directions is very large. At the same time, there are virtual objects of various shapes and sizes in the virtual scene, which can produce various physical collisions or interactions with entities such as virtual objects controlled by players and artificial intelligence (AI) objects.
[0073] Virtual object: refers to a virtual character that can move in a virtual scene. The movable object is a virtual person, a virtual animal, an anime character, etc. The virtual object is a virtual image in the virtual scene that is used to represent the user. The virtual scene includes 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. The virtual object can crawl, walk, run, jump, drive, pick up, shoot, attack, throw, and other activities in the virtual scene. Optionally, the virtual object is a character controlled by operation on the client, or an artificial intelligence object set in a virtual environment through training, or a non-player character (NPC) set in a virtual scene. Optionally, the virtual object is a virtual character that competes in a virtual scene.
[0074] Virtual props: refers to props that can be used with virtual objects in virtual scenes. For example, virtual props are virtual guns, virtual vehicles, etc. In virtual scenes, virtual objects can interact with other virtual objects by using virtual props.
[0075] First-Person Shooting (FPS) games: First-Person Shooting games are a branch of Action Games (ACT), but like Real-Time Strategy Games (RTS), they have developed into a separate genre due to their rapid popularity in the world. First-Person Shooting 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 first-person shooting games, users no longer manipulate virtual objects on the screen to play the game like in other games, but experience the visual impact of the game in person, which greatly enhances the initiative and realism of the game. Generally, first-person shooting games provide richer plots, exquisite images, and vivid sound effects.
[0076] Aiming Down Sight (ADS): is an observation device usually made of metal. When not equipped with a sight, it is used to position the virtual prop and the aiming target on the same straight line to assist the virtual prop in aiming at a specific aiming target. At this time, the angle of the camera will move behind the sight of the virtual prop, so that the virtual prop can be accurately aimed, and it can also provide a certain zoom ratio to provide higher usability at a longer range. When equipped with a sight, 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 sight. 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.
[0077] Hip-fire: In shooting games, it refers to a shooting method without a scope. Hip-fire is a primitive way of aiming. Because it is a virtual object without a scope, the accuracy of the shooting crosshairs is often not high when hip-firing, and it is easy to deviate or shake.
[0078] Crosshair: In a first-person shooter game, it is located in the center of the field of vision. It indicates the attack position of the virtual object when attacking. For example, when the virtual object holds a virtual gun, the crosshair indicates the landing point of the virtual bullet fired by the virtual object through the virtual gun. In first-person shooters that tend to be more gameplay-oriented rather than realistic, the crosshair is located in the center of the screen to assist in aiming the weapon and represents the flying direction of the projectile of the virtual prop.
[0079] Field of View (FOV): Field of View is the field of view of the virtual camera in the virtual scene, measured in degrees. The field of view is the angle range in which the virtual camera in the virtual scene can receive images. In a first-person perspective game, since the user observes the virtual scene from a first-person perspective, the field of view of the virtual object controlled by the local device refers to the picture displayed in the scene interface, that is, the picture displayed by the user through the terminal screen. The displayed picture represents the field of view of the virtual object controlled by the local device that can observe the game world.
[0080] Mesh: A collection of vertices and polygons that represents a polyhedral shape in three-dimensional computer graphics. A mesh is usually composed of triangles or simple convex polygons.
[0081] Breathing animation: simulates the animation state when the player holds a virtual prop without any other behavior, and can show the slight shaking of the virtual object's hand.
[0082] Firing animation: Animation displayed when a virtual prop fires in a shooting game. For example, the firing animation is used to present the movement of the virtual parts of the virtual prop when the virtual prop fires, involving the forward and backward movement of the virtual firearm, the bolt movement of the charging handle of the virtual firearm, the forward and backward movement of the upper slide of the virtual firearm, the movement of the movable parts on the virtual firearm, etc., to enhance the realism and immersion of the firing performance.
[0083] Recoil: The force that pushes the virtual prop backward when the virtual prop launches any projectile. For example, when a virtual gun launches a virtual bullet, the virtual bullet is also subject to the pressure of gunpowder gas, which pushes the virtual gun to recoil and generates recoil. Generally, the larger the caliber of the virtual gun, the stronger the recoil when the virtual gun launches the virtual bullet.
[0084] Character animation: Animation used to show the movements of a virtual object holding a virtual prop when a virtual prop is fired in a shooting game. For example, character animation involves the movement of a virtual object when it is subjected to the vertical and horizontal recoil of a virtual prop. The above movements include but are not limited to the swing of the upper body of the virtual object, the follow-up movement of the lower limbs, the shaking of the arms, the movement of the head and the facial expressions, etc., so as to truly show the power of the virtual prop when firing and enhance the realism and immersion of shooting games.
[0085] Assisted aiming: When the first-person shooter game is separated from the keyboard and mouse operation, an assisted aiming function can be added. Compared with using a keyboard and mouse to play shooting games, using a handle and a touch screen to operate on a mobile terminal usually requires higher operation requirements and is more difficult to operate. Users may not be accustomed to the operation method on the mobile terminal. By adding an assisted aiming function, users can operate the game smoothly on the mobile terminal. In terms of performance, by controlling the rotation of the virtual camera, the crosshairs can be automatically aimed at the target in the field of view. When the crosshairs are within the adsorption range of the target, the assisted aiming function can be triggered. Under the control of the assisted aiming function, the crosshairs are controlled to automatically point to the target to be aimed at and follow the target for a short time.
[0086] Bone hanging point: a socket mounted on the skeleton of the object model of a virtual object. The relative position of the bone hanging point and the model skeleton remains unchanged, and the bone hanging point moves with the movement of the model skeleton.
[0087] It should be noted that the data involved in this application (including but not limited to game data, first correspondence, second correspondence, etc.) are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the game data involved in this application are all obtained with full authorization.
[0088] The crosshair control method provided in the embodiment of the present application can be executed by a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, and a car terminal, etc., but is not limited to this.
[0089] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on one computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.
[0090] In some embodiments, the crosshair control method is executed by a terminal. Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.
[0091] The terminal 101 is installed with an application provided by the server 102, which supports the scene interface display of the virtual scene, and the terminal 101 can realize functions such as games and message interaction through the application. Optionally, the application is an application in the operating system of the terminal 101, or an application provided by a third party. For example, the application is a game application, and the game application has a game function. Of course, the game application can also have other functions, such as shopping functions, navigation functions, message interaction functions, etc. The terminal 101 is a terminal used by any user, and the user can operate the virtual objects in the virtual scene through the terminal 101 to carry out activities, and the activities include at least one of crawling, walking, running, jumping, driving, picking up, shooting, attacking, and throwing. Optionally, different users use different terminals to control virtual objects respectively, and the virtual objects controlled by different terminals are located in the same virtual scene. At this time, different virtual objects can carry out activities.
[0092] Terminal 101 is used to log in to the application based on the user identification, and interact with server 102 through the application to display the scene interface of the virtual scene, display the crosshairs in the scene interface, and control the movement of the crosshairs to aim at the virtual objects in the virtual scene by moving the crosshairs.
[0093] Figure 2 is a flow chart of a crosshair control method provided in an embodiment of the present application, which is executed by a terminal, such as Figure 2 As shown, the method includes:
[0094] 201. The terminal displays a scene interface of a virtual scene, where a first virtual object and a crosshair are displayed.
[0095] Among them, the crosshair indicates the aiming position of the second virtual object controlled by the local device, that is, when the second virtual object controlled by the local device attacks, the second virtual object will attack the aiming position indicated by the crosshair, and the second virtual object is also the virtual object controlled by the terminal. For example, the crosshair displayed in the scene interface is located at the head of the first virtual object, that is, the crosshair aims at the head of the first virtual object, and the second virtual object controlled by the subsequent terminal can attack the head of the first virtual object according to the position aimed by the crosshair. In the scene interface, the crosshair is located at the center of the scene interface. The crosshair can be displayed in any form, for example, the crosshair is displayed in the form of a dot, or, in the form of a cross, or in the form of a combination of a circle and a dot. The first virtual object is any virtual object in the virtual scene, for example, the first virtual object is a virtual object in the virtual scene that belongs to a different camp from the second virtual object, or, is an artificial intelligence object.
[0096] In an embodiment of the present application, the scene interface also displays a picture of a virtual scene. For example, the scene interface also displays the environment in which the first virtual object is located.
[0097] 202. In response to a first movement operation on the aiming star, the terminal determines a first movement direction of the first movement operation.
[0098] In an embodiment of the present application, a user can control the movement of the crosshair by triggering a movement operation through a terminal, so that the crosshair is aimed at a virtual object, so as to subsequently interact with the aimed virtual object.
[0099] The first movement operation is any form of operation, for example, the first movement operation is a drag operation of the crosshairs, or a trigger operation of the movement option of the crosshairs. The movement option is used to control the movement of the crosshairs in the scene interface. The first movement direction is the movement direction indicated by the first movement operation, that is, when the user triggers the first movement operation through the terminal, the user wants to control the direction in which the crosshairs move.
[0100] 203. When the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, the terminal determines a first adsorption point from the first virtual object based on the motion posture of the first virtual object.
[0101] In the embodiment of the present application, the first virtual object can present a variety of motion postures, for example, the first virtual object presents motion postures such as running, walking, standing still, squatting, jumping, etc. When the first virtual object presents different motion postures, the relative positions of various parts of the first virtual object in the virtual scene may be different. When the crosshairs are controlled to move toward the first virtual object to aim at the first virtual object, the first virtual object is in different motion postures, and the positions where the crosshairs aim at the first virtual object are different, that is, the positions where the crosshairs aim at the first virtual object will be related to the motion posture of the first virtual object.
[0102] In an embodiment of the present application, the first moving direction of the first moving operation of the crosshair is close to the first virtual object, indicating that the first moving direction is the direction pointing to the first virtual object, which can reflect that the user wants to control the crosshair to aim at the first virtual object. The virtual object in the virtual scene is provided with an adsorption range, which indicates the range for triggering the auxiliary aiming function. The auxiliary aiming function indicates to assist the crosshair to aim at the virtual object, that is, the auxiliary aiming function indicates to assist the crosshair to aim at the virtual object as soon as possible by controlling the crosshair. In the case where the crosshair is within the adsorption range of the first virtual object, once it is determined that the user wants to control the crosshair to aim at the first virtual object, the auxiliary aiming function is triggered, and based on the motion posture of the first virtual object, a first adsorption point is determined from the first virtual object so that the determined first adsorption point matches the motion posture, so that the crosshair can be adsorbed on the first adsorption point when it is subsequently controlled to aim at the first virtual object, so as to assist the crosshair to aim at the first virtual object as soon as possible, thereby ensuring that the auxiliary aiming can adapt to the motion posture of the first virtual object.
[0103] The adsorption range is a range of any shape centered on the first virtual object, for example, a rectangular range centered on the first virtual object, or a circular range centered on the first virtual object. In the embodiment of the present application, the first virtual object is located within the adsorption range, which is equivalent to setting an adsorption range around the first virtual object.
[0104] 204. In the scene interface, the terminal displays the crosshair moving toward the first adsorption point.
[0105] In an embodiment of the present application, when the first adsorption point on the first virtual object is determined, the crosshair is displayed moving toward the first adsorption point in the scene interface to show that the crosshair moves toward the first virtual object, so that the crosshair can aim at the first virtual object as soon as possible.
[0106] In the solution provided by the embodiment of the present application, a virtual object in a virtual scene is provided with an adsorption range, a crosshair is located within the adsorption range of a certain virtual object, and when a user controls the crosshair to approach a first virtual object, a first adsorption point is determined from the first virtual object based on the motion posture of the first virtual object, so that the crosshair moves to the first adsorption point, so that the crosshair can aim at the first virtual object as soon as possible. This auxiliary aiming method can adapt to various motion postures of the first virtual object, so that the crosshair moves to the first adsorption point in the auxiliary aiming line that matches the motion posture, so as to avoid the situation where the aiming accuracy of the first virtual object is low under different motion postures, facilitates the user to aim at the virtual object through the crosshair, and ensures that the expected effect of the crosshair aiming at the first virtual object is closer to the result of the user's own operation, thereby ensuring the user's sense of control, improving the efficiency of human-computer interaction, and further improving the user experience.
[0107] exist Figure 2 On the basis of the illustrated embodiment, the embodiment of the present application triggers the auxiliary aiming function only when the second moving speed of the first moving operation is greater than the speed threshold, so as to control the crosshairs to move to the first adsorption point in the aiming auxiliary line of the first virtual object, so that the crosshairs is adsorbed on the first adsorption point to achieve aiming at the first virtual object. The specific process is detailed in the following embodiment.
[0108] Figure 3 is a flow chart of a crosshair control method provided in an embodiment of the present application, which is executed by a terminal, such as Figure 3 As shown, the method includes:
[0109] 301. The terminal displays a scene interface of a virtual scene, where a first virtual object and a crosshair are displayed.
[0110] In a possible implementation, a second virtual object controlled by the local device is also displayed in the scene interface.
[0111] 302. In response to a first movement operation on a sight star, the terminal determines a first movement direction and a second movement speed of the first movement operation.
[0112] The second moving speed is the moving speed of the first moving operation.
[0113] In one possible implementation, the first movement operation on the aiming star is a sliding operation of the user on the screen of the terminal, then step 302 includes: in response to detecting the sliding operation on the screen of the terminal, the terminal determines the direction from the starting point of the sliding operation to the ending point as the sliding direction of the sliding operation, and determines the ratio between the distance between the starting point and the ending point and the sliding duration as the sliding speed of the sliding operation.
[0114] The sliding operation is the first movement operation on the aiming star, the sliding direction of the sliding operation is the first movement direction, and the sliding speed of the sliding operation is the second movement speed of the first movement operation.
[0115] In an embodiment of the present application, when the terminal displays a scene interface through a screen, the sliding operation triggered by the user on the screen of the terminal is an operation to move the crosshairs displayed in the scene interface, that is, the user can move the crosshairs by sliding on the screen of the terminal to adjust the position of the crosshairs in the virtual scene. The direction from the starting point of the sliding operation to the end point is the sliding direction of the sliding operation. The sliding duration is the time it takes for the user to slide from the starting point to the end point when the sliding operation is triggered. The distance between the starting point and the end point is the displacement of the sliding operation, and the ratio of the displacement to the sliding duration is the sliding speed of the sliding operation.
[0116] In an embodiment of the present application, the user can control the movement of the crosshair by sliding on the screen of the terminal to adjust the position of the crosshair in the virtual scene, and determine the sliding direction and sliding speed based on the starting point and end point of the sliding operation. This not only improves the convenience of controlling the movement of the crosshair, but also ensures the accuracy of the determined sliding direction and sliding speed, thereby ensuring the accuracy of subsequent control of the movement of the crosshair.
[0117] Optionally, the process of determining the sliding direction of the sliding operation includes: constructing a vector from the starting point to the ending point based on the coordinates of the starting point and the ending point on the screen, and the vector is used to represent the first moving direction.
[0118] In the embodiment of the present application, a vector is formed based on the coordinates of the starting point and the ending point of the sliding operation, and the first moving direction is represented in the form of a vector to ensure the accuracy of the determined first moving direction.
[0119] Optionally, the sliding speed is represented by the number of pixels moving per unit time, and the process of determining the sliding speed of the sliding operation includes: determining the number of pixels between the starting point and the end point of the sliding operation, and determining the ratio of the number of pixels to the sliding duration as the sliding speed.
[0120] In one possible implementation, the crosshairs is located at the center of the scene interface, the first moving direction is the rotation direction of the virtual camera in the virtual scene, the second moving speed is the rotation angle of the virtual camera in the virtual scene, and the first moving operation on the crosshairs is a sliding operation of the user on the screen of the terminal. Then, step 302 includes: the terminal responds to the sliding operation on the crosshairs, determines the direction from the starting point to the ending point of the sliding operation as the rotation direction of the virtual camera in the virtual scene, determines the ratio between the distance between the starting point and the ending point and the sliding duration as the sliding speed of the sliding operation, maps the sliding speed of the sliding operation to the virtual scene, and obtains the rotation speed of the virtual camera.
[0121] The second moving speed is expressed in the form of an angle, which is equivalent to the angle of rotation per unit time.
[0122] In an embodiment of the present application, the picture displayed in the scene interface is a picture taken by a virtual camera in a virtual scene, and the crosshairs are always located at the center of the scene interface. When the user moves the crosshairs through the terminal, only the terminal controls the virtual camera in the virtual scene to rotate, so that the picture displayed in the scene interface changes, but the crosshairs are always displayed in the center of the scene interface. However, due to the change of the picture displayed in the scene interface, it is equivalent to the position of the crosshairs in the virtual scene changing. Optionally, the position of the crosshairs is equivalent to the projection of the line of sight of the virtual camera on the scene interface. For example, the intersection of the ray along the line of sight of the virtual camera and the screen of the scene interface is the projection of the line of sight of the virtual camera on the scene interface, and the position of the intersection in the scene interface is also the position of the crosshairs.
[0123] In an embodiment of the present application, by mapping the sliding direction and sliding speed of the user's sliding operation on the screen of the terminal to the virtual scene, the mapped first moving direction and second moving speed are used as the rotation direction and rotation angle of the virtual camera in the virtual scene, so that when the virtual camera in the subsequent virtual scene rotates according to the rotation direction and rotation angle, the terminal can display the pictures captured during the rotation of the virtual camera in the scene interface, which can ensure the accuracy of the control and thus ensure the accuracy of the pictures displayed subsequently.
[0124] In one possible implementation, a crosshair movement option is displayed in the scene interface, and the crosshair is moved by pushing the crosshair movement option. Step 302 includes: the terminal responds to a drag operation on the crosshair movement option, determines the dragging direction of the drag operation as a first moving direction, and determines the product of the dragging distance of the drag operation and the unit speed as a second moving speed.
[0125] In the embodiment of the present application, the dragging operation of the moving option is equivalent to the first moving operation of the crosshair. The dragging direction is the direction in which the user wants to control the movement of the crosshair, and the unit speed is the speed corresponding to dragging the moving option by a unit distance. The dragging distance is the distance between the position after dragging the moving option and the position before dragging. The greater the dragging distance, the greater the moving speed. Therefore, the product of the dragging distance and the unit speed is determined as the second moving speed. The movement of the crosshair is controlled by dragging the moving option of the crosshair, and the first moving direction and the second moving speed are determined based on the dragging direction and the dragging distance of the dragging operation. This not only improves the convenience of controlling the movement of the crosshair, but also ensures the accuracy of the determined sliding direction and sliding speed, thereby ensuring the accuracy of the subsequent control of the movement of the crosshair.
[0126] It should be noted that the embodiment of the present application is described by taking the determination of the first moving direction and the second moving speed of the first moving operation as an example. In another embodiment, there is no need to execute the above step 302, but other methods are adopted to determine the first moving direction of the first moving operation in response to the first moving operation of the aiming star.
[0127] 303. When the crosshair is within the adsorption range of the first virtual object, the first moving direction is close to the first virtual object, and the second moving speed is greater than a speed threshold, the terminal determines an auxiliary sight line of the first virtual object based on the motion posture of the first virtual object, and determines a first adsorption point from the auxiliary sight line of the first virtual object.
[0128] In an embodiment of the present application, a virtual object in a virtual scene has an auxiliary sight line, and the auxiliary sight line changes with the movement posture of the virtual object. The auxiliary sight line is a line composed of points on the virtual object that can be adsorbed by the crosshairs, that is, when the crosshairs is aimed at the virtual object, the crosshairs can only be aimed at points on the auxiliary sight line. The first adsorption point is any point determined from the auxiliary sight line. The second moving speed of the first movement operation of the crosshairs is greater than the speed threshold, indicating that the user wants to move the crosshairs in a direction close to the first virtual object as soon as possible. Therefore, when the crosshairs is within the adsorption range of the first virtual object, the first moving direction is the direction pointing to the first virtual object, and the second moving speed is greater than the speed threshold, the first adsorption point will be determined from the auxiliary sight line of the first virtual object. After the crosshairs moves toward the first virtual object, it may be adsorbed on the first adsorption point to achieve aiming at the first virtual object.
[0129] The speed threshold is an arbitrary value, for example, the speed threshold is 8. For example, the first movement operation is a sliding operation of the user on the screen of the terminal. When the second movement speed of the sliding operation is not greater than the speed threshold, the auxiliary aiming function will not be triggered; when the second movement speed is greater than the speed threshold, the auxiliary aiming function is turned on, and only then will the second movement speed be mapped to the virtual scene according to the distance between the second virtual object and the first virtual object. Figure 4 As shown, in response to the movement operation of the crosshair, the crosshair moves from the current position from the starting point to the adsorption range of the first virtual object. If the second moving speed is the first speed and the first speed is not greater than the speed threshold, the auxiliary aiming function is not triggered. If the second moving speed is the second speed and the second speed is greater than the speed threshold, the auxiliary aiming function is triggered.
[0130] In a possible implementation, the first virtual object is an object model in the shape of a capsule, and the adsorption range of the first virtual object is a rectangular space range located outside the capsule and including the capsule. Optionally, the adsorption range is a two-dimensional plane area centered on the model projection of the first virtual object, and the model projection of the first virtual object refers to a two-dimensional projection image of the object model of the first virtual object in the scene interface, for example, the two-dimensional plane area is a rectangular plane area including the model projection.
[0131] In a possible implementation, the second moving speed is expressed in the form of an angle, and the second moving speed is used to represent the rotation angle of the virtual camera in the virtual scene, and the speed threshold is expressed in the form of an angle.
[0132] In a possible implementation, the auxiliary sight line of the first virtual object is the central axis of the first virtual object, is included in the adsorption range of the first virtual object, and the auxiliary sight line is connected to the boundary of the adsorption range.
[0133] For example, taking the adsorption range as a rectangular range, the first virtual object is within the adsorption range, the auxiliary sight line of the first virtual object is equivalent to the central axis of the first virtual object, the auxiliary sight line runs through the first virtual object, and is connected to the upper and lower boundaries of the rectangular range. The rectangular adsorption range of the first virtual object and the auxiliary sight line are as follows: Figure 5 shown.
[0134] In a possible implementation, step 303 includes: determining positions of key points on the first virtual object in the motion posture of the first virtual object; and connecting the determined key points to form an auxiliary aiming line.
[0135] In an embodiment of the present application, the auxiliary sight line of the first virtual object is formed by connecting the key points on the first virtual object. When the first virtual object is in different motion postures, the positions of the key points of the first virtual object may be different. Therefore, the auxiliary sight line of the first virtual object will change with the motion posture of the first virtual object.
[0136] The key point can be any key point on the first virtual object, for example, the key point is a skeleton point on the first virtual object. For example, the skeleton points of the first virtual object include avatar skeleton points, torso skeleton points, etc. The skeleton points of the first virtual object are inside the body of the first virtual object, and the auxiliary aiming line formed by connecting the skeleton points can serve as the central axis of the first virtual object and pass through the first virtual object.
[0137] In an embodiment of the present application, the first virtual object can present a variety of motion postures, for example, the first virtual object presents motion postures such as running, walking, standing still, squatting, jumping, etc. The motion posture of the first virtual object is related to the skeleton points of the first virtual object, that is, in the virtual scene, the position of the skeleton points changes, resulting in a change in the motion posture presented by the first virtual object. When the first virtual object presents different motion postures at the same position in the virtual scene, the skeleton points of the first virtual object may be in different positions in the virtual scene, but the relative position relationship between the skeleton points remains unchanged. The auxiliary aiming of the first virtual object is first formed by connecting the skeleton points of the first virtual object. When the motion posture of the first virtual object changes, the position of the skeleton points of the first virtual object in the virtual scene changes, which in turn causes the auxiliary aiming line formed by connecting the skeleton points of the first virtual object to change.
[0138] For example, the auxiliary aiming line is formed by connecting the head bone point and the torso bone point of the first virtual object, and the auxiliary aiming line is connected to the upper boundary and the lower boundary of the rectangular adsorption range. When the first virtual object presents different motion postures, the auxiliary aiming line of the first virtual object is as follows: Figures 5 to 8 In the embodiment of the present application, the first virtual object is an object model in the shape of a capsule, and the adsorption range of the first virtual object is a rectangular space range located outside the capsule and including the capsule. No matter at what angle the object model of the first virtual object is projected in the scene interface, such as the first virtual object is projected in the scene interface at an angle facing away from the second virtual object, or is projected in the scene interface at an angle facing sideways to the second virtual object, etc., the auxiliary aiming line of the first virtual object is always equivalent to the central axis of the first virtual object and is included in the adsorption range.
[0139] It should be noted that, in the embodiment of the present application, the auxiliary aiming function is triggered only when the second moving speed is greater than the speed threshold, and the first adsorption point is determined from the auxiliary aiming line of the first virtual object. In another embodiment, there is no need to execute the above step 303, but other methods are adopted. When the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, the first adsorption point is determined from the first virtual object based on the motion posture of the first virtual object.
[0140] 304. The terminal obtains a third moving speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed, where the third moving speed is negatively correlated with the distance.
[0141] In the embodiment of the present application, when aiming at the first virtual object in the virtual scene by controlling the movement of the crosshair, the greater the distance between the first virtual object and the second virtual object, the smaller the displacement of the crosshair from the current position to aim at the first virtual object, and the smaller the distance between the first virtual object and the second virtual object, the greater the displacement of the crosshair from the current position to aim at the first virtual object. Therefore, through the distance between the second virtual object and the first virtual object and the second movement speed of the first movement operation, the second movement speed is mapped to the virtual scene to obtain a third movement speed that is negatively correlated with the distance, so that the crosshair can move according to the third movement speed later, so that the user can ensure that the hand feel is consistent when controlling the crosshair through the terminal to aim at virtual objects at different distances in the virtual scene.
[0142] In a possible implementation, step 304 includes: when the second moving speed is greater than a speed threshold, acquiring a third moving speed based on the distance between the second virtual object and the first virtual object and the second moving speed.
[0143] In an embodiment of the present application, the second moving speed of the first movement operation of the crosshair is greater than the speed threshold, indicating that the user wants to move the crosshair toward the first virtual object as quickly as possible. Only when the second moving speed is greater than the speed threshold will the second moving speed be mapped to the virtual scene according to the distance between the second virtual object and the first virtual object, so that the crosshair can be subsequently displayed moving at the third moving speed, so that the determined third moving speed matches the user's intention, thereby ensuring the accuracy of the determined third moving speed, and further ensuring that the subsequent crosshair can aim at the first virtual object as quickly as possible, thereby improving the efficiency of human-computer interaction.
[0144] It should be noted that, in the embodiment of the present application, when the crosshair is within the adsorption range of the first virtual object, the first moving direction is close to the first virtual object, and the second moving speed is greater than the speed threshold, the first adsorption point is first determined, and then the third moving speed is obtained. In another embodiment, there is no need to perform the above steps 303-304, but other methods are adopted. When the crosshair is within the adsorption range of the first virtual object, the first moving direction is close to the first virtual object, and the second moving speed is greater than the speed threshold, the terminal obtains the third moving speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed, and the third moving speed is negatively correlated with the distance; based on the motion posture of the first virtual object, the auxiliary aiming line of the first virtual object is determined, and the first adsorption point is determined from the auxiliary aiming line of the first virtual object.
[0145] 305. In the scene interface, the terminal displays the crosshair moving toward the first adsorption point at the third moving speed.
[0146] In an embodiment of the present application, based on the distance between the first virtual object and the second virtual object, the second moving speed of the first movement operation of the crosshair is mapped to the virtual scene to obtain a third moving speed, and the crosshair is displayed in the scene interface moving toward the first adsorption point at the third moving speed, which is equivalent to the crosshair moving toward the first virtual object at the third moving speed, so that it can be subsequently adsorbed on the first adsorption point on the virtual object, so that the crosshair can aim at the first virtual object as soon as possible.
[0147] In one possible implementation, the crosshairs are shown moving toward the first adsorption point by rotating a virtual camera in a virtual scene, and the third moving speed is equivalent to the rotation angle of the virtual camera in the virtual scene. Step 305 includes: the terminal controls the virtual camera to rotate toward the first adsorption point at the third moving speed, so that in the scene interface, the crosshairs are displayed moving toward the first adsorption point at the third moving speed.
[0148] In an embodiment of the present application, the scene interface displays a picture obtained by shooting a virtual scene with a virtual camera. The virtual camera is controlled to move toward a first adsorption point on a first virtual object at a third moving speed so that the scene interface displays a picture captured during the rotation of the virtual camera. The picture displayed in the scene interface keeps changing, but the crosshairs are always displayed at the center of the scene interface, thereby presenting an effect of the crosshairs moving toward the first adsorption point at the third moving speed.
[0149] It should be noted that the embodiment of the present application is described by taking the movement of the crosshair to the first adsorption point in the auxiliary aiming line of the first virtual object as an example. In another embodiment, there is no need to execute the above steps 304-305, but other methods are adopted to display the movement of the crosshair to the first adsorption point in the scene interface.
[0150] In the solution provided by the embodiment of the present application, a virtual object in a virtual scene is provided with an adsorption range, a crosshair is located within the adsorption range of a certain virtual object, and when a user controls the crosshair to approach a first virtual object, a first adsorption point is determined from the first virtual object based on the motion posture of the first virtual object, so that the crosshair moves to the first adsorption point, so that the crosshair can aim at the first virtual object as soon as possible. This auxiliary aiming method can adapt to various motion postures of the first virtual object, so that the crosshair moves to the first adsorption point in the auxiliary aiming line that matches the motion posture, so as to avoid the situation where the aiming accuracy of the first virtual object is low under different motion postures, facilitates the user to aim at the virtual object through the crosshair, and ensures that the expected effect of the crosshair aiming at the first virtual object is closer to the result of the user's own operation, thereby ensuring the user's sense of control, improving the efficiency of human-computer interaction, and further improving the user experience.
[0151] In the embodiment of the present application, based on the distance between the first virtual object and the second virtual object, the second movement speed of the first movement operation of the crosshair is mapped to the virtual scene to obtain a third movement speed, so that the crosshair moves toward the first virtual object at the third movement speed, so that the crosshair can aim at the first virtual object as soon as possible, and the third movement speed is negatively correlated with the distance. In this way, it can not only ensure that the user feels the same when controlling the crosshair through the terminal to aim at virtual objects at different distances in the virtual scene, but also facilitate the user to aim at the virtual object through the crosshair, improve the efficiency of human-computer interaction, and thus improve the user experience.
[0152] In the implementation of the present application, since the first virtual object has only one auxiliary aiming line, the auxiliary aiming line is equivalent to the central axis of the first virtual object. By determining the first adsorption point of the crosshair from the auxiliary aiming line, the crosshair is displayed to move to the first adsorption point at a third moving speed to be adsorbed on the first adsorption point to achieve aiming at the first virtual object. This auxiliary aiming method can adapt to various motion postures of the first virtual object. No matter what motion posture the first virtual object is in, the crosshair can be moved to the first adsorption point in the auxiliary aiming line to avoid the situation where the aiming accuracy of the first virtual object is low under different motion postures, and will not affect the aiming of the crosshair to the first virtual object. While ensuring the expected effect of hitting, it is closer to the result of the user's own operation, thereby ensuring the user's sense of control, thereby improving the user experience, and facilitating the user to control the crosshair aiming through the terminal, thereby improving the user experience. In addition, in this solution, there is no need to allocate different auxiliary aiming configurations for different motion postures of the first virtual object, which reduces the configuration of auxiliary aiming configurations under different motion postures.
[0153] In the application embodiment, the adsorption points for aiming at the virtual object are determined by auxiliary aiming lines, so that the crosshairs can be smoothly moved to aim at the virtual object, thereby avoiding the situation where multiple adsorption points pull the crosshairs when multiple fixed adsorption points are configured on the virtual object, thereby improving the smoothness of the operation and thus improving the user experience.
[0154] In the above Figure 3 Based on the embodiment shown in FIG. 1 , the embodiment of the present application provides a schematic diagram of a crosshair moving toward a first virtual object, such as Fig. 9 As shown, the crosshair at the current position will move toward the first virtual object along the adsorption direction so that the crosshair is adsorbed on the first virtual object.
[0155] In the above Figure 3 Based on the illustrated embodiment, the process of acquiring the third moving speed includes the following six methods.
[0156] The first method includes the following steps 1-2:
[0157] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0158] In the embodiment of the present application, the first virtual object is referred to as the target virtual object to be aimed at, the first corresponding relationship is the corresponding relationship applicable when the crosshair moves in a direction close to the target virtual object, and the first corresponding relationship includes a distance and a corresponding adjustment coefficient. Based on the distance between the second virtual object and the first virtual object, the first adjustment parameter corresponding to the distance can be determined from the first corresponding relationship to ensure the accuracy of the determined adjustment coefficient.
[0159] Wherein, the distance can be expressed in any unit, for example, the unit of the distance is centimeters. The first corresponding relationship can be expressed in any form, for example, the first corresponding relationship is expressed in the form of a curve graph, the X-axis in the curve graph is used to represent the distance, the Y-axis in the curve graph is used to represent the adjustment parameter, and the curve in the curve graph can represent the adjustment parameter corresponding to each distance. For example, the first corresponding relationship is Auto Aim Close Scale By Dist (automatically aiming at the distance and intensity of the target). The first adjustment coefficient is an arbitrary value, for example, the first adjustment coefficient is a value greater than 0 and less than 1, or the first adjustment coefficient is 1, or the first adjustment coefficient is a value greater than 1.
[0160] In a possible implementation manner, the distance in the first corresponding relationship is negatively correlated with the corresponding adjustment coefficient.
[0161] For example, in the first corresponding relationship, the larger the distance is, the smaller the adjustment coefficient corresponding to the distance is, and the smaller the distance is, the larger the adjustment coefficient corresponding to the distance is.
[0162] In the embodiment of the present application, the greater the distance between the first virtual object and the second virtual object, the smaller the displacement of the crosshair from the current position to aim at the first virtual object, and the smaller the distance between the first virtual object and the second virtual object, the greater the displacement of the crosshair from the current position to aim at the first virtual object. Therefore, the distance in the first corresponding relationship is negatively correlated with the corresponding adjustment coefficient. By querying the adjustment coefficient from the first corresponding relationship, the second moving speed of the crosshair in the virtual scene is obtained, so that the second moving speed is negatively correlated with the distance, so as to ensure that the user has a consistent feel when controlling the crosshair through the terminal to aim at virtual objects at different distances in the virtual scene.
[0163] Step 2: multiply the first adjustment coefficient corresponding to the distance by the second moving speed to determine the third moving speed.
[0164] In the embodiment of the present application, the first adjustment coefficient is equivalent to the adsorption strength of the crosshairs when it is close to the first virtual object. The product of the first adjustment coefficient and the second moving speed is used as the third moving speed, so that when the subsequent crosshairs moves toward the first virtual object at the third moving speed, the magnitude of the adsorption strength can be reflected.
[0165] In an embodiment of the present application, the first corresponding relationship is a corresponding relationship applicable when the crosshair moves in a direction close to the first virtual object. When the crosshair moves in a direction close to the first virtual object, the first corresponding relationship is queried through the distance between the second virtual object and the first virtual object, and based on the queried first adjustment coefficient, the second moving speed is mapped to the virtual scene as the moving speed of the crosshair, so that the obtained third moving speed is related to the distance to ensure the accuracy of the determined third moving speed.
[0166] It should be noted that the present application uses the product of the first adjustment coefficient and the second moving speed as an example to illustrate the third moving speed. In another embodiment, there is no need to perform the above step 2, but other methods are used to map the second moving speed to the virtual scene based on the first adjustment coefficient to obtain the third moving speed.
[0167] The second method is to display the crosshairs when the second virtual object holds a virtual prop, including the following steps 1-3:
[0168] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0169] This step 1 is the same as step 1 in the first method mentioned above, and will not be repeated here.
[0170] Step 2: Get the adjustment coefficient corresponding to the virtual props.
[0171] In the embodiment of the present application, when the second virtual object controlled by the local device holds a virtual prop, the crosshair displayed in the scene interface is equivalent to the crosshair of the virtual prop, and the position aimed at by the crosshair can be attacked later by the virtual prop held. Different virtual props may correspond to different adjustment coefficients, and the adjustment coefficient corresponding to the virtual prop can reflect the flexibility of adjusting the crosshair of the virtual prop. The larger the adjustment coefficient corresponding to the virtual prop, the higher the flexibility of the crosshair of the virtual prop, and the smaller the adjustment coefficient corresponding to the virtual prop, the lower the flexibility of the crosshair of the virtual prop.
[0172] In a possible implementation, step 2 includes: the terminal queries the third corresponding relationship based on the prop identifier of the virtual prop held by the second virtual object to obtain the adjustment coefficient corresponding to the virtual prop.
[0173] The third corresponding relationship is the corresponding relationship between the item identifier and the adjustment coefficient. The item identifier refers to the corresponding virtual item, and the item identifier can be represented in any form, for example, the item identifier is represented by a serial number or an item name.
[0174] Step 3: Determine the third moving speed as the product of the adjustment coefficient corresponding to the virtual item, the first adjustment coefficient corresponding to the distance, and the second moving speed.
[0175] In the embodiment of the present application, not only the first adjustment coefficient corresponding to the distance is taken into account, but also the adjustment coefficient corresponding to the virtual prop held by the second virtual object is taken into account. In combination with the adjustment coefficient corresponding to the virtual prop and the first adjustment coefficient corresponding to the distance, the second moving speed is mapped to the virtual scene to obtain the moving speed of the crosshair, so that the moving speed of the crosshair is related to the distance and the virtual prop held by the second virtual object, so that the moving speed of the crosshair matches the virtual prop held by the second virtual object, thereby reflecting the different difficulties in controlling the crosshairs of different virtual props, so as to ensure the accuracy of the determined moving speed of the crosshair.
[0176] The third method includes the following steps 1-3:
[0177] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0178] This step 1 is the same as step 1 in the first method mentioned above, and will not be repeated here.
[0179] Step 2: Obtain a scaling ratio, where the scaling ratio is used to map the second moving speed of the first moving operation into the virtual scene.
[0180] In an embodiment of the present application, the user controls the movement of the crosshair in the virtual scene through a first movement operation of the crosshair on the terminal. Through the scaling ratio, the second movement speed of the first movement operation can be mapped to the virtual scene as the movement speed of the crosshair, so that the crosshair moves in the virtual scene according to the movement speed of the crosshair.
[0181] The scaling ratio is an arbitrary value. In the embodiment of the present application, if the scaling ratio is greater than 1, the second moving speed of the first moving operation is amplified and used as the moving speed of the crosshair in the virtual scene; if the scaling ratio is 1, the second moving speed of the first moving operation is used as the moving speed of the crosshair in the virtual scene; if the scaling ratio is less than 1, the second moving speed of the first moving operation is reduced and used as the moving speed of the crosshair in the virtual scene.
[0182] Step 3: Determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance, the scaling ratio, and the second moving speed.
[0183] In the embodiment of the present application, not only the first adjustment coefficient corresponding to the distance is taken into consideration, but also the scaling ratio used to map the second moving speed of the first moving operation to the virtual scene is taken into consideration. The scaling ratio and the first adjustment coefficient corresponding to the distance are combined to map the second moving speed to the virtual scene to obtain the moving speed of the crosshairs, so that the moving speed of the crosshairs is related to the distance and the scaling ratio, so that the user can accurately control the movement of the crosshairs in the virtual scene by triggering the movement operation of the crosshairs, thereby ensuring the accuracy of the determined moving speed of the crosshairs.
[0184] The fourth method includes the following steps 1-3:
[0185] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0186] Step 2: Obtain an adjustment coefficient corresponding to the second moving speed, where the adjustment coefficient is positively correlated with the second moving speed.
[0187] In an embodiment of the present application, when the second moving speed of the first moving operation of the crosshair is greater than the speed threshold, the greater the second moving speed, the faster the crosshair moves toward the first virtual object, and an adjustment coefficient positively correlated with the second moving speed is obtained. The greater the second moving speed, the greater the obtained adjustment coefficient, and the smaller the second moving speed, the smaller the obtained adjustment coefficient, so as to ensure that the greater the subsequent second moving speed, the greater the adjustment range of the moving speed of the crosshair, so as to ensure that the crosshair moves toward the first virtual object faster.
[0188] Step 3: Determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance, the adjustment coefficient corresponding to the second moving speed, and the second moving speed.
[0189] In the embodiment of the present application, not only the first adjustment coefficient corresponding to the distance is taken into account, but also the adjustment coefficient corresponding to the second moving speed is taken into account. The adjustment coefficient corresponding to the second moving speed and the first adjustment coefficient corresponding to the distance are combined to map the second moving speed to the virtual scene to obtain the moving speed of the crosshairs, so that the moving speed of the crosshairs is related to the adjustment coefficient corresponding to the distance and the second moving speed, so that the moving speed of the crosshairs is positively correlated with the second moving speed, so that the greater the second moving speed, the greater the adjustment range of the moving speed of the crosshairs, so as to ensure that the speed at which the crosshairs moves toward the first virtual object is faster, so as to ensure the efficiency of the crosshairs adsorbed on the first virtual object, thereby improving the efficiency of human-computer interaction.
[0190] For example, the speed threshold is 8, compared to the second moving speed of 10. When the second moving speed is 20, when obtaining the moving speed of the crosshairs, the greater the adjustment range of the moving speed of the crosshairs, that is, the stronger the auxiliary aiming strength of the crosshairs, so that the crosshairs can be adsorbed on the first virtual object faster to aim at the first virtual object.
[0191] The fifth method includes the following steps 1-3:
[0192] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0193] Step 2: Based on the distance between the crosshair and the first virtual object, query the seventh corresponding relationship to obtain an adjustment coefficient corresponding to the distance between the crosshair and the first virtual object.
[0194] In the embodiment of the present application, the first virtual object is referred to as the target virtual object to be aimed at, and the seventh correspondence is a correspondence applicable when the crosshair moves in a direction close to the target virtual object. The seventh correspondence includes the distance between the crosshair and the first virtual object and the corresponding adjustment coefficient. Based on the distance between the crosshair and the first virtual object, the adjustment parameter corresponding to the distance between the crosshair and the first virtual object can be determined from the seventh correspondence to ensure the accuracy of the determined adjustment coefficient.
[0195] In a possible implementation, the adjustment coefficient corresponding to the distance between the crosshair and the first virtual object is negatively correlated with the distance between the crosshair and the first virtual object. In the embodiment of the present application, the closer the distance between the crosshair and the first virtual object, the slower the movement speed of the crosshair, so as to avoid the crosshair moving too fast and missing the first virtual object, so as to ensure that it can be accurately attached to the first virtual object.
[0196] Step 3: Determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance between the second virtual object and the first virtual object, the adjustment coefficient corresponding to the distance between the crosshair and the first virtual object, and the second moving speed.
[0197] In the embodiment of the present application, not only the first adjustment coefficient corresponding to the distance between the second virtual object and the first virtual object is taken into account, but also the adjustment coefficient corresponding to the distance between the crosshair and the first virtual object is taken into account. In combination with the adjustment coefficient corresponding to the distance between the crosshair and the first virtual object and the first adjustment coefficient, the second moving speed is mapped to the virtual scene to obtain the moving speed of the crosshair, so that the moving speed and distance of the crosshair are related to the distance between the crosshair and the first virtual object, so as to reflect that the moving speed of the crosshair changes with the distance between the crosshair and the first virtual object, thereby ensuring that the crosshair can be accurately adsorbed on the first virtual object without the user having to make multiple adjustments, so as to ensure the efficiency of the crosshair adsorbed on the first virtual object, thereby improving the efficiency of human-computer interaction.
[0198] The sixth method includes the following steps 1-3:
[0199] Step 1: Based on the distance between the second virtual object and the first virtual object, query the first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, where the first corresponding relationship is the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object.
[0200] Step 2: Obtain the basic adjustment coefficient.
[0201] The basic adjustment coefficient is an arbitrary value, and is used to map the moving speed of the moving operation to a coefficient required in the virtual scene.
[0202] Step 3: Determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance, the basic adjustment coefficient and the second moving speed.
[0203] In the embodiment of the present application, not only the first adjustment coefficient corresponding to the distance is taken into consideration, but also the basic adjustment coefficient used to map the moving speed of the moving operation to the virtual scene is taken into consideration. The second moving speed is mapped to the virtual scene in combination with the basic adjustment coefficient and the first adjustment coefficient corresponding to the distance to obtain the moving speed of the crosshairs, so that the moving speed of the crosshairs is related to the distance and the basic adjustment coefficient to ensure the accuracy of the determined moving speed of the crosshairs.
[0204] It should be noted that the above five methods of obtaining the third moving speed can be combined arbitrarily. Taking the combination of the above three methods as an example, the product of the basic adjustment coefficient, the first adjustment coefficient corresponding to the distance, the adjustment coefficient corresponding to the virtual props and the second moving speed is determined as the third moving speed. In the embodiment of the present application, the product of the basic adjustment coefficient, the first adjustment coefficient corresponding to the distance, the scaling ratio and the adjustment coefficient corresponding to the virtual props is equivalent to the auxiliary aiming strength, wherein the movement operation of the aiming star is a sliding operation of the user on the screen of the terminal, and the adjustment coefficient corresponding to the virtual props is equivalent to the adsorption strength correction coefficient based on the sliding operation.
[0205] In the above Figure 3 On the basis of the illustrated embodiment, the present application can also adopt three methods to determine the first adsorption point of the crosshair from the auxiliary aiming line.
[0206] The first method: the first adsorption point is determined based on the intersection of the ray along the first moving direction and the auxiliary aiming line, and the ray takes the current position of the crosshair as the starting point.
[0207] In an embodiment of the present application, in response to a first movement operation on the crosshair, the crosshair is displayed in the scene interface moving along a first movement direction, that is, a ray starting from the current position of the crosshair and along the first movement direction can indicate the direction of movement of the crosshair, and when the crosshair is aimed at the first virtual object, it will be adsorbed on a point on the auxiliary aiming line. The intersection of the ray and the auxiliary aiming line is equivalent to a point on the first virtual object that the crosshair may aim at when moving along the first movement direction. Therefore, the first adsorption point is determined based on the intersection of the ray along the first movement direction and the auxiliary aiming line.
[0208] In an embodiment of the present application, a first adsorption point is determined based on the intersection of a ray along a first moving direction and an auxiliary aiming line starting from the current position of the crosshairs, so as to ensure that the crosshairs can move in the first moving direction of the first moving operation and can be accurately adsorbed on the first virtual object, so as to ensure the accuracy of the movement of the crosshairs and the accuracy of the adsorption of the crosshairs.
[0209] In one possible implementation, the auxiliary aiming line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; then the first method includes: when the intersection point is the intersection point of the ray and the first line segment, the head key point is determined as the first adsorption point; or, when the intersection point is the intersection point of the ray and the second line segment, the torso key point is determined as the first adsorption point; or, when the intersection point is the intersection point of the ray and the third line segment, the intersection point of the ray and the third line segment is determined as the first adsorption point.
[0210] In an embodiment of the present application, the first virtual object includes a head key point and a trunk key point, which are equivalent to the head skeleton point and the trunk skeleton point of the first virtual object. No matter what kind of motion posture the first virtual object presents, the relative position relationship between the head key point and the trunk key point remains unchanged, and the auxiliary aiming line of the first virtual object is formed by connecting the head key point, the trunk key point and the upper boundary and the lower boundary of the adsorption range of the first virtual object. The first line segment is formed by connecting the head key point and the upper boundary of the adsorption range, and optionally, the first line segment is a vertical line segment. The second line segment is formed by connecting the trunk key point and the lower boundary of the adsorption range, and optionally, the second line segment is a vertical line segment. The third line segment is formed by connecting the head key point and the trunk key point, and the third line segment may be a vertical line segment or a diagonal line segment. Since the positions of the head key point and the trunk key point in the virtual scene may be different when the first virtual object is in different motion postures, but the relative position relationship between the head key point and the trunk key point remains unchanged, the style presented by the third line segment is related to the motion posture of the first virtual object. For example, when the first virtual object stands upright, the third line segment is a vertical line segment; or, when the first virtual object squats, the third line segment is an oblique line segment.
[0211] In an embodiment of the present application, taking into account the habit of users controlling virtual objects to attack other virtual objects in the game, the auxiliary aiming line is divided into multiple line segments, and the first adsorption point can be determined in different ways according to the intersection of the ray along the first moving direction and the different line segments in the auxiliary aiming line, so as to ensure that the determined first adsorption point meets the user's intention, thereby ensuring the accuracy of the determined first adsorption point, thereby improving the user experience.
[0212] It should be noted that the embodiment of the present application is described by taking the auxiliary sight line including three line segments as an example, while in another embodiment, the auxiliary sight line can also include multiple line segments, that is, the first virtual object includes multiple key points, and the auxiliary sight line of the first virtual object is formed by connecting the multiple key points with the upper boundary and the lower boundary of the adsorption range, and when determining the first adsorption point, if the ray intersects with the line segment connected to the upper boundary in the auxiliary sight line, then the key point in the line segment connected to the upper boundary is determined as the first adsorption point according to the method of determining the first adsorption point when the ray intersects with the first line segment; if the ray intersects with the line segment connected to the lower boundary in the auxiliary sight line, then the key point in the line segment connected to the lower boundary is determined as the first adsorption point according to the method of determining the first adsorption point when the ray intersects with the second line segment; if the ray intersects with the line segment not connected to the upper boundary or the lower boundary in the auxiliary sight line, then the intersection of the ray and the line segment is determined as the first adsorption point according to the method of determining the first adsorption point when the ray intersects with the third line segment.
[0213] The second method is to determine the first adsorption point based on a point in the auxiliary aiming line that is on the same horizontal line as the crosshair.
[0214] In an embodiment of the present application, considering that the user wants to control the crosshairs to move toward the first virtual object in order to aim at the first virtual object as soon as possible, but because the first movement operation triggered by the user is not accurate enough, resulting in a long time required for the crosshairs to aim at the first virtual object when moving along the first movement direction, therefore, in response to the first movement operation of the crosshairs, a point in the auxiliary aiming line that is on the same horizontal line as the current position of the crosshairs is determined as a first adsorption point, so that the distance between the determined first adsorption point and the current position of the crosshairs is as small as possible, to ensure that the crosshairs can be adsorbed on the first virtual object as soon as possible when it moves toward the adsorption point, thereby improving the aiming efficiency, and also improving the human-computer interaction efficiency, thereby improving the user experience.
[0215] In a possible implementation, the auxiliary sight line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; based on a point in the auxiliary sight line that is on the same horizontal line as the crosshair, determining the first adsorption point includes: when the crosshair and a point in the first line segment are on the same horizontal line, determining the head key point as the first adsorption point; or, when the crosshair and a point in the second line segment are on the same horizontal line, determining the torso key point as the first adsorption point; or, when the crosshair and a point in the third line segment are on the same horizontal line, determining the point in the third line segment that is on the same horizontal line as the crosshair as the first adsorption point.
[0216] In an embodiment of the present application, taking into account the user's habit of controlling virtual objects to attack other virtual objects in the game, the auxiliary aiming line is divided into multiple line segments. In response to the first movement operation of the crosshair, different line segments in the auxiliary aiming line and the points on the same horizontal line as the current position of the crosshair can determine the first adsorption point in different ways to ensure that the determined first adsorption point meets the user's intention, and when the crosshair moves to the determined first adsorption point, it can be adsorbed on the first virtual object as soon as possible to achieve aiming at the first virtual object. This not only ensures the accuracy of the determined first adsorption point, but also improves the aiming efficiency, as well as the human-computer interaction efficiency, thereby improving the user experience.
[0217] The third method: determine the point in the auxiliary aiming line with the smallest distance to the crosshairs as the first adsorption point.
[0218] In an embodiment of the present application, in response to a first movement operation on the crosshair, a first adsorption point is determined as a point in the auxiliary aiming line that has the smallest distance from the crosshair, so that the distance between the determined first adsorption point and the current position of the crosshair is minimized, to ensure that the crosshair can be adsorbed on the first virtual object as soon as possible when it moves toward the adsorption point, thereby improving aiming efficiency, improving human-computer interaction efficiency, and thereby improving user experience.
[0219] In the above Figure 3 On the basis of the shown embodiment, the embodiment of the present application can also take the adsorption range including multiple sub-ranges, and the first adsorption point is located in the first sub-range of the multiple sub-ranges as an example. When the crosshairs switches between the multiple sub-ranges, a new adsorption point can be determined for the crosshairs, and the movement speed of the crosshairs can be adjusted to ensure that the movement speed transition of the crosshairs is smooth when moving between the multiple sub-ranges. That is, the method also includes the following steps 1-3.
[0220] Step 1: In response to the sight entering the second sub-range from the first sub-range, a second adsorption point located in the second sub-range is determined from the auxiliary sighting line, and the second sub-range is a sub-range adjacent to the first sub-range among the multiple sub-ranges.
[0221] In the embodiment of the present application, in the above Figure 3 Based on the illustrated embodiment, the crosshairs moves toward a first adsorption point located in a first sub-range, after which the crosshairs may have been adsorbed on the first adsorption point, or may simply be closer to the first adsorption point but not yet adsorbed on the first adsorption point. At this time, in response to other movement operations on the crosshairs, the crosshairs changes its moving direction from the first sub-range to the second sub-range, and then a second adsorption point located in the second sub-range is determined from the auxiliary aiming line, so as to control the crosshairs to move toward the second adsorption point when moving within the second sub-range to aim at the first virtual object.
[0222] It should be noted that in response to the crosshairs entering the second sub-range from the first sub-range, the process of determining the adsorption point located in the second sub-range from the auxiliary aiming line is the same as the process of determining the first adsorption point mentioned above, and will not be repeated here.
[0223] In a possible implementation, the auxiliary aiming line includes a plurality of skeleton points of the first virtual object, and the adsorption range is divided into a plurality of sub-ranges based on a horizontal line where the plurality of skeleton points are located.
[0224] For example, if the auxiliary aiming line includes two bone points of the first virtual object, namely the head bone point and the trunk bone point, the adsorption range is divided into three sub-ranges, the first sub-range is the adsorption range above the horizontal line where the head bone point is located, the second sub-range is the adsorption range between the horizontal line where the head bone point is located and the horizontal line where the trunk bone point is located, and the third sub-range is the adsorption range below the horizontal line where the trunk bone point is located. For example, the first sub-range is the adsorption range above the horizontal line where the head bone point is located, and the second sub-range is the adsorption range between the horizontal line where the head bone point is located and the horizontal line where the trunk bone point is located; or, the first sub-range is the adsorption range between the horizontal line where the head bone point is located and the horizontal line where the trunk bone point is located, and the second sub-range is the adsorption range below the horizontal line where the trunk bone point is located.
[0225] Optionally, when configuring the first virtual object, multiple skeleton points are configured for the first virtual object through Auto Aim Target Component, so that the configured multiple skeleton points are subsequently used to form an auxiliary aiming line to aim at the first virtual object.
[0226] In one possible implementation, before step 1, the process of moving the crosshairs from the first sub-range to the second sub-range includes: in response to a third movement operation on the crosshairs, determining a moving direction and a moving speed of the third movement operation; when the crosshairs is located within the first sub-range of the first virtual object and the moving direction of the third movement operation points to the second sub-range, obtaining a sixth moving speed based on the distance between the second virtual object and the first virtual object and the moving speed of the third movement operation, and displaying in the scene interface that the crosshairs moves to the second sub-range at the sixth moving speed.
[0227] It should be noted that the process of controlling the movement of the crosshair in response to the third movement operation is the same as the process of controlling the movement of the crosshair in response to the first movement operation, and will not be described in detail here.
[0228] In the embodiment of the present application, in response to the third movement operation of the crosshair, the crosshair is displayed in the scene interface as moving from the first sub-range to the second sub-range, and once it is determined that the crosshair enters the second sub-range, the second adsorption point is determined according to the above step 1. In response to the movement operation of the crosshair, the movement direction of the crosshair can be controlled to improve the flexibility of controlling the crosshair, thereby meeting the needs of users and improving the user experience.
[0229] Step 2: Based on the existence time of the crosshair in the second sub-range and the current movement speed of the crosshair, obtain the first movement speed.
[0230] The existence duration is the time from when the crosshair enters the second sub-range, and the time it is within the second sub-range. The current moving speed of the crosshair is the moving speed when the crosshair enters the second sub-range. For example, in the above Figure 3 On the basis of the embodiment shown, the crosshairs moves to the first adsorption point in the first sub-range, and then in response to the movement operation of the crosshairs, the crosshairs moves from the first sub-range to the second sub-range. During the movement, the crosshairs may first move a distance in the first sub-range before entering the second sub-range. The movement speed of the crosshairs when entering the second sub-range is the current movement speed of the crosshairs in the above step 2.
[0231] In an embodiment of the present application, as the crosshairs moves between multiple sub-ranges, different adsorption points are determined for the crosshairs, and for different adsorption points, the moving speed of the crosshairs is adjusted to match the moving speed of the crosshairs with the current adsorption point, that is, to match the adsorption strength of the current adsorption point to the crosshairs with the moving speed of the crosshairs, and in the process of adjusting the moving speed of the crosshairs, the moving speed of the crosshairs is adjusted according to the time when the crosshairs enters the second sub-range to ensure that the moving speed of the crosshairs is smoother when moving between multiple sub-ranges, thereby ensuring that the moving speed of the crosshairs matches the user's control of the crosshairs to ensure the accuracy and controllability of controlling the crosshairs.
[0232] In one possible implementation, step 2 includes: based on the length of time that the crosshairs exists in the second sub-range, querying the fourth corresponding relationship to obtain an adjustment coefficient corresponding to the length of time, and multiplying the adjustment coefficient corresponding to the length of time by the current moving speed of the crosshairs to determine the first moving speed.
[0233] In the embodiment of the present application, the fourth corresponding relationship includes the corresponding relationship between the existence time in the second sub-range and the adjustment coefficient when the crosshair enters the second sub-range from the first sub-range. For example, the fourth corresponding relationship is represented in the form of a curve graph, the X-axis in the curve graph represents the existence time, the Y-axis in the curve graph represents the adjustment coefficient, and the curve in the curve graph represents the adjustment coefficient corresponding to each existence time. For example, the fourth corresponding relationship is Change Aim Point Time Scale.
[0234] Step 3: In the scene interface, the crosshair is displayed moving toward the second adsorption point at the first moving speed.
[0235] In an embodiment of the present application, displaying the crosshair moving toward the second adsorption point at the first moving speed in the scene interface is equivalent to the crosshair moving toward the first virtual object at the first moving speed, so that the crosshair is subsequently adsorbed on the second adsorption point on the virtual object.
[0236] It should be noted that the embodiment of the present application only takes the adjustment of the moving speed of the crosshairs once as an example. In another embodiment, as the time the crosshairs stays in the second sub-range gradually increases, the moving speed of the crosshairs is adjusted in real time according to steps 2-3 to reflect that the speed at which the crosshairs moves toward the second adsorption point will gradually increase, to reflect that after the crosshairs enters the second sub-range, the adsorption strength of the second adsorption point on the crosshairs will gradually increase with the length of time the crosshairs enters the second sub-range.
[0237] In an embodiment of the present application, when the adsorption range includes multiple sub-ranges, when the crosshairs switches between the multiple sub-ranges, a new adsorption point can be determined for the crosshairs, and based on the existence time of the crosshairs in the newly entered sub-range, the moving speed is obtained, and the crosshairs are displayed moving to the new adsorption point according to the moving speed, so that the moving speed of the crosshairs in the newly entered sub-range matches the existence time, and the moving speed of the crosshairs gradually changes with the existence time, which can ensure that the moving speed transition of the crosshairs when moving between the multiple sub-ranges is smooth, and ensure that the moving speed of the crosshairs matches the user's control of the crosshairs, thereby improving the accuracy and controllability of controlling the crosshairs.
[0238] The crosshair control scheme provided in the embodiment of the present application can adapt to the different distances between the virtual object controlled by the local device and the virtual object to be aimed at, and can accurately aim at various parts of the virtual object to be aimed at, and can adapt to various motion postures of the second virtual object, can assist the crosshair in aiming at the virtual object, and when the crosshair moves between multiple sub-ranges within the adsorption range of the aimed first virtual object, it can optimize the movement speed of the crosshair so that the movement speed transition of the crosshair when moving between the multiple sub-ranges is smooth, which can not only assist the crosshair in quickly aiming at the virtual object, but also ensure that the movement speed of the crosshair is excessively smooth so that the performance of the assisted aiming is natural, thereby improving the accuracy of the crosshair in aiming at the virtual object, without the need for users to make repeated adjustments, thereby improving the adjustment efficiency and thus improving the human-computer interaction efficiency.
[0239] It should be noted that the above Figure 3 The illustrated embodiment is described by taking the example that the crosshair is only located within the adsorption range of the first virtual object, while in another embodiment, multiple virtual objects are displayed in the scene interface, and the crosshair may be simultaneously located within the adsorption range of multiple virtual objects, then it is necessary to determine the first virtual object from the multiple virtual objects, that is, the process of determining the first virtual object includes: when the crosshair is located within the adsorption range of multiple virtual objects and the first moving direction points to the multiple virtual objects, determining the first virtual object that is closest to the second virtual object among the multiple virtual objects, where the second virtual object is the virtual object controlled by the local device.
[0240] In the embodiment of the present application, since the adsorption ranges of multiple virtual objects overlap, that is, when the crosshairs are located in the overlapping area of the adsorption ranges of multiple virtual objects, the crosshairs are equivalent to being located in the adsorption ranges of multiple virtual objects. In addition, there may be occlusion between multiple virtual objects with overlapping adsorption ranges. For example, relative to the second virtual object, the virtual object closest to the second virtual object among the multiple virtual objects is not occluded by other virtual objects among the multiple virtual objects, while the virtual object farthest from the second virtual object among the multiple virtual objects may be occluded by other virtual objects among the multiple virtual objects. Therefore, considering that if the virtual object aimed at by the crosshairs is attacked, the unobstructed virtual object is attacked as much as possible, the first virtual object closest to the second virtual object among the multiple virtual objects is used as the virtual object that the user may want to aim at, so that the crosshairs can be subsequently controlled to move toward the first virtual object to aim at the first virtual object, thereby ensuring the accuracy of the determined first virtual object.
[0241] In the above Figures 2 to 3 Based on the illustrated embodiment, the crosshair will also move with the first virtual object, that is, the method further includes: in response to the first virtual object moving in a direction away from the crosshair in the virtual scene, displaying the crosshair to move with the first virtual object.
[0242] In an embodiment of the present application, in the process of the crosshair moving toward the first virtual object to be adsorbed on the first virtual object, the virtual object in the virtual scene may move, and the crosshair will be controlled to follow the movement of the first virtual object, so that the crosshair can be adsorbed on the first virtual object to aim at the first virtual object, thereby ensuring the aiming efficiency of the crosshair, and there is no need to manually control the crosshair to aim at the first virtual object, thereby improving the efficiency of human-computer interaction.
[0243] In one possible implementation, the process of the crosshair following the movement of the first virtual object includes: in response to the first virtual object moving in a direction away from the crosshair in the virtual scene, obtaining a fourth movement speed based on a difference between a displacement of the first movement operation and a displacement of the first virtual object and a third movement speed; in the scene interface, displaying that the crosshair follows the movement of the first virtual object at the fourth movement speed.
[0244] In the embodiment of the present application, in response to the first movement operation to control the movement of the crosshair to the first virtual object, the displacement of the first movement operation will be mapped to the virtual scene to obtain the displacement of the crosshair to the first virtual object, that is, the user triggers the first movement operation to control the movement of the crosshair to the first virtual object. The larger the displacement of the first movement operation, the closer the crosshair is to the first virtual object. When the first virtual object moves in a direction away from the crosshair, the difference between the displacement of the first movement operation and the displacement of the first virtual object can reflect the change in the relative distance between the crosshair and the first virtual object. The larger the difference, the larger the relative distance between the crosshair and the first virtual object becomes. Based on the difference and the current third movement speed of the crosshair, the fourth movement speed is obtained, and the crosshair is displayed to follow the first virtual object at the fourth movement speed, so that the relative distance between the crosshair and the first virtual object gradually decreases, so that the crosshair can be adsorbed on the first virtual object as soon as possible to aim at the first virtual object, so as to ensure the aiming efficiency of the crosshair, thereby improving the efficiency of human-computer interaction.
[0245] It should be noted that, when the first virtual object moves away from the crosshairs, the movement speed of the crosshairs will be adjusted in real time based on the difference between the displacement of the first movement operation and the displacement of the first virtual object in the above manner, so that the crosshairs can follow the movement of the first virtual object and be adsorbed on the first virtual object as soon as possible.
[0246] In the above Figures 2 to 3 On the basis of the illustrated embodiment, in an embodiment of the present application, the user can also control the crosshairs to move in a direction away from the first virtual object through a movement operation, and the specific process is detailed in the following embodiment.
[0247] Fig.10 is a flow chart of a crosshair control method provided in an embodiment of the present application, which is executed by a terminal, such as Fig.10As shown, the method includes:
[0248] 1001. In response to a second movement operation on a sight star, a terminal determines a second movement direction and a second movement speed of the second movement operation.
[0249] This step is the same as the above step 302 and will not be described again.
[0250] 1002. When the crosshair is within the adsorption range of the first virtual object and the second moving direction is away from the virtual object, the terminal queries a second corresponding relationship based on the distance between the second virtual object controlled by the local device and the first virtual object to obtain a second adjustment coefficient corresponding to the distance, wherein the second corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves in a direction away from the first virtual object.
[0251] In the embodiment of the present application, the first virtual object is referred to as the target virtual object to be aimed at, the second corresponding relationship is the corresponding relationship applicable when the crosshairs moves in a direction away from the target virtual object, and the first corresponding relationship includes a distance and a corresponding adjustment coefficient. Based on the distance between the second virtual object and the first virtual object, the second adjustment parameter corresponding to the distance can be determined from the first corresponding relationship to ensure the accuracy of the determined adjustment coefficient.
[0252] The second correspondence can be expressed in any form, for example, the second correspondence is expressed in the form of a curve graph, the X-axis in the curve graph is used to represent the distance, the Y-axis in the curve graph is used to represent the adjustment parameter, and the curve in the curve graph can represent the adjustment parameter corresponding to each distance. For example, the second correspondence is Auto Aim Away Scale By Dist (automatically aiming away from the target distance and intensity).
[0253] In a possible implementation manner, the distance in the second corresponding relationship is negatively correlated with the corresponding adjustment coefficient.
[0254] For example, in the second corresponding relationship, the larger the distance is, the smaller the adjustment coefficient corresponding to the distance is, and the smaller the distance is, the larger the adjustment coefficient corresponding to the distance is.
[0255] 1003. The terminal determines a fifth moving speed as a product of a second adjustment coefficient corresponding to the distance and a moving speed of the second moving operation.
[0256] In the embodiment of the present application, the second adjustment coefficient is equivalent to the adsorption strength of the crosshairs moving away from the first virtual object. The product of the second adjustment coefficient and the moving speed of the second movement operation is used as the fifth moving speed, so that when the subsequent crosshairs move away from the first virtual object at the fifth moving speed, the size of the adsorption strength can be reflected.
[0257] In an embodiment of the present application, the second correspondence is a correspondence applicable when the crosshair moves in a direction away from the target virtual object. When the crosshair moves in a direction away from the first virtual object, the second correspondence is queried through the distance between the second virtual object and the first virtual object, and the movement speed of the crosshair is adjusted based on the queried second adjustment coefficient so that the obtained fifth movement speed is related to the distance.
[0258] In a possible implementation manner, the adjustment coefficient in the second corresponding relationship is less than 1.
[0259] In an embodiment of the present application, the fifth moving speed obtained by the second adjustment coefficient is less than the moving speed of the second moving operation, so that the moving speed of the crosshairs when moving in the direction away from the first virtual object is as small as possible, so as to avoid the situation where the crosshairs is no longer aimed at the first virtual object due to user's misoperation, so as to ensure that the crosshairs can aim at the virtual object as much as possible.
[0260] It should be noted that the present application uses the product of the second adjustment coefficient and the second moving speed as an example of the fifth moving speed. In another embodiment, there is no need to perform the above step 2, but other methods are used to adjust the second moving speed based on the second adjustment coefficient to obtain the fifth moving speed.
[0261] 1004. In the scene interface, the terminal displays the crosshair moving in a direction away from the virtual object at a fifth moving speed.
[0262] In the embodiment of the present application, the second corresponding relationship is a corresponding relationship applicable when the crosshair moves in a direction away from the target virtual object. When the crosshair moves in a direction away from the first virtual object, the movement speed of the crosshair is adjusted based on the distance between the second virtual object and the first virtual object and the second corresponding relationship, so that the obtained fifth movement speed is related to the distance, so that the determined movement speed conforms to the situation where the crosshair is controlled to move away from the first virtual object when the auxiliary aiming function has been triggered, so as to ensure that the determined movement speed matches the user's actual intention, so as to ensure the accuracy of the determined fifth movement speed.
[0263] Moreover, when the adjustment coefficient in the second corresponding relationship is less than 1, the fifth moving speed obtained by the second adjustment coefficient is less than the moving speed of the second moving operation, so that the moving speed of the crosshairs moving in the direction away from the first virtual object is as small as possible, so as to avoid the situation where the crosshairs are separated from the aimed first virtual object due to the user's misoperation, so as to ensure that the crosshairs can aim at the virtual object as much as possible.
[0264] In the above Fig.10On the basis of the illustrated embodiment, the user can also obtain a fourth moving speed in combination with the adjustment parameter corresponding to the moving speed of the second moving operation. The specific process is detailed in the following embodiment.
[0265] Fig.11 is a flow chart of a crosshair control method provided in an embodiment of the present application, which is executed by a terminal, such as Fig.11 As shown, the method includes:
[0266] 1101. In response to a second movement operation on the aiming star, the terminal determines a second movement direction and a second movement speed of the second movement operation.
[0267] 1102. When the crosshair is within the adsorption range of the first virtual object and the second moving direction is away from the virtual object, the terminal queries a second corresponding relationship based on the distance between the second virtual object controlled by the local device and the first virtual object to obtain a second adjustment coefficient corresponding to the distance, wherein the second corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves in a direction away from the first virtual object.
[0268] The steps 1101-1102 are the same as the above steps 1001-1002 and will not be repeated here.
[0269] 1103. The terminal obtains an adjustment parameter corresponding to a moving speed of the second moving operation.
[0270] In an embodiment of the present application, when the second movement operation is an operation of controlling the crosshair to move away from the first virtual object, an adjustment parameter corresponding to the movement speed of the second movement operation is also obtained, and the adjustment parameter is used to adjust the movement speed of the crosshair away from the first virtual object.
[0271] In a possible implementation, step 1103 includes: the terminal queries the fifth corresponding relationship based on the moving speed of the second moving operation to obtain an adjustment parameter corresponding to the moving speed of the second moving operation.
[0272] The fifth correspondence is the correspondence between the moving speed of the moving operation of controlling the crosshair to move away from the first virtual object and the adjustment parameter when the crosshair moves away from the first virtual object. The fifth correspondence can be expressed in any form, for example, the fifth correspondence is expressed in the form of a curve graph, the X-axis in the curve graph is used to represent the moving speed, the Y-axis in the curve graph is used to represent the adjustment parameter, and the curve in the curve graph can represent the adjustment parameter corresponding to each moving speed. For example, the fifth correspondence is Lock Degress Factor Away Mid (adjustment coefficient away from the locked target).
[0273] In one possible implementation, the second movement operation on the aiming star is a sliding operation of the user on the screen of the terminal. Step 1103 includes: the terminal determines the sliding coefficient of the moving speed of the second movement operation, queries the sixth corresponding relationship, obtains the adjustment parameter corresponding to the sliding coefficient, and determines the adjustment parameter corresponding to the sliding coefficient as the adjustment parameter corresponding to the moving speed of the second movement operation.
[0274] The sliding coefficient is used to indicate the situation of triggering the second movement operation. The sixth corresponding relationship is the corresponding relationship between the sliding coefficient and the adjustment parameter corresponding to the movement operation of controlling the crosshair to move away from the first virtual object when the crosshair moves away from the first virtual object. The sixth corresponding relationship can be expressed in any form, for example, the sixth corresponding relationship is expressed in the form of a curve graph, the X-axis in the curve graph is used to indicate the sliding coefficient, the Y-axis in the curve graph is used to indicate the adjustment parameter, and the curve in the curve graph can indicate the adjustment parameter corresponding to each sliding coefficient.
[0275] In one possible implementation, the moving speed of the second moving operation is represented by the rotation angle of a virtual camera in a virtual scene, and the rotation angle of the virtual camera includes a pitch angle and a yaw angle. The process of determining the sliding coefficient of the moving speed of the second moving operation includes: determining the larger value of the pitch angle and the yaw angle included in the rotation angle of the virtual camera as the sliding coefficient of the second moving operation.
[0276] Optionally, the process of obtaining the pitch angle and the yaw angle includes: the terminal extracts the pitch angle and the yaw angle from the Rotation Input Cache.
[0277] In the embodiment of the present application, the Rotation Input Cache is used to store the rotation angle input by the user.
[0278] Optionally, the process of determining the rotation angle of the virtual camera includes: the terminal responds to a sliding operation toward the aiming star, determines the direction from the starting point of the sliding operation to the ending point as the rotation direction of the virtual camera in the virtual scene, determines the ratio between the distance between the starting point and the ending point and the sliding duration as the sliding speed of the sliding operation, maps the sliding speed of the sliding operation to the virtual scene, and obtains the rotation angle of the virtual camera.
[0279] 1104. The terminal determines a product of a second adjustment coefficient corresponding to the distance, an adjustment parameter corresponding to a moving speed of the second moving operation, and the moving speed of the second moving operation as a fifth moving speed.
[0280] This step is the same as the above step 1003 and will not be repeated here.
[0281] It should be noted that the embodiment of the present application obtains the fifth moving speed in combination with the adjustment parameters corresponding to the moving speed of the second moving operation. In another embodiment, there is no need to execute the above steps 1103-1104, but other methods are adopted to multiply the second adjustment coefficient corresponding to the distance and the moving speed of the second moving operation to determine the fifth moving speed.
[0282] 1105. The terminal displays, in the scene interface, a crosshair moving in a direction away from the first virtual object at a fifth moving speed.
[0283] In an embodiment of the present application, the second corresponding relationship is a corresponding relationship applicable when the crosshairs moves in a direction away from the target virtual object. When the crosshairs moves in a direction away from the first virtual object, a mechanism is adopted to lock the crosshairs and aim at the first virtual object. Based on the distance between the second virtual object and the first virtual object and the second corresponding relationship, combined with the adjustment parameters corresponding to the moving speed of the second moving operation, the moving speed of the crosshairs is adjusted so that the obtained fifth moving speed is related to the distance and the moving speed of the second moving operation to ensure the accuracy of the determined fifth moving speed, to avoid the situation where the crosshairs deviates from the aimed first virtual object due to user's misoperation, to ensure that the crosshairs can aim at the virtual object as much as possible.
[0284] In addition, based on the above-mentioned embodiment, when the crosshair is within the adsorption range of the first virtual object, the auxiliary aiming function continues to take effect, and the moving speed of the crosshair is adjusted in accordance with the method provided in the embodiment of the present application, so that the crosshair can aim at the first virtual object as much as possible. In addition, the user can also control the crosshair to move outside the adsorption range of the first virtual object. After the crosshair moves out of the adsorption range of the first virtual object, if the time length of the crosshair moving out of the adsorption range is less than the time length threshold, the auxiliary aiming function continues to take effect, and the moving speed of the crosshair is adjusted in accordance with the above-mentioned embodiment, so that the crosshair can aim at the first virtual object as much as possible; and if the time length of the crosshair moving out of the adsorption range is not less than the time length threshold, the auxiliary aiming function fails, and the moving speed of the crosshair is no longer adjusted. The moving speed of the moving operation of the crosshair is only mapped to the virtual scene, and the crosshair is displayed to move along the moving direction of the moving operation according to the mapped moving speed.
[0285] In addition, in the crosshair control method provided in the embodiment of the present application, the terminal displays the video frames frame by frame in the form of the video frames of the game, so as to present the game screen in the scene interface. In the above embodiment, the process of controlling the movement of the crosshair in response to the movement operation of the crosshair can be based on the time interval of the terminal displaying the game video frame. At each time interval, the crosshair is controlled according to the crosshair control method provided in the embodiment of the present application, so that the position of the crosshair after movement is displayed in the next video frame, and then the terminal presents a picture of the crosshair moving toward the first virtual object in the process of continuously displaying multiple video frames of the game. Among them, the time interval between two adjacent video frames is of any duration, for example, the time interval is 0.3 seconds or 0.2 seconds, etc. In the embodiment of the present application, the first movement operation triggered by the user may correspond to multiple time intervals. In response to the first movement operation, based on the currently displayed video frame, according to the above Figures 2 to 11 Based on the embodiment shown, a second moving speed of the crosshair is determined, and a display position of the crosshair in a next video frame is determined, and then the next video frame is displayed. The above steps are repeated, and the terminal presents a picture of the crosshair moving toward the first virtual object during the process of continuously displaying multiple video frames of the game.
[0286] In the embodiment of the present application, based on the embodiment shown above, in response to the movement operation of the crosshair, the process of controlling the movement of the crosshair to the first virtual object belongs to the active adsorption logic, that is, the active adsorption logic is actively controlled by the user to adsorb the crosshair on a certain virtual object. In addition, the embodiment of the present application also provides a passive adsorption logic, that is, an adsorption logic that is not based on the aiming operation actively turned on by the user. When the crosshair is within the adsorption range of the first virtual object, the passive adsorption logic of the crosshair is triggered. The passive adsorption logic does not depend on the movement operation of the crosshair triggered by the user. In the case where the user does not trigger the movement operation of the crosshair, as long as the crosshair is within the adsorption range of the first virtual object, the passive adsorption logic of the crosshair can be triggered. In the case of triggering the passive adsorption logic, the process of adsorption of the crosshair to the first virtual object is the same as the process of adsorption of the crosshair to the first virtual object in the case of the above-mentioned active adsorption logic triggered by the user, and will not be repeated here. Under the active adsorption logic and the passive adsorption logic, the aiming speed is configured in both the firing state and the non-firing state, that is, the movement speed of the crosshair is configured in both the firing state and the non-firing state. For example, Passive AutoAim Speed (passive adsorption aiming speed in the unfired state), Passive Auto Aim Fire Speed (passive adsorption aiming speed in the fired state), Auto Aim Speed (active adsorption aiming speed in the unfired state), AutoAim Fire Speed (active adsorption aiming speed in the fired state). In addition, in the fired state, according to the above-mentioned active adsorption logic, the crosshairs are adsorbed on a certain adsorption point of the first virtual object. After a certain interval, the active adsorption logic is turned off. At this time, the crosshairs have been aimed at the first virtual object, and there is no need to trigger the active adsorption logic. The interval period is of any length, for example, 5 seconds, or the length of time required for the second virtual object to shoot any number of projectiles based on the handheld virtual props.
[0287] Based on the above Figure 2 To the embodiment shown in the figure, the embodiment of the present application also provides a flow chart of a crosshair control method, such as Fig.12 As shown, the method includes:
[0288] Step 1: The user triggers a movement operation of the crosshair through the terminal to control the movement of the crosshair in the virtual scene to find a virtual object to be aimed at. When the crosshair is within the adsorption range of multiple virtual objects, a ray detection method is adopted to select the first virtual object among the multiple virtual objects that is closest to the second virtual object controlled by the user through the terminal as the virtual object to be aimed at.
[0289] In the embodiment of the present application, an aiming priority (Auto Aim Order) is adopted, and the first virtual object that is closest to the second virtual object controlled by the user through the terminal is prioritized as the virtual object to be aimed.
[0290] Step 2: The terminal determines the adsorption mode, and determines whether it is active adsorption or passive adsorption.
[0291] Step 3: The terminal calculates the user operation factor, determines whether the crosshair is close to or away from the first virtual object based on the moving operation triggered by the user, determines the first adsorption point from the auxiliary aiming line based on the moving direction indicated by the moving operation, so as to determine whether to aim at the head or torso of the first virtual object, and determines the moving speed of the crosshair based on the moving speed of the moving operation in accordance with the method provided in the above embodiment when approaching or moving away from the first virtual object.
[0292] Step 4: The terminal determines the enemy status factors, that is, whether the virtual prop held by the second virtual object is firing, the moving speed of the second virtual object, whether the second virtual object uses a skill Buff, etc.
[0293] Step 5: The terminal displays the crosshair in the scene interface and moves toward the first adsorption point of the first virtual object at the determined moving speed, so that the crosshair is adsorbed on the first adsorption point to achieve aiming at the first virtual object.
[0294] Step 6. When the terminal moves the crosshairs toward the first virtual object to aim at the first virtual object, once the first virtual object moves, the terminal displays the crosshairs automatically following the movement of the first virtual object, and when the crosshairs moves between multiple sub-ranges included in the adsorption range of the first virtual object, a new adsorption point can be determined for the crosshairs, and the movement speed of the crosshairs can be controlled so that the movement speed of the crosshairs is smooth when the crosshairs moves between the multiple sub-ranges.
[0295] Fig.13 is a structural schematic diagram of a sight control device provided in an embodiment of the present application, such as Fig.13 As shown, the device comprises:
[0296] A display module 1301 is used to display a scene interface of a virtual scene, wherein the scene interface displays a first virtual object and a crosshair;
[0297] A determination module 1302 is used to determine a first moving direction of the first moving operation in response to a first moving operation on the aiming star;
[0298] An acquisition module 1303 is configured to determine a first adsorption point from the first virtual object based on a motion posture of the first virtual object when the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object;
[0299] The display module 1301 is also used to display the movement of the crosshair toward the first adsorption point in the scene interface.
[0300] In a possible implementation, the acquisition module 1303 is configured to determine an auxiliary sight line of the first virtual object based on the motion posture of the first virtual object; and determine a first adsorption point from the auxiliary sight line of the first virtual object.
[0301] In another possible implementation, the acquisition module 1303 is used to determine the positions of key points on the first virtual object in the motion posture of the first virtual object; and connect the determined key points to form an auxiliary aiming line.
[0302] In another possible implementation, the acquisition module 1303 is used to determine the first adsorption point based on the intersection of a ray along the first moving direction and the auxiliary aiming line, where the ray takes the current position of the crosshair as a starting point; or, determine the first adsorption point based on a point in the auxiliary aiming line that is on the same horizontal line as the crosshair; or, determine the point in the auxiliary aiming line that has the smallest distance to the crosshair as the first adsorption point.
[0303] In another possible implementation, the auxiliary aiming line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a trunk key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the trunk key point; the determination module 1302 is used to determine the head key point as the first adsorption point when the intersection point is the intersection point of the ray and the first line segment; or, when the intersection point is the intersection point of the ray and the second line segment, determine the trunk key point as the first adsorption point; or, when the intersection point is the intersection point of the ray and the third line segment, determine the intersection point of the ray and the third line segment as the first adsorption point.
[0304] In another possible implementation, the auxiliary aiming line includes a first line segment, a second line segment and a third line segment, the first line segment is a line segment between a head key point of the first virtual object and an upper boundary of the adsorption range, the second line segment is a line segment between a torso key point of the first virtual object and a lower boundary of the adsorption range, and the third line segment is a line segment between the head key point and the torso key point; the determination module 1302 is used to determine the head key point as the first adsorption point when the crosshair and a point in the first line segment are on the same horizontal line; or, when the crosshair and a point in the second line segment are on the same horizontal line, determine the torso key point as the first adsorption point; or, when the crosshair and a point in the third line segment are on the same horizontal line, determine the point in the third line segment on the same horizontal line as the crosshair as the first adsorption point.
[0305] In another possible implementation, the adsorption range includes a plurality of sub-ranges; the first adsorption point is located in a first sub-range of the plurality of sub-ranges;
[0306] The determination module 1302 is further configured to determine, in response to the crosshair entering the second subrange from the first subrange, a second adsorption point located in the second subrange from the auxiliary sight line, wherein the second subrange is a subrange adjacent to the first subrange among the plurality of subranges;
[0307] The acquisition module 1303 is further configured to acquire a fifth moving speed based on the existence time of the crosshair in the second sub-range and the current moving speed of the crosshair;
[0308] The display module 1301 is further used to display, in the scene interface, the crosshair moving toward the second adsorption point at the fifth moving speed.
[0309] In another possible implementation, the acquisition module 1303 is further configured to acquire a third movement speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second movement speed, where the second movement speed is the movement speed of the first movement operation, and the third movement speed is negatively correlated with the distance;
[0310] The display module 1301 is used to display, in the scene interface, the crosshair moving toward the first adsorption point at a third moving speed.
[0311] In a possible implementation, the acquisition module 1303 is configured to acquire a third moving speed based on the distance between the second virtual object and the first virtual object and the second moving speed when the second moving speed is greater than a speed threshold.
[0312] In another possible implementation, the acquisition module 1303 is used to query the first corresponding relationship based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, the first corresponding relationship being the corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; and the product of the first adjustment coefficient corresponding to the distance and the second moving speed is determined as the third moving speed.
[0313] In another possible implementation, the crosshairs are displayed when the second virtual object holds a virtual prop; an acquisition module 1303 is used to query a first correspondence based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, wherein the first correspondence is a correspondence between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshairs moves toward the first virtual object; the adjustment coefficient corresponding to the virtual prop is obtained; and the product of the adjustment coefficient corresponding to the virtual prop, the first adjustment coefficient corresponding to the distance, and the second moving speed is determined as the third moving speed.
[0314] In another possible implementation, the acquisition module 1303 is used to query the first correspondence based on the distance between the second virtual object and the first virtual object to obtain a first adjustment coefficient corresponding to the distance, the first correspondence being the correspondence between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; obtain a scaling ratio, the scaling ratio being used to map the second moving speed of the first moving operation to the virtual scene; and determine the third moving speed as the product of the first adjustment coefficient corresponding to the distance, the scaling ratio, and the second moving speed.
[0315] In another possible implementation, multiple virtual objects are displayed in the scene interface; the acquisition module 1303 is used to determine a first virtual object that is closest to a second virtual object among the multiple virtual objects when the crosshairs are within the adsorption range of the multiple virtual objects and the first moving direction points to the multiple virtual objects, and the second virtual object is a virtual object controlled by the local device; based on the motion posture of the first virtual object, determine a first adsorption point from the first virtual object.
[0316] In another possible implementation, the display module 1301 is further configured to, in response to the first virtual object moving in a direction away from the crosshair in the virtual scene, display the crosshair to move with the first virtual object.
[0317] In another possible implementation, the display module 1301 is used to obtain a fourth moving speed in response to the first virtual object moving away from the crosshair in the virtual scene based on the difference between the displacement of the first moving operation and the displacement of the first virtual object and the third moving speed, where the third moving speed is the speed at which the crosshair moves toward the first adsorption point; in the scene interface, the crosshair is displayed to move with the first virtual object at the fourth moving speed.
[0318] In another possible implementation, Fig.14 As shown, the device also includes:
[0319] The determination module 1302 is further configured to determine a second moving direction and a moving speed of the second moving operation in response to the second moving operation on the aiming star;
[0320] A query module 1304 is configured to query a second corresponding relationship based on the distance between the second virtual object controlled by the local device and the first virtual object when the crosshair is within the adsorption range of the first virtual object and the second moving direction is away from the first virtual object, and obtain a second adjustment coefficient corresponding to the distance, wherein the second corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves in a direction away from the first virtual object;
[0321] The determination module 1302 is further configured to determine a fifth movement speed by multiplying a second adjustment coefficient corresponding to the distance by a movement speed of the second movement operation;
[0322] The display module 1301 is further used to display, in the scene interface, the crosshair moving in a direction away from the first virtual object at a fifth moving speed.
[0323] In another possible implementation, the acquisition module 1303 is further configured to acquire an adjustment parameter corresponding to the moving speed of the second moving operation;
[0324] The determination module 1302 is configured to determine a product of a second adjustment coefficient corresponding to the distance, an adjustment parameter corresponding to the moving speed of the second moving operation, and the moving speed of the second moving operation as a fifth moving speed.
[0325] It should be noted that: the crosshair control device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the crosshair control device provided in the above embodiment and the crosshair control method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0326] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the crosshair control method of the above embodiment.
[0327] Optionally, the computer device is provided as a terminal. Fig.15 The structure block diagram of a terminal 1500 provided by an exemplary embodiment of the present application is shown. The terminal 1500 includes: a processor 1501 and a memory 1502 .
[0328] The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 may be 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 1501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0329] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include 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 1502 is used to store at least one computer program, which is executed by the processor 1501 to implement the crosshair control method provided in the method embodiment of the present application.
[0330] In some embodiments, the terminal 1500 may also optionally include: a peripheral device interface 1503 and at least one peripheral device. The processor 1501, the memory 1502 and the peripheral device interface 1503 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1503 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507 and a power supply 1508.
[0331] The peripheral device interface 1503 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, the memory 1502, and the peripheral device interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502, and the peripheral device interface 1503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0332] The radio frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1504 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 1504 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. The radio frequency circuit 1504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, 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 1504 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0333] The display screen 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 also has the ability to collect touch signals on the surface or above the surface of the display screen 1505. The touch signal can be input to the processor 1501 as a control signal for processing. At this time, the display screen 1505 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1505 can be one, set on the front panel of the terminal 1500; in other embodiments, the display screen 1505 can be at least two, respectively set on different surfaces of the terminal 1500 or in a folding design; in other embodiments, the display screen 1505 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1500. Even, the display screen 1505 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0334] The camera assembly 1506 is used to capture images or videos. Optionally, the camera assembly 1506 includes a front camera and a rear camera. 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 1506 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0335] The audio circuit 1507 may include 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 1501 for processing, or input them into the radio frequency circuit 1504 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1500. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be 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 1507 may also include a headphone jack.
[0336] The power supply 1508 is used to power various components in the terminal 1500. The power supply 1508 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1508 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0337] Those skilled in the art will understand that Fig.15 The structure shown in the figure does not constitute a limitation on the terminal 1500, and the terminal 1500 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0338] Optionally, the computer device is provided as a server. Fig.16 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1600 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1601 and one or more memories 1602, wherein at least one computer program is stored in the memory 1602, and at least one computer program is loaded and executed by the processor 1601 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0339] An embodiment of the present application further provides a computer-readable storage medium, 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 operations performed by the crosshair control method of the above embodiment.
[0340] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the operations performed by the crosshair control method of the above embodiment.
[0341] A person of ordinary skill in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0342] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for controlling a crosshair, characterized in that: The method comprises: A scene interface for displaying a virtual scene, wherein the scene interface displays a first virtual object and a crosshair; In response to a first movement operation on the crosshair, determining a first movement direction of the first movement operation; When the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, determining a first adsorption point from the first virtual object based on a motion posture of the first virtual object; In the scene interface, the crosshair is displayed moving toward the first adsorption point.
2. The method according to claim 1, characterized in that The determining a first adsorption point from the first virtual object based on the motion posture of the first virtual object includes: Determining an auxiliary aiming line of the first virtual object based on a motion posture of the first virtual object; The first adsorption point is determined from an auxiliary sighting line of the first virtual object.
3. The method according to claim 2, characterized in that The determining the auxiliary aiming line of the first virtual object based on the motion posture of the first virtual object includes: Determining positions of key points on the first virtual object in the motion posture of the first virtual object; The determined key points are connected to form the auxiliary aiming line.
4. The method according to claim 2, characterized in that: The determining the first adsorption point from the auxiliary sighting line of the first virtual object includes: Determine the first adsorption point based on the intersection of a ray along the first moving direction and the auxiliary sighting line, wherein the ray starts from the current position of the sight; or Determine the first adsorption point based on a point in the auxiliary sighting line that is on the same horizontal line as the crosshair; or, The point in the auxiliary sighting line that is at the shortest distance from the crosshair is determined as the first adsorption point.
5. The method according to claim 2, characterized in that: The adsorption range includes a plurality of sub-ranges; the first adsorption point is located in a first sub-range of the plurality of sub-ranges; After displaying in the scene interface that the crosshair moves toward the first adsorption point, the method further includes: In response to the crosshairs entering a second subrange from the first subrange, determining a second adsorption point located in the second subrange from the auxiliary sight line, the second subrange being a subrange adjacent to the first subrange among the plurality of subranges; Based on the existence time of the crosshair in the second sub-range and the current moving speed of the crosshair, obtaining a first moving speed; In the scene interface, the crosshair is displayed moving toward the second adsorption point at the first moving speed.
6. The method according to claim 1, characterized in that In the case where the crosshair is within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, after determining the first adsorption point from the first virtual object based on the motion posture of the first virtual object, the method further includes: acquiring a third moving speed based on a distance between a second virtual object controlled by the local device and the first virtual object and a second moving speed, wherein the second moving speed is a moving speed of the first moving operation, and the third moving speed is negatively correlated with the distance; The step of displaying, in the scene interface, that the crosshair moves toward the first adsorption point includes: In the scene interface, the crosshair is displayed moving toward the first adsorption point at the third moving speed.
7. The method according to claim 6, characterized in that The acquiring the third moving speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed includes: When the second moving speed is greater than a speed threshold, the third moving speed is acquired based on the distance between the second virtual object and the first virtual object and the second moving speed.
8. The method according to claim 6, characterized in that The acquiring the third moving speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed includes: Based on the distance between the second virtual object and the first virtual object, query a first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, wherein the first corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; The third moving speed is determined as a product of a first adjustment coefficient corresponding to the distance and the second moving speed.
9. The method according to claim 6, characterized in that The crosshair is displayed when the second virtual object holds a virtual prop; the third moving speed is obtained based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed, including: Based on the distance between the second virtual object and the first virtual object, query a first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, wherein the first corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; Obtaining the adjustment coefficient corresponding to the virtual prop; The third moving speed is determined by multiplying the adjustment coefficient corresponding to the virtual item, the first adjustment coefficient corresponding to the distance, and the second moving speed.
10. The method according to claim 6, characterized in that The acquiring the third moving speed based on the distance between the second virtual object controlled by the local device and the first virtual object and the second moving speed includes: Based on the distance between the second virtual object and the first virtual object, query a first corresponding relationship to obtain a first adjustment coefficient corresponding to the distance, wherein the first corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves toward the first virtual object; Acquire a scaling ratio, where the scaling ratio is used to map a second movement speed of the first movement operation to the virtual scene; The third moving speed is determined by multiplying a first adjustment coefficient corresponding to the distance, the scaling ratio, and the second moving speed.
11. The method according to claim 1, characterized in that: The scene interface displays a plurality of virtual objects; and when the crosshair is located within the adsorption range of the first virtual object and the first moving direction is close to the first virtual object, determining a first adsorption point from the first virtual object based on the motion posture of the first virtual object includes: When the crosshair is within the adsorption range of the multiple virtual objects and the first moving direction points to the multiple virtual objects, determining a first virtual object that is closest to a second virtual object among the multiple virtual objects, where the second virtual object is a virtual object controlled by the local device; Based on the motion posture of the first virtual object, the first adsorption point is determined from the first virtual object.
12. The method according to any one of claims 1 to 11, characterized in that: After displaying in the scene interface that the crosshair moves toward the first adsorption point, the method further includes: In response to the first virtual object moving in the virtual scene in a direction away from the crosshair, the crosshair is displayed to move along with the first virtual object.
13. The method according to claim 12, characterized in that In response to the first virtual object moving in the virtual scene in a direction away from the crosshair, displaying the crosshair to follow the movement of the first virtual object includes: In response to the first virtual object moving in the virtual scene in a direction away from the crosshair, acquiring a fourth moving speed based on a difference between a displacement of the first moving operation and a displacement of the first virtual object and a third moving speed, wherein the third moving speed is a speed at which the crosshair moves toward the first adsorption point; In the scene interface, the crosshair is displayed to move along with the first virtual object at the fourth moving speed.
14. The method according to any one of claims 1 to 11, characterized in that: After displaying in the scene interface that the crosshair moves toward the first adsorption point, the method further includes: In response to a second movement operation on the crosshair, determining a second movement direction and a movement speed of the second movement operation; When the crosshair is within the adsorption range of the first virtual object and the second moving direction is away from the first virtual object, query a second corresponding relationship based on the distance between the second virtual object controlled by the local device and the first virtual object to obtain a second adjustment coefficient corresponding to the distance, wherein the second corresponding relationship is a corresponding relationship between the distance between the second virtual object and the first virtual object and the adjustment coefficient when the crosshair moves in a direction away from the first virtual object; multiplying the second adjustment coefficient corresponding to the distance by the moving speed of the second moving operation to determine a fifth moving speed; In the scene interface, the crosshair is displayed moving in a direction away from the first virtual object at the fifth moving speed.
15. The method according to claim 14, characterized in that Before determining the product of the second adjustment coefficient corresponding to the distance and the moving speed of the second moving operation as the fifth moving speed, the method further includes: Obtaining an adjustment parameter corresponding to the moving speed of the second moving operation; The step of multiplying the product of the second adjustment coefficient corresponding to the distance and the moving speed of the second moving operation to determine the fifth moving speed includes: The fifth moving speed is determined by multiplying a second adjustment coefficient corresponding to the distance, an adjustment parameter corresponding to the moving speed of the second moving operation, and the moving speed of the second moving operation.
16. A sight control device, characterized in that: The device comprises: A display module, used to display a scene interface of a virtual scene, wherein the scene interface displays a first virtual object and a crosshair; a determination module, configured to determine a first moving direction of the first moving operation in response to a first moving operation on the crosshair; An acquisition module, configured to determine a first adsorption point from the first virtual object based on a motion posture of the first virtual object when the crosshair is within an adsorption range of the first virtual object and the first moving direction is close to the first virtual object; The display module is further used to display the movement of the crosshair toward the first adsorption point in the scene interface.
17. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the crosshair control method according to any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the crosshair control method according to any one of claims 1 to 15.
19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the operations performed by the crosshair control method according to any one of claims 1 to 15 are implemented.
