CN112121416B - Control method, device, terminal and storage medium of virtual prop - Google Patents

Control method, device, terminal and storage medium of virtual prop Download PDF

Info

Publication number
CN112121416B
CN112121416B CN202011063487.XA CN202011063487A CN112121416B CN 112121416 B CN112121416 B CN 112121416B CN 202011063487 A CN202011063487 A CN 202011063487A CN 112121416 B CN112121416 B CN 112121416B
Authority
CN
China
Prior art keywords
virtual
shooting
displacement
prop
manual control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011063487.XA
Other languages
Chinese (zh)
Other versions
CN112121416A (en
Inventor
林凌云
杨金昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011063487.XA priority Critical patent/CN112121416B/en
Publication of CN112121416A publication Critical patent/CN112121416A/en
Application granted granted Critical
Publication of CN112121416B publication Critical patent/CN112121416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a control method, a control device, a control terminal and a storage medium of a virtual prop, and belongs to the technical field of computer application. The method comprises the following steps: receiving a shooting instruction aiming at the virtual shooting prop; controlling the virtual shooting prop to execute shooting operation; after the shooting operation is executed, if the quasi-center manual control operation aiming at the virtual shooting prop is received, the automatic restoring force applied to the virtual shooting prop is cancelled, and the quasi-center position of the virtual shooting prop is controlled according to the quasi-center manual control operation. The technical scheme that this application embodiment provided, through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop to adjust accurate heart position through automatic restoring force, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user's operation, can adapt to multiple user operation custom, accurate discernment user's intention.

Description

Control method, device, terminal and storage medium of virtual prop
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for controlling a virtual item.
Background
In the game application program, the user can control the virtual prop to execute corresponding operation.
In some shooting games, in order to make the shooting effect of a virtual firearm more realistic, a recoil force is often applied to the muzzle after a shooting operation is performed, so that the muzzle is deflected in a certain direction. In order to improve the operation convenience of a user, restoring force is automatically applied to the muzzle after the shooting operation is performed, and the muzzle is pulled back to the original point from the offset position. After the user shoots the virtual gun, in order to drag the muzzle from the offset position back to the original point to continuously shoot the target, the user can also automatically adjust the visual angle to complete the gun pressing operation.
In the related art, when the user presses the gun, the restoring force still acts on the muzzle, so that the bullet drop point is not matched with the user operation, and the operation is inaccurate and low in efficiency.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for controlling a virtual prop, which can improve the efficiency and the accuracy of user operation, adapt to various user operation habits, and accurately identify the user intention. The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a method for controlling a virtual item, the method including:
receiving a shooting instruction aiming at the virtual shooting prop;
controlling the virtual shooting prop to execute shooting operation;
after the shooting operation is executed, if the quasi-center manual control operation aiming at the virtual shooting prop is received, canceling the application of automatic restoring force to the virtual shooting prop, and controlling the quasi-center position of the virtual shooting prop according to the quasi-center manual control operation;
wherein the automatic restoring force is a force for automatically adjusting a quasi-centric position of the virtual shooting prop after the shooting operation is performed.
According to an aspect of the embodiments of the present application, there is provided a method for controlling a virtual item, the method including:
displaying the quasi-center of the virtual shooting prop in the virtual environment;
responding to a shooting instruction aiming at the virtual shooting prop, and controlling the virtual shooting prop to execute a shooting operation;
after performing the firing operation, receiving a centered manual control operation for the virtual firing prop;
adjusting the display position of the sighting center based on the sighting center manual control operation;
and under the condition of receiving the quasi-center manual control operation, canceling the application of automatic restoring force to the virtual shooting prop, wherein the automatic restoring force is used for automatically adjusting the quasi-center position of the virtual shooting prop after the shooting operation is executed.
According to an aspect of the embodiments of the present application, there is provided a control apparatus of a virtual prop, the apparatus including:
the instruction receiving module is used for receiving a shooting instruction aiming at the virtual shooting prop;
the shooting control module is used for controlling the virtual shooting prop to execute shooting operation;
the quasi-center control module is used for cancelling the application of automatic restoring force to the virtual shooting prop and controlling the quasi-center position of the virtual shooting prop according to the quasi-center manual control operation if the quasi-center manual control operation aiming at the virtual shooting prop is received after the shooting operation is executed;
wherein the automatic restoring force is a force for automatically adjusting a quasi-centric position of the virtual shooting prop after the shooting operation is performed.
According to an aspect of the embodiments of the present application, there is provided a control apparatus of a virtual prop, the apparatus including:
the center display module is used for displaying the center of the virtual shooting prop in the virtual environment;
the shooting control module is used for responding to a shooting instruction aiming at the virtual shooting prop and controlling the virtual shooting prop to execute shooting operation;
the operation receiving module is used for receiving the quasi-centering manual control operation aiming at the virtual shooting prop after the shooting operation is executed;
the center adjustment module is used for adjusting the display position of the center based on the center manual control operation;
and under the condition of receiving the quasi-center manual control operation, canceling the application of automatic restoring force to the virtual shooting prop, wherein the automatic restoring force is used for automatically adjusting the quasi-center position of the virtual shooting prop after the shooting operation is executed.
According to an aspect of the embodiments of the present application, there is provided a terminal, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the control method of the virtual prop.
According to an aspect of the embodiments of the present application, there is provided a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the control method of the virtual prop.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer readable storage medium, and the processor executes the computer instruction, so that the computer device executes the control method of the virtual prop.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop adjusting accurate heart position through automatic restoring force, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user operation, can adapt to multiple user operation custom, accurate discernment user intention.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application execution environment provided by one embodiment of the present application;
fig. 2 is a flowchart of a control method for a virtual prop according to an embodiment of the present application;
FIG. 3 illustrates a schematic diagram of a hit location distribution;
FIG. 4 illustrates another shot location distribution diagram;
fig. 5 is a flowchart of a control method for a virtual prop according to another embodiment of the present application;
FIG. 6 illustrates a schematic diagram of generating an operation input vector;
FIG. 7 is a schematic diagram illustrating an automatic restoring force process of the switch;
FIG. 8 illustrates a schematic diagram of an alignment process;
fig. 9 is a flowchart of a control method for a virtual prop according to an embodiment of the present application;
fig. 10 is a block diagram of a control device for a virtual prop provided in an embodiment of the present application;
fig. 11 is a block diagram of a control device for a virtual prop according to another embodiment of the present application;
fig. 12 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of methods consistent with aspects of the present application, as detailed in the appended claims.
Before describing the embodiments of the present application, the related terms referred to in the present application will be explained.
1. Virtual object
The virtual object refers to a virtual role controlled by the user account in the application program. Taking an application as a game application as an example, the virtual object refers to a game character controlled by a user account in the game application. The virtual object may be in the form of a character, an animal, a cartoon or other forms, which is not limited in this application. The virtual object may be displayed in a three-dimensional form or a two-dimensional form, which is not limited in the embodiment of the present application.
The operations that a user account can perform to control a virtual object may also vary from game application to game application. For example, in a shooting-type game application, the user account may control the virtual object to perform shooting, running, jumping, picking up a firearm, replacing a firearm, adding bullets to a firearm, and the like.
Of course, in addition to game applications, other types of applications may present virtual objects to a user and provide corresponding functionality to the virtual objects. For example, an AR (Augmented Reality) application, a social application, an interactive entertainment application, and the like, which are not limited in this embodiment. In addition, for different applications, the forms of the virtual objects provided by the applications may also be different, and the corresponding functions may also be different, which may be configured in advance according to actual requirements, and this is not limited in the embodiments of the present application.
2. Virtual environment
A virtual environment is a scene displayed (or provided) by a client of an application program (e.g., a game application program) when the client runs on a terminal, and the virtual environment refers to a scene created for a virtual object to perform an activity (e.g., a game competition), such as a virtual house, a virtual island, a virtual map, and the like. The virtual environment may be a simulation environment of a real world, a semi-simulation semi-fictional environment, or a pure fictional environment. The virtual environment may be a two-dimensional virtual environment, a 2.5-dimensional virtual environment, or a three-dimensional virtual environment, which is not limited in this embodiment of the present application.
3. Virtual prop
Virtual items refer to items that an application (e.g., a game application) provides to a user for use, such as virtual weapons, virtual reply items, virtual vehicles, and so forth.
4. Virtual firearm
The virtual firearm is a virtual weapon provided by a shooting game application and can simulate a virtual object shot by a real firearm. The virtual firearm may be a three-dimensional model of a real firearm, and the virtual object is capable of carrying the virtual firearm and controlling the virtual firearm to shoot at a target.
The virtual firearm may include a variety of different firearm categories such as rifles, submachine guns, machine guns, shotguns, handguns, and the like. The gun category can be divided according to actual requirements, for example, the rifle can be further divided into different categories such as assault rifle and sniper rifle, and the machine gun can be further divided into different categories such as light machine gun and heavy machine gun.
5. Recoil of the hip
Recoil force refers to recoil force generated when the cartridge or shell of the virtual firearm is fired. In the continuous shooting of the bullets, a certain reaction force is generated due to the power of the gun, and the reaction force is called recoil force, so that the gun is unstable and is eccentrically deviated.
The recoil of the virtual firearm is one of the key factors for determining whether the operation in the shooting game is convenient and accurate, and under the action of the recoil, the muzzle can deviate, so that the bullet can irregularly deviate upwards when firing, and the bullet cannot accurately hit a target.
6. Press gun
A core operating skill in a shooting game means that a player can rotate a visual angle to counteract the recoil of a weapon, so that the effect of ballistic recoilless is achieved, and the vicinity of a target is accurately hit. The skill ability to make a bullet hit a target accurately becomes the most core of a shooting game, and is called as 'gun pressing' skill.
Gun pressure is the most basic and most core skill in shooting games, and means that a player inputs a rotating visual angle through a command to counteract visual angle and trajectory deviation caused by recoil of a weapon, so that a bullet can hit a given target area like 'no recoil'.
7. Restoring force
One ballistic mechanism introduced is the reaction force of recoil, which acts to return the muzzle to the offset forward position.
Referring to fig. 1, a schematic diagram of an application execution environment according to an embodiment of the present application is shown. The application execution environment may include: a terminal 10 and a server 20.
The terminal 10 may be an electronic device such as a mobile phone, a tablet Computer, a game console, a multimedia playing device, a wearable device, a PC (Personal Computer), a handheld portable game device, and the like. A client of the application may be installed in the terminal 10.
In the embodiment of the present application, the application may be any application that can provide a virtual environment for a virtual object substituted and operated by a user to perform an activity in the virtual environment. Typically, the application is a Game application, such as a Third-Person shooter Game (TPS), a First-Person shooter Game (FPS), a Multiplayer Online tactical sports (MOBA) Game, a big-fleeting survival (BR) Game, a Multiplayer gunfight type survival Game, and so on. Of course, in addition to game applications, other types of applications may present virtual objects to a user and provide corresponding functionality to the virtual objects. For example, a Virtual Reality (VR) application, an Augmented Reality (AR) application, a three-dimensional map program, a social interaction application, an interactive entertainment application, and the like, which are not limited in this embodiment of the present application. In addition, for different applications, the forms of the virtual objects provided by the applications may also be different, and the corresponding functions may also be different, which may be configured in advance according to actual requirements, and this is not limited in the embodiments of the present application. Optionally, a client of the above application program runs in the terminal 10. In some embodiments, the application is an application developed based on a three-dimensional virtual environment engine, for example, the virtual environment engine is a Unity engine, and the virtual environment engine can construct a three-dimensional virtual environment, a virtual object, a virtual prop, and the like, so as to bring a more immersive game experience to the user.
The server 20 is used to provide background services for clients of applications in the terminal 10. For example, the server 20 may be a backend server for the application described above. The server 20 may be a server, a server cluster composed of a plurality of servers, or a cloud computing service center. Optionally, the server 20 provides background services for applications in multiple terminals 10 simultaneously.
Alternatively, the terminal 10 and the server 20 may communicate with each other through the network 30.
Please refer to fig. 2, which shows a flowchart of a method for controlling a virtual item according to an embodiment of the present application. The method is applicable to a terminal, and the execution subject of each step may be the terminal 10 (hereinafter, simply referred to as "client") in the application execution environment shown in fig. 1. The method comprises the following steps (210-230):
step 210, receiving a shooting instruction for the virtual shooting prop.
And the user generates a shooting instruction aiming at the virtual shooting prop by performing touch control operations such as clicking, long-time pressing and the like on the shooting control. And responding to the touch operation aiming at the shooting control, and generating a shooting instruction aiming at the virtual shooting prop. The shooting instruction is used for indicating the virtual prop to execute the shooting operation.
The virtual shooting prop comprises the virtual firearm. Optionally, the virtual shooting prop is a virtual shooting prop being used by a virtual object.
After receiving the shooting instruction to virtual shooting stage property, still include:
and acquiring the input state of the user. The user input state includes a touch position. Alternatively, the touch position may be an operation input position at the current time, or may be an operation input position at the previous time.
And acquiring the state of the virtual object. Physical state of the virtual object, operational state of the virtual object. The physical state of the virtual object includes physical states of running, jumping, squatting, etc., and the operational state of the virtual object includes operational states of holding a mirror, firing, aiming, etc. The physical state and the operation state of the virtual object are both states controlled by the user through touch operation, for example, certain keys are triggered. For data indexes describing the physical state and the operation state of the virtual object, records are saved during the application process and are very easy to obtain when the application is needed, such as a centering position, a shooting time and a hitting position.
And step 220, controlling the virtual shooting prop to execute the shooting operation.
The above-described shooting operation is an operation of shooting a given target. The center of gravity position, the time of shooting, and the location of the hit were recorded for this shooting operation.
When the shooting operation is executed, recoil is generated, the centering position is deviated, and the hitting position is scattered under the condition of no pressure gun operation. The offset generated by the recoil force can be decomposed in the longitudinal direction and the transverse direction, and accordingly, the recoil force comprises the transverse recoil force and the longitudinal recoil force. Optionally, the magnitude of the longitudinal recoil is more than 5 times the magnitude of the lateral recoil. Optionally, the longitudinal recoil produced by each firing is represented by RecoilUp and the transverse recoil produced by each firing is represented by RecoilLateral. Optionally, the offset effect of squat force is characterized by a squat offset vector.
In one example, as shown in FIG. 3, a diagram illustrating a distribution of hit locations is illustrated. Fig. 3 is a schematic view of a shot position distribution obtained by shooting with pure recoil without a gun-pressing operation by a user. The bullet hitting position can be indicated by the bullet hole 31. Distribution of the charge holes 31 on the background wall 32 as shown in fig. 3, it can be seen that the distribution of the charge holes 31 is very random, and particularly, the mean square error of the distribution of the charge holes 31 is very large in the vertical direction.
In another example, as shown in FIG. 4, another schematic view of a hit location distribution is illustrated. Fig. 4 is a schematic view of shot positions obtained by controlling recoil to shoot by a user through operation of pulling down a lens. The distribution of the charge holes 31 is more concentrated.
And step 230, after the shooting operation is executed, if the quasi-center manual control operation aiming at the virtual shooting prop is received, canceling the automatic restoring force applied to the virtual shooting prop, and controlling the quasi-center position of the virtual shooting prop according to the quasi-center manual control operation.
The centering manual control operation refers to an operation in which a user manually controls the centering position to eliminate the deviation due to the recoil, and is easily understood as a gun-pressing operation. Optionally, the concentric manual control operation comprises adjusting a viewing angle. Alternatively, the centered manual control operation may be implemented by performing a touch operation on a screen, or may be implemented by moving a control device, such as a mouse, a remote control, a handle, or the like.
The automatic restoring force is a force for automatically adjusting the position of the center of sight of the virtual shooting prop after the shooting operation is performed. Optionally, an automatic restoring force acts on the muzzle, pulling the quasi-centric position of the virtual shooting prop back to the quasi-centric position when shooting. The automatic restoring force can be decomposed into a longitudinal automatic restoring force and a lateral automatic restoring force.
The longitudinal automatic restoring force is used for adjusting the centering position of the virtual shooting prop in the longitudinal direction. The transverse automatic restoring force is used for adjusting the centering position of the virtual shooting prop in the transverse direction.
The cancellation of the application of the automatic restoring force to the virtual shooting prop means that the automatic restoring force no longer acts on the virtual shooting prop and no longer adjusts the true-to-heart position of the virtual shooting prop upon receipt of a true-to-heart manual control operation directed to the virtual shooting prop.
The canceling of the application of the automatic restoring force to the virtual shooting prop includes: and longitudinal automatic restoring force applied to the virtual shooting prop is cancelled, and transverse automatic restoring force applied to the virtual shooting prop is cancelled.
Optionally, the isocenter position of the virtual shooting prop is controlled based on pre-shooting isocenter position, recoil, and isocenter manual control operations.
Optionally, the location of the hit of the virtual shooting prop is controlled based on the pre-shooting isocenter position, recoil, and isocenter manual control operations.
In an exemplary embodiment, the method for controlling the virtual item further includes:
and step 240, after the shooting operation is executed, if the centering manual control operation is not received, applying automatic restoring force to the virtual shooting prop, and controlling the centering position of the virtual shooting prop according to the automatic restoring force.
Under the condition that the quasi-centering manual control operation condition aiming at the virtual shooting prop is not received, automatic restoring force is applied to the virtual shooting prop, and the quasi-centering position of the virtual shooting prop is adjusted by acting on the virtual shooting prop through the automatic restoring force. Optionally, the isocenter position of the virtual shooting prop is controlled based on the pre-shooting isocenter position, recoil, and automatic return force.
Optionally, the hit position of the virtual shooting prop is controlled based on the pre-shooting isocenter position, the recoil force, and the automatic restoring force.
The automatic restoring force forces the weapon to return to the equilibrium position for pulling the muzzle, which is deflected by the recoil, back to the original equilibrium position, i.e. the muzzle of the weapon deflects in a certain direction when firing, and the restoring force is to pull the weapon back to the equilibrium position with zero deflection.
The longitudinal automatic restoring force may be expressed as punchanglexdecreasured and the longitudinal automatic restoring force may be expressed as punchangleydeecreasured, which have a unit of degrees/second, which means a restored offset angle per second, acting on the displacement in the longitudinal or transverse direction, respectively. Optionally, the effect of the position offset recovery by the automatic recovery force is characterized by a recovery force vector. Alternatively, the magnitude of the restoring force vector is determined by programming preconfigured punchlonglexdecreasesespesped and punchlongleydeecrasesped. Optionally, different virtual shooting props are configured with different values of longitudinal and transverse automatic return forces. Alternatively, in the case where an automatic restoring force acts on the virtual shooting prop (i.e., is being in a restoring state), the action of the automatic restoring force on the virtual shooting prop is stopped in response to a shooting operation or a wide-range sliding operation by the user.
To sum up, the technical scheme that this application embodiment provided, through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop through automatic restoring force adjustment accurate heart position, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user operation, can adapt to multiple user operation custom, accurate discernment user intention.
Please refer to fig. 5, which shows a flowchart of a method for controlling a virtual prop according to another embodiment of the present application. The method is applicable to a terminal, and the execution subject of each step may be the terminal 10 (hereinafter, simply referred to as "client") in the application execution environment shown in fig. 1. The method comprises the following steps (501-508):
step 501, receiving a shooting instruction for a virtual shooting prop.
And 502, controlling the virtual shooting prop to execute a shooting operation.
In step 503, after the shooting operation is performed, if the sliding touch operation is received, the touch position of the sliding touch operation at the first time and the touch position at the second time are acquired.
The sliding touch operation may be embodied as a user adjusting a viewing angle in a certain direction. For example, the user performs a lateral sliding operation on the screen to achieve adjustment of the viewing angle in the lateral direction (or horizontal direction), thereby controlling lateral movement of the collimation position of the virtual shooting prop.
Optionally, the sliding touch operation includes a lateral sliding, a longitudinal sliding, and a diagonal sliding. The oblique sliding includes upward left sliding, downward left sliding, upward right sliding, and downward right sliding.
Alternatively, the diagonal sliding may be decomposed into a lateral sliding or a diagonal sliding.
The first time and the second time are different times and reflect the time sequence of the first time and the second time. Optionally, the first time is a current time, and the second time is a historical time. Optionally, the first time is a time corresponding to a current game animation frame (hereinafter referred to as a current frame), and the second time is a time corresponding to a frame preceding the current frame in time sequence.
The touch position refers to a touch position of the user on the screen.
And step 504, determining a displacement vector generated between the first time and the second time by the sliding touch operation according to the touch position at the first time and the touch position at the second time.
The touch position at the first time has the coordinate of (x)0,y0) The coordinate of the touch position at the second time is (x)1,y1). Optionally, the coordinates of the touch position at the first time and the coordinates of the touch position at the second time are coordinates in the same coordinate system, and taking a game scene as an example, the coordinate system may be a coordinate system constructed with a lower left corner of the screen as an origin.
In this case, the displacement vector generated between the first time and the second time is [ (x)0,y0)-(x1,y1)]。
The displacement vector is a vector indicating a displacement determined based on a position displacement amount between the touch position at the first time and the touch position at the second time. Alternatively, the displacement vector between two adjacent game animation frames may be referred to as an inter-frame displacement vector.
Step 505, determining displacement information based on the displacement vector.
The displacement information includes a displacement distance and/or a displacement velocity. The displacement information includes a longitudinal displacement distance and/or a longitudinal displacement velocity. The displacement information includes a lateral displacement distance and/or a lateral displacement velocity.
In an exemplary embodiment, the above step 505 includes the following sub-steps (505a-505 b):
505a, the displacement vector is transformed to obtain a transformed displacement vector.
The transformation process is used to establish a mapping relationship between the displacement of the sliding touch operation and the displacement of the isocenter position. Alternatively, the conversion process is a process of multiplying the displacement vector by a constant coefficient, wherein the constant coefficient is related to the game sensitivity. Alternatively, the constant coefficient is not a constant value, and an applicable or corresponding value may be selected according to actual conditions. Optionally, the game sensitivity includes but is not limited to mouse sensitivity, control sensitivity of virtual items, and the like.
The transformed displacement vector may also be referred to as an operation input vector. The touch position at the first time has coordinates of (x)0,y0) The coordinate of the touch position at the second time is (x)1,y1) Under the scene of (2), the transformed displacement vector PullDownVector=K*[(x0,y0)-(x1,y1)]Where K is a constant coefficient. Optionally, the transformed displacement vector includes a transformed inter-frame displacement vector, and the transformed inter-frame displacement vector is a vector obtained by performing transformation processing based on the inter-frame displacement vector.
In one example, as shown in FIG. 6, a schematic diagram of generating an operation input vector is illustrated. Which comprises the following steps:
step 1, obtaining the touch position (x) of the current frame0,y0)。
Step 2, obtaining the touch position (x) of the previous frame1,y1)。
And step 3, determining a displacement vector of the sliding touch operation between the current frame and the previous frame.
And 4, transforming the displacement vector to obtain an operation input vector PullDownvector.
And 5, updating the touch position.
505b, determining displacement information from the transformed displacement vector.
Optionally, a component of the transformed displacement vector in the longitudinal direction is taken as the longitudinal displacement distance. Alternatively, the longitudinal displacement distance may be expressed as pulldown vector.
Optionally, a component of the transformed displacement vector in the longitudinal direction is divided by the displacement time as the longitudinal displacement distance to obtain the longitudinal displacement velocity.
Optionally, a component of the transformed displacement vector in the lateral direction is taken as the lateral displacement distance. Alternatively, the lateral displacement distance may be expressed as pulldown vector.
Optionally, a component of the transformed displacement vector in the transverse direction is divided by the displacement time as a transverse displacement distance to obtain a transverse displacement velocity.
Optionally, the displacement information includes an inter-frame longitudinal displacement distance, an inter-frame longitudinal displacement speed, an inter-frame transverse displacement distance, and an inter-frame transverse displacement speed.
And step 506, under the condition that the displacement information meets the condition, determining that the sliding touch operation is the centered manual control operation.
The above condition is a judgment condition for identifying whether or not the slide touch operation by the user is the centering manual control operation, which is easily understood as the gun pressing operation.
When judging whether the user executes the gun pressing operation at the current frame, the judgment can be carried out through two aspects, on one hand, whether the displacement distance determined by the operation input vector formed by the user at the current frame meets the actual condition of the gun pressing operation or not can be judged, and on the other hand, whether the displacement speed determined by the sliding operation of the user at the current frame meets the actual condition of the gun pressing operation or not can be judged. The displacement speed is obtained by dividing the displacement distance determined by the operation input vector formed by the user in the current frame by the inter-frame interval time, so that the planning and understanding are facilitated. Alternatively, only the displacement distance determined by the operation input vector formed by the user in the current frame can be used as the judgment basis in the implementation process.
In an exemplary embodiment, the case where the above-described displacement information satisfies the condition is as follows:
the first condition is as follows: and determining the sliding touch operation as a vertical centered manual control operation under the condition that the vertical displacement distance belongs to the first distance interval and/or the vertical displacement speed belongs to the first speed interval.
The first distance interval is used for quantitatively representing a reasonable range of longitudinal displacement distance generated by gun pressing operation. Wherein, the left interval endpoint value of the first distance interval is the minimum first distance, which is easily understood as the minimum longitudinal displacement distance; the right interval endpoint value of the first distance interval is the maximum first distance, which is easily understood as the maximum longitudinal displacement distance. In the case where the longitudinal displacement distance belongs to the first distance section, the slide touch operation can be regarded as a centered manual control operation in the longitudinal direction, that is, there is a gun-pressing operation in the longitudinal direction.
The first speed interval is used for quantifying a reasonable range of longitudinal displacement speeds generated by the gun pressing operation. Wherein, the left interval endpoint value of the first speed interval is the minimum first speed, which is easily understood as the minimum longitudinal displacement speed; the right interval end point value of the first speed interval is the maximum first speed, which is easily understood as the maximum longitudinal displacement speed. In the case where the longitudinal displacement speed belongs to the first speed section, the slide touch operation can be recognized as a centered manual control operation in the longitudinal direction, i.e., there is a gun-pressing operation in the longitudinal direction.
Optionally, the interval endpoint value is determined by setting a threshold coefficient, comprising a minimum threshold coefficient and a maximum threshold coefficient, to be multiplied by the magnitude of the squat force. Alternatively, the threshold coefficient may be established according to actual conditions, for example, according to a displacement time factor. Optionally, the minimum first distance is a product of a minimum threshold coefficient K1 and a value of longitudinal recoil force RecoilUp. Optionally, the maximum first distance is a product of a maximum threshold coefficient K2 and a value of longitudinal recoil force RecoilUp.
Accordingly, in the case where the longitudinal displacement distance belongs to the first distance section and/or the longitudinal displacement velocity belongs to the first velocity section, the application of the longitudinal automatic restoring force to the virtual shooting prop is cancelled, and the centering position is adjusted in the longitudinal direction by the centering manual control operation. Optionally, the automatic restoring force comprises an inter-frame automatic restoring force, which refers to an automatic restoring force generated between two frames. Optionally, the inter-frame automatic restoring force includes a horizontal inter-frame automatic restoring force and a vertical inter-frame automatic restoring force. Alternatively, the vertical displacement distance in case one may be an inter-frame vertical displacement distance, and then for the current frame, the vertical inter-frame automatic restoring force applied to the virtual shooting prop should be cancelled. Alternatively, the longitudinal displacement speed in case one may be an inter-frame longitudinal displacement speed, and then for the current frame, the longitudinal inter-frame automatic restoring force applied to the virtual shooting prop should be cancelled.
Case two: and determining the sliding touch operation as a horizontal centered manual control operation under the condition that the horizontal displacement distance belongs to the second distance interval and/or the horizontal displacement speed belongs to the second speed interval.
The second distance interval is used for quantitatively representing a reasonable range of the transverse displacement distance generated by the gun pressing operation. Wherein, the left interval endpoint value of the second distance interval is the minimum second distance, which is easily understood as the minimum transverse displacement distance; the right interval endpoint value of the second distance interval is the maximum second distance, which is easily understood as the maximum lateral displacement distance. In the case where the lateral displacement distance belongs to the second distance section, the slide touch operation can be regarded as a lateral centered manual control operation, that is, there is a gun-pressing operation in the lateral direction.
The second velocity interval is used to quantify a reasonable range of lateral displacement velocities resulting from the gun-pressing operation. Wherein, the left interval endpoint value of the second speed interval is the minimum second speed, which is easily understood as the minimum transverse displacement speed; the right interval endpoint value of the second speed interval is the maximum second speed, which is easily understood as the maximum lateral displacement speed. In the case where the lateral displacement speed belongs to the second speed section, the slide touch operation can be regarded as a lateral centered manual control operation, that is, there is a gun-pressing operation in the lateral direction.
Optionally, the minimum second distance is a product of a minimum threshold coefficient K1 and a value of longitudinal recoil force recoilalteral. Optionally, the maximum second distance is a product of a maximum threshold coefficient K2 and a value of longitudinal recoil, recoilalteral.
Accordingly, in the case where the lateral displacement distance belongs to the second distance section and/or the lateral displacement speed belongs to the second speed section, the application of the lateral automatic restoring force to the virtual shooting prop is cancelled, and the centering position is adjusted in the lateral direction by the centering manual control operation. Alternatively, the lateral displacement distance in case two may be an inter-frame lateral displacement distance, and then for the current frame, the lateral inter-frame automatic restoring force applied to the virtual shooting prop should be cancelled. Alternatively, the lateral displacement speed in case two may be an inter-frame lateral displacement speed, and then for the current frame, the lateral inter-frame automatic restoring force applied to the virtual shooting prop should be cancelled.
In one example, as shown in FIG. 7, a schematic diagram illustrating a process of automatic restoring force of a switch is illustrated. The method comprises the following steps:
and a, judging whether the transverse displacement distance is greater than the minimum transverse displacement distance and less than the maximum transverse displacement distance. If yes, executing step b, otherwise executing step c.
And b, canceling the transverse automatic restoring force.
And c, applying transverse automatic restoring force.
And d, judging whether the longitudinal displacement distance is greater than the minimum longitudinal displacement distance and less than the maximum longitudinal displacement distance. If yes, executing step e, otherwise executing step f.
And e, canceling the longitudinal automatic restoring force.
And f, applying longitudinal automatic restoring force.
And step 507, after the shooting operation is executed, if the quasi-center manual control operation aiming at the virtual shooting prop is received, canceling the automatic restoring force applied to the virtual shooting prop, and controlling the quasi-center position of the virtual shooting prop according to the quasi-center manual control operation.
And step 508, after the shooting operation is executed, if the centering manual control operation is not received, applying an automatic restoring force to the virtual shooting prop, and controlling the centering position of the virtual shooting prop according to the automatic restoring force.
The following further explains the beneficial effects brought by the technical scheme provided by the embodiment of the application in combination with the scheme provided by the related technology. In a typical return force implementation, for example, in a shooting game application, the aiming position or hitting position is determined by a squat offset vector, a gun pressure input vector, and a return force vector when a shooting operation is performed. Wherein the direction of the return force vector is opposite to the direction of the squat offset vector. Referring to fig. 8, a diagram illustrating an alignment process is shown. Due to the existence of the recovery amount, the recovery ending center position can deviate from a shooting starting point which needs to be aimed by a player through the pressure gun operation, so that the shooting operation cannot be accurately realized. However, the presence of the return amount also limits the deviation of the return end alignment position from the shooting start point when the user is not performing the gun-pressing operation, and in this case, the presence of the return amount is a positive benefit for the player.
Therefore, the technical scheme provided by the embodiment of the application starts and stops the condition of the automatic restoring force through setting, and then the shooting device is suitable for various shooting operation scenes, and improves the efficiency and accuracy of shooting operation. The method comprises the steps of firstly obtaining the displacement of sliding touch operation of a user between two moments, further identifying whether the current operation behavior of the user is gun pressing operation, and when the gun pressing operation of the user is identified, cancelling the automatic restoring force existing between frames by taking the frame as a unit, and when the gun pressing operation of the user is not identified, applying the automatic restoring force existing between frames by taking the frame as a unit, so that the shooting operation of the user can be assisted from a more detailed angle.
Please refer to fig. 9, which shows a flowchart of a method for controlling a virtual prop according to an embodiment of the present application. The method is applicable to a terminal, and the execution subject of each step may be the terminal 10 (hereinafter, simply referred to as "client") in the application execution environment shown in fig. 1. The method may include the following steps (910- > 940):
step 910, displaying the directness of the virtual shooting prop in the virtual environment.
And step 920, responding to the shooting instruction aiming at the virtual shooting prop, and controlling the virtual shooting prop to execute the shooting operation.
Step 930, after performing the firing operation, receives a centered manual control operation for the virtual firing prop.
In an exemplary embodiment, the above step 930 comprises the following sub-steps (931-934):
931 after the shooting operation is executed, if the sliding touch operation is received, acquiring a touch position of the sliding touch operation at a first time and a touch position at a second time;
932, determining a displacement vector generated between the first time and the second time by the sliding touch operation according to the touch position at the first time and the touch position at the second time;
933 determining displacement information based on the displacement vector.
The displacement information comprises displacement distance and/or displacement speed; the displacement information comprises a longitudinal displacement distance and/or a longitudinal displacement speed; the displacement information includes a lateral displacement distance and/or a lateral displacement velocity.
934, in a case where the displacement information satisfies the condition, the sliding touch operation is determined to be a centered manual control operation.
The first condition is as follows:
under the condition that the longitudinal displacement distance belongs to a first distance interval and/or the longitudinal displacement speed belongs to a first speed interval, determining the sliding touch operation as a longitudinal centered manual control operation;
wherein, in the case of receiving a vertical, centered manual control operation, the application of a vertical, automatic restoring force to the virtual shooting prop is cancelled.
Case two:
under the condition that the transverse displacement distance belongs to a second distance interval and/or the transverse displacement speed belongs to a second speed interval, determining the sliding touch operation as a transverse quasi-center manual control operation;
wherein, in the case of receiving a horizontal, centered manual control operation, the application of a horizontal, automatic restoring force to the virtual shooting prop is cancelled.
Step 940, adjusting the display position of the collimation center based on the collimation center manual control operation;
wherein, under the condition that the quasi-centric manual control operation is received, canceling to apply an automatic restoring force to the virtual shooting prop, the automatic restoring force being a force for automatically adjusting the quasi-centric position of the virtual shooting prop after the shooting operation is performed.
In an exemplary embodiment, the method for controlling the virtual item further includes:
and after the shooting operation is executed, if the centering manual control operation is not received, applying automatic restoring force to the virtual shooting prop, and adjusting the display position of the centering according to the automatic restoring force.
It should be noted that, in the present embodiment, the technical solution of the present application is described and explained from the perspective of product representation, and for explanation in the present embodiment, reference may be made to the content of the above embodiment.
To sum up, the technical scheme that this application embodiment provided, through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop through automatic restoring force adjustment accurate heart position, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user operation, can adapt to multiple user operation custom, accurate discernment user intention.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 10, a block diagram of a control apparatus for a virtual object according to an embodiment of the present application is shown. The device has the function of realizing the control method of the virtual object, and the function can be realized by hardware or by hardware executing corresponding software. The device may be a terminal or may be provided in a terminal. The apparatus 1000 may include: an instruction receiving module 1010, a firing control module 1020, and a centering control module 1030.
An instruction receiving module 1010, configured to receive a shooting instruction for the virtual shooting prop;
a shooting control module 1020, configured to control the virtual shooting prop to execute a shooting operation;
a quasi-center control module 1030, configured to cancel application of an automatic restoring force to the virtual shooting prop and control a quasi-center position of the virtual shooting prop according to the quasi-center manual control operation if a quasi-center manual control operation for the virtual shooting prop is received after the shooting operation is performed;
wherein the automatic restoring force is a force for automatically adjusting a quasi-centric position of the virtual shooting prop after the shooting operation is performed.
In an exemplary embodiment, the apparatus further comprises:
the position acquisition module is used for acquiring a touch position of the sliding touch operation at a first moment and a touch position of the sliding touch operation at a second moment if the sliding touch operation is received after the shooting operation is executed;
a vector determining module, configured to determine, according to the touch position at the first time and the touch position at the second time, a displacement vector generated between the first time and the second time in the sliding touch operation;
an information determining module, configured to determine displacement information based on the displacement vector, where the displacement information includes a displacement distance and/or a displacement speed;
and the operation determining module is used for determining that the sliding touch operation is the centered manual control operation under the condition that the displacement information meets the condition.
In an exemplary embodiment, the displacement information comprises a longitudinal displacement distance and/or a longitudinal displacement velocity;
the operation determination module is to:
under the condition that the longitudinal displacement distance belongs to a first distance interval and/or the longitudinal displacement speed belongs to a first speed interval, determining the sliding touch operation as a longitudinal centered manual control operation;
the quasi-centering control module 1030 configured to:
and canceling the longitudinal automatic restoring force applied to the virtual shooting prop.
In an exemplary embodiment, the displacement information comprises a lateral displacement distance and/or a lateral displacement velocity;
the operation determination module is to:
under the condition that the transverse displacement distance belongs to a second distance interval and/or the transverse displacement speed belongs to a second speed interval, determining that the sliding touch operation is a transverse centering manual control operation;
the quasi-centering control module 1030 configured to:
and canceling the transverse automatic restoring force applied to the virtual shooting prop.
In an exemplary embodiment, the information determining module is configured to:
transforming the displacement vector to obtain a transformed displacement vector, wherein the transforming is used for establishing a mapping relation between the displacement of the sliding touch operation and the displacement of the alignment position;
and determining the displacement information according to the transformed displacement vector.
In an exemplary embodiment, the isocenter control module 1030 is further configured to:
and after the shooting operation is executed, if the quasi-center manual control operation is not received, applying the automatic restoring force to the virtual shooting prop, and controlling the quasi-center position of the virtual shooting prop according to the automatic restoring force.
To sum up, the technical scheme that this application embodiment provided, through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop through automatic restoring force adjustment accurate heart position, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user operation, can adapt to multiple user operation custom, accurate discernment user intention.
Please refer to fig. 11, which shows a block diagram of a control device of a virtual prop according to another embodiment of the present application. The device has the function of realizing the control method of the virtual prop, and the function can be realized by hardware or by hardware executing corresponding software. The device may be a terminal or may be provided in a terminal. The apparatus 1100 comprises: a centering display module 1110, a shooting control module 1120, an operation receiving module 1130, and a centering adjustment module 1140.
And a center of sight display module 1110 for displaying the center of sight of the virtual shooting prop in the virtual environment.
And a shooting control module 1120, configured to control the virtual shooting prop to execute a shooting operation in response to a shooting instruction for the virtual shooting prop.
An operation receiving module 1130, configured to receive a quasi-manual control operation for the virtual shooting prop after the shooting operation is performed.
An alignment adjustment module 1140 for adjusting the display position of the alignment based on the alignment manual control operation.
And under the condition of receiving the quasi-center manual control operation, canceling the application of automatic restoring force to the virtual shooting prop, wherein the automatic restoring force is used for automatically adjusting the quasi-center position of the virtual shooting prop after the shooting operation is executed.
In an exemplary embodiment, the operation receiving module 1130 is configured to:
after the shooting operation is executed, if a sliding touch operation is received, acquiring a touch position of the sliding touch operation at a first moment and a touch position of the sliding touch operation at a second moment;
determining a displacement vector generated between the first moment and the second moment by the sliding touch operation according to the touch position at the first moment and the touch position at the second moment;
determining displacement information based on the displacement vector, wherein the displacement information comprises a displacement distance and/or a displacement speed;
and determining that the sliding touch operation is the centered manual control operation when the displacement information satisfies a condition.
In an exemplary embodiment, the displacement information comprises a longitudinal displacement distance and/or a longitudinal displacement velocity;
the device further comprises: an operation determination module to:
under the condition that the longitudinal displacement distance belongs to a first distance interval and/or the longitudinal displacement speed belongs to a first speed interval, determining the sliding touch operation as a longitudinal centered manual control operation;
and under the condition that the longitudinal and centered manual control operation is received, canceling the longitudinal automatic restoring force applied to the virtual shooting prop.
In an exemplary embodiment, the displacement information comprises a lateral displacement distance and/or a lateral displacement velocity;
the device further comprises: an operation determination module to:
under the condition that the transverse displacement distance belongs to a second distance interval and/or the transverse displacement speed belongs to a second speed interval, determining that the sliding touch operation is a transverse centering manual control operation;
wherein, in the event that the lateral, self-centering manual control operation is received, application of a lateral, automatic restoring force to the virtual shooting prop is cancelled.
In an exemplary embodiment, the centering adjustment module 1140 is further configured to:
and after the shooting operation is executed, if the sighting center manual control operation is not received, applying the automatic restoring force to the virtual shooting prop, and adjusting the display position of the sighting center according to the automatic restoring force.
To sum up, the technical scheme that this application embodiment provided, through the interrupt mechanism who sets up an automatic restoring force, detect the operation back of user manual control accurate heart position after the shooting operation, just stop through automatic restoring force adjustment accurate heart position, change into through user manual control accurate heart position, promote the efficiency and the accuracy of user operation, can adapt to multiple user operation custom, accurate discernment user intention.
Referring to fig. 12, a block diagram of a terminal 1200 according to an embodiment of the present application is shown. The terminal 1200 may be an electronic device such as a mobile phone, a tablet computer, a game console, a multimedia playing device, a wearable device, a PC, and the like. The terminal is used for implementing the control method of the virtual prop provided in the above embodiment.
The terminal may be the terminal 10 in the operating environment shown in fig. 1. Specifically, the method comprises the following steps:
in general, terminal 1200 includes: a processor 1201 and a memory 1202.
The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer-readable storage medium in memory 1202 is used to store at least one instruction, at least one program, set of codes, or set of instructions configured to be executed by one or more processors to implement the above-described method of controlling a client-side virtual prop.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, display 1205, audio circuitry 1207, and power supply 1209.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 1200 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which when executed by a processor of a terminal, implements the above-described method of controlling a virtual prop.
Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State drive), or optical disc. The Random Access Memory may include a ReRAM (resistive Random Access Memory) and a DRAM (Dynamic Random Access Memory).
In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer readable storage medium, and the processor executes the computer instruction, so that the computer device executes the control method of the virtual prop.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, the step numbers described herein only exemplarily show one possible execution sequence among the steps, and in some other embodiments, the steps may also be executed out of the numbering sequence, for example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in a reverse order to the order shown in the figure, which is not limited by the embodiment of the present application.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (16)

1. A control method of a virtual prop is characterized by comprising the following steps:
receiving a shooting instruction aiming at the virtual shooting prop;
controlling the virtual shooting prop to execute shooting operation;
after the shooting operation is executed, if a sliding touch operation is received, determining displacement information of the sliding touch operation, wherein the displacement information comprises a displacement distance and/or a displacement speed of the sliding touch operation;
determining that the sliding touch operation is a centered manual control operation under the condition that the displacement information meets the condition;
canceling automatic restoring force applied to the virtual shooting prop, and controlling the center of alignment position of the virtual shooting prop according to the center of alignment manual control operation;
wherein the automatic restoring force is a force for automatically adjusting a quasi-centric position of the virtual shooting prop after the shooting operation is performed.
2. The method of claim 1, wherein determining displacement information of a sliding touch operation if the sliding touch operation is received after the shooting operation is performed comprises:
after the shooting operation is executed, if a sliding touch operation is received, acquiring a touch position of the sliding touch operation at a first moment and a touch position of the sliding touch operation at a second moment;
determining a displacement vector generated between the first moment and the second moment by the sliding touch operation according to the touch position at the first moment and the touch position at the second moment;
determining the displacement information based on the displacement vector.
3. The method of claim 1, wherein the displacement information comprises a longitudinal displacement distance and/or a longitudinal displacement velocity;
the determining that the sliding touch operation is the centered manual control operation when the displacement information satisfies a condition includes:
under the condition that the longitudinal displacement distance belongs to a first distance interval and/or the longitudinal displacement speed belongs to a first speed interval, determining the sliding touch operation as a longitudinal centered manual control operation;
the cancellation is to the virtual shooting prop exerts automatic restoring force, including:
and canceling the longitudinal automatic restoring force applied to the virtual shooting prop.
4. The method of claim 1, wherein the displacement information comprises a lateral displacement distance and/or a lateral displacement velocity;
the determining that the sliding touch operation is the centered manual control operation when the displacement information satisfies a condition includes:
under the condition that the transverse displacement distance belongs to a second distance interval and/or the transverse displacement speed belongs to a second speed interval, determining that the sliding touch operation is a transverse centering manual control operation;
the cancellation is to the virtual shooting prop exerts automatic restoring force, including:
and canceling the transverse automatic restoring force applied to the virtual shooting prop.
5. The method of claim 2, wherein determining displacement information based on the displacement vector comprises:
transforming the displacement vector to obtain a transformed displacement vector, wherein the transforming is used for establishing a mapping relation between the displacement of the sliding touch operation and the displacement of the alignment position;
and determining the displacement information according to the transformed displacement vector.
6. The method of claim 1, further comprising:
and after the shooting operation is executed, if the quasi-center manual control operation is not received, applying the automatic restoring force to the virtual shooting prop, and controlling the quasi-center position of the virtual shooting prop according to the automatic restoring force.
7. A control method of a virtual prop is characterized by comprising the following steps:
displaying the quasi-center of the virtual shooting prop in the virtual environment;
responding to a shooting instruction aiming at the virtual shooting prop, and controlling the virtual shooting prop to execute a shooting operation;
after the shooting operation is executed, if a sliding touch operation is received, determining displacement information of the sliding touch operation, wherein the displacement information comprises a displacement distance and/or a displacement speed of the sliding touch operation;
determining that the sliding touch operation is a quasi-centered manual control operation for the virtual shooting prop under the condition that the displacement information meets a condition;
adjusting the display position of the sighting center based on the sighting center manual control operation;
and under the condition of receiving the quasi-center manual control operation, canceling the application of automatic restoring force to the virtual shooting prop, wherein the automatic restoring force is used for automatically adjusting the quasi-center position of the virtual shooting prop after the shooting operation is executed.
8. The method of claim 7, wherein receiving a centered manual control operation for the virtual firing prop after performing the firing operation comprises:
after the shooting operation is executed, if a sliding touch operation is received, acquiring a touch position of the sliding touch operation at a first moment and a touch position of the sliding touch operation at a second moment;
determining a displacement vector generated between the first moment and the second moment by the sliding touch operation according to the touch position at the first moment and the touch position at the second moment;
determining the displacement information based on the displacement vector.
9. The method of claim 7, wherein the displacement information comprises a longitudinal displacement distance and/or a longitudinal displacement velocity;
the determining that the sliding touch operation is the centered manual control operation when the displacement information satisfies a condition includes:
under the condition that the longitudinal displacement distance belongs to a first distance interval and/or the longitudinal displacement speed belongs to a first speed interval, determining the sliding touch operation as a longitudinal centered manual control operation;
and under the condition that the longitudinal and centered manual control operation is received, canceling the longitudinal automatic restoring force applied to the virtual shooting prop.
10. The method of claim 7, wherein the displacement information comprises a lateral displacement distance and/or a lateral displacement velocity;
the determining that the sliding touch operation is the centered manual control operation when the displacement information satisfies a condition includes:
under the condition that the transverse displacement distance belongs to a second distance interval and/or the transverse displacement speed belongs to a second speed interval, determining that the sliding touch operation is a transverse centering manual control operation;
wherein, in the event that the lateral, self-centering manual control operation is received, application of a lateral, automatic restoring force to the virtual shooting prop is cancelled.
11. The method of claim 7, further comprising:
and after the shooting operation is executed, if the sighting center manual control operation is not received, applying the automatic restoring force to the virtual shooting prop, and adjusting the display position of the sighting center according to the automatic restoring force.
12. An apparatus for controlling a virtual prop, the apparatus comprising:
the instruction receiving module is used for receiving a shooting instruction aiming at the virtual shooting prop;
the shooting control module is used for controlling the virtual shooting prop to execute shooting operation;
the information determining module is used for determining displacement information of the sliding touch operation if the sliding touch operation is received after the shooting operation is executed, wherein the displacement information comprises a displacement distance and/or a displacement speed of the sliding touch operation;
the operation determining module is used for determining the sliding touch operation as a quasi-manual control operation under the condition that the displacement information meets the condition;
the centering control module is used for canceling automatic restoring force applied to the virtual shooting prop and controlling the centering position of the virtual shooting prop according to manual control operation of the centering;
wherein the automatic restoring force is a force for automatically adjusting a quasi-centric position of the virtual shooting prop after the shooting operation is performed.
13. An apparatus for controlling a virtual prop, the apparatus comprising:
the center display module is used for displaying the center of the virtual shooting prop in the virtual environment;
the shooting control module is used for responding to a shooting instruction aiming at the virtual shooting prop and controlling the virtual shooting prop to execute shooting operation;
an operation receiving module, configured to determine, after the shooting operation is performed, displacement information of the sliding touch operation if the sliding touch operation is received, where the displacement information includes a displacement distance and/or a displacement speed of the sliding touch operation; determining that the sliding touch operation is a quasi-centered manual control operation for the virtual shooting prop under the condition that the displacement information meets a condition; the center adjustment module is used for adjusting the display position of the center based on the center manual control operation;
and under the condition of receiving the quasi-center manual control operation, canceling the application of automatic restoring force to the virtual shooting prop, wherein the automatic restoring force is used for automatically adjusting the quasi-center position of the virtual shooting prop after the shooting operation is executed.
14. A gaming terminal, characterised in that the gaming terminal comprises a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes or set of instructions, which is loaded and executed by the processor to implement a method of controlling a virtual item according to any of claims 1 to 6, or a method of controlling a virtual item according to any of claims 7 to 11.
15. A computer readable storage medium, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored, loaded and executed by a processor to implement a method of controlling a virtual prop according to any one of claims 1 to 6, or a method of controlling a virtual prop according to any one of claims 7 to 11.
16. A gaming terminal, characterized in that the gaming terminal comprises a computer program product comprising computer instructions stored in a computer readable storage medium, which are read by a processor from the computer readable storage medium and executed to implement the method of controlling a virtual item according to any one of claims 1 to 6, or the method of controlling a virtual item according to any one of claims 7 to 11.
CN202011063487.XA 2020-09-30 2020-09-30 Control method, device, terminal and storage medium of virtual prop Active CN112121416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011063487.XA CN112121416B (en) 2020-09-30 2020-09-30 Control method, device, terminal and storage medium of virtual prop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011063487.XA CN112121416B (en) 2020-09-30 2020-09-30 Control method, device, terminal and storage medium of virtual prop

Publications (2)

Publication Number Publication Date
CN112121416A CN112121416A (en) 2020-12-25
CN112121416B true CN112121416B (en) 2022-04-22

Family

ID=73843765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011063487.XA Active CN112121416B (en) 2020-09-30 2020-09-30 Control method, device, terminal and storage medium of virtual prop

Country Status (1)

Country Link
CN (1) CN112121416B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113230654B (en) * 2021-06-18 2023-02-24 腾讯科技(深圳)有限公司 Shooting display method and device of virtual gun, computer equipment and storage medium
CN114191811B (en) 2021-10-20 2025-03-25 腾讯科技(深圳)有限公司 Information determination method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103301631A (en) * 2012-03-12 2013-09-18 郑国书 Method for playing mouse gun pressing function
KR20190014422A (en) * 2017-08-02 2019-02-12 원유석 Game System Capable of Processing Fixed-Space Mode in First Person Shooting Simulation Game Controlled by Motion Recognition and Processing Method thereof
CN110075521A (en) * 2019-05-22 2019-08-02 努比亚技术有限公司 Pressure rifle householder method, device, mobile terminal and the storage medium of shooting game
CN110841292A (en) * 2019-11-08 2020-02-28 腾讯科技(深圳)有限公司 Control method and device of virtual prop, storage medium and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110652725A (en) * 2019-09-29 2020-01-07 网易(杭州)网络有限公司 Method and device for controlling aiming direction in game, electronic equipment and storage medium
CN111035924B (en) * 2019-12-24 2022-06-28 腾讯科技(深圳)有限公司 Method, device and equipment for controlling props in virtual scene and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103301631A (en) * 2012-03-12 2013-09-18 郑国书 Method for playing mouse gun pressing function
KR20190014422A (en) * 2017-08-02 2019-02-12 원유석 Game System Capable of Processing Fixed-Space Mode in First Person Shooting Simulation Game Controlled by Motion Recognition and Processing Method thereof
CN110075521A (en) * 2019-05-22 2019-08-02 努比亚技术有限公司 Pressure rifle householder method, device, mobile terminal and the storage medium of shooting game
CN110841292A (en) * 2019-11-08 2020-02-28 腾讯科技(深圳)有限公司 Control method and device of virtual prop, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
后坐力到底是指什么?后坐力深度解析;腾讯游戏玩家联盟;《https://baijiahao.baidu.com/s?id=1603142497122380125&wfr=spider&for=pc》;20180613;第1-4页 *

Also Published As

Publication number Publication date
CN112121416A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
US11712634B2 (en) Method and apparatus for providing online shooting game
JP7669633B2 (en) Method, device, terminal and program for controlling virtual objects
JP7350088B2 (en) Virtual object control method, apparatus, device and computer program
CN110548288B (en) Virtual object hit prompting method and device, terminal and storage medium
EP2711059B1 (en) System and method for facilitating interaction with a virtual space
US10835818B2 (en) Systems and methods for customizing weapons and sharing customized weapons via social networks
CN107773987A (en) Virtual shooting main body control method, apparatus, electronic equipment and storage medium
CN112044058B (en) Virtual object control method, device, terminal and storage medium
CN112121416B (en) Control method, device, terminal and storage medium of virtual prop
WO2023065962A1 (en) Information determining method and apparatus, and device and storage medium
CN113694515B (en) Interface display method, device, terminal and storage medium
CN111318015A (en) Virtual article control method, device, terminal and storage medium
CN113181635A (en) Virtual item assembling method, device, terminal and storage medium
CN113617030B (en) Virtual object control method, device, terminal and storage medium
HK40023657B (en) Method and device for controlling virtual items, terminal and storage medium
HK40023657A (en) Method and device for controlling virtual items, terminal and storage medium
HK40054087A (en) Control method, device, terminal and storage medium of virtual object
HK40054087B (en) Control method, device, terminal and storage medium of virtual object
HK40027978A (en) Method and apparatus for controlling virtual object, device and storage medium
CN120324896A (en) Operation determination method, device, terminal and storage medium
CN118649417A (en) Game interactive control method, device, electronic device and readable storage medium
HK40048762A (en) Method and apparatus for assembling virtual prop, terminal, and storage medium
CN114404933A (en) Prop control method and device, storage medium and electronic equipment
HK40027978B (en) Method and apparatus for controlling virtual object, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant