Shooting control method, device, electronic device and storage medium for virtual character

By simulating the jitter of virtual characters and virtual shooting props in virtual scenes, the problem of single shooting performance in the existing technology is solved, and a more realistic and diverse shooting experience is achieved.

CN114191817BActive Publication Date: 2025-05-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111648792.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-06-10
Filing Date
2021-12-30
Publication Date
2025-05-30
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The prior art uses simple shooting animations when presenting shooting performance, resulting in a single shooting performance, which is inconsistent with the shooting performance of actual guns in the real world, resulting in an unreal visual experience.

Method used

By displaying virtual characters and virtual shooting props in the virtual scene, and obtaining jitter configuration information in response to shooting trigger operations, obtaining jitter data for different shooting stages, controlling the virtual shooting props for corresponding jitter, and simulating the real shooting performance.

Benefits of technology

It improves the visual performance of virtual characters when shooting, allowing users to experience a real shooting experience, and significantly improves the diversity and authenticity of shooting animations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114191817B_ABST
    Figure CN114191817B_ABST
Patent Text Reader

Abstract

The present application provides a shooting control method, device, electronic device and computer-readable storage medium for a virtual character; the method includes: displaying a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene; in response to a shooting trigger operation based on the virtual shooting prop, obtaining jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, obtaining jitter data corresponding to the current shooting stage according to the jitter configuration information, and in the current shooting stage, controlling the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage. Through the present application, real shooting performance can be simulated to improve the visual experience of users when controlling a virtual character to shoot.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority Statement

[0002] This application claims priority to an application with application number 202110646706.5, filing date June 10, 2021, and title: Shooting Control Method, Device, Electronic Device, and Storage Medium for Virtual Characters. Technical Field

[0003] This application relates to the field of computer human-computer interaction technologies, and particularly to a shooting control method, device, electronic device, and computer-readable storage medium for virtual characters. Background Art

[0004] The human-computer interaction technology for virtual scenes based on graphics processing hardware can achieve diverse interactions between virtual objects controlled by users or artificial intelligence according to actual application requirements, and has broad practical value. For example, in the virtual scene of a game, it can simulate the real battle process between virtual objects.

[0005] Taking the game scene as an example, shooting games are a type of competitive game deeply loved by users. They can not only help users relieve stress and relax, but also improve the user's own reaction ability and sensitivity through shooting games.

[0006] However, related technologies usually use a simple shooting animation to simulate the shooting performance when presenting the shooting performance. That is, every time the user controls the virtual character to perform a shooting operation, this animation is repeatedly played as the shooting performance during continuous shooting. That is to say, the shooting performance presented by related technologies is relatively single, inconsistent with the shooting performance of actual firearms in the real world, resulting in an unrealistic shooting performance and a poor visual experience for users. Summary of the Invention

[0007] Embodiments of this application provide a shooting control method, device, electronic device, and computer-readable storage medium for virtual characters, which can simulate real shooting performance to improve the visual experience of users when controlling virtual characters to shoot.

[0008] The technical solution of the embodiments of this application is implemented as follows:

[0009] Embodiments of this application provide a shooting control method for virtual characters, including:

[0010] Display a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene;

[0011] In response to a shooting trigger operation based on the virtual shooting prop, obtain jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, obtain jitter data corresponding to the current shooting stage according to the jitter configuration information, and

[0012] In the current shooting stage, based on the jitter data corresponding to the current shooting stage, control the holding part to drive the virtual shooting prop to perform corresponding jitter.

[0013] In the above solution, when both curve resources and program curves are configured in the jitter configuration information corresponding to the current shooting stage, after determining the jitter data corresponding to the current shooting stage, the method further includes: performing the following processing for each reference direction of the holding part: adding the displacements in different reference directions included in the jitter data determined based on the curve resources to the displacements in different reference directions included in the jitter data determined based on the program curve to obtain a displacement sum; adding the rotations in different reference directions included in the jitter data determined based on the curve resources to the rotations in different reference directions included in the jitter data determined based on the program curve to obtain a rotation sum; updating the jitter data corresponding to the current shooting stage based on the displacement sum and the rotation sum.

[0014] An embodiment of the present application provides a shooting control device for a virtual character, including:

[0015] A display module for displaying a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene;

[0016] An acquisition module for obtaining jitter configuration information corresponding to the current shooting stage of the virtual shooting prop in response to a shooting trigger operation based on the virtual shooting prop;

[0017] The acquisition module is further configured to obtain jitter data corresponding to the current shooting stage according to the jitter configuration information;

[0018] A control module for controlling the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage in the current shooting stage.

[0019] In the above solution, the obtaining module is further configured to obtain the number of shots corresponding to the current moment from the start of shooting; the device further includes a determining module, configured to determine the shooting stage corresponding to the number of shots and use it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed number of shots; the determining module is further configured to determine the time difference between the current moment and the start of shooting, and to determine the shooting stage corresponding to the time difference and use it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed duration.

[0020] In the above solution, the obtaining module is further configured to obtain jitter data corresponding to the current shooting stage according to the animation recoil mode.

[0021] In the above solution, the obtaining module is further configured to obtain the change value of the recoil force corresponding to the virtual shooting prop in the current shooting stage; the determining module is further configured to determine the jitter data corresponding to the current shooting stage according to the change value, where the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

[0022] In the above solution, the obtaining module is further configured to obtain the change values of the recoil force corresponding to the virtual shooting prop from the start of the shooting stage to the current shooting stage respectively; the determining module is further configured to perform an accumulation process on the multiple change values and determine the jitter data corresponding to the current shooting stage according to the accumulation result, where the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

[0023] In the above solution, the determining module is further configured to determine curve resources according to the correspondence between different shooting stages and offset ranges, and determine the jitter data corresponding to the current shooting stage according to the curve resources; or, to determine the jitter data corresponding to the current shooting stage according to a program curve, where the program curve includes at least one of the following: a trigonometric function type program curve determined according to a period, an amplitude, and an initial value; an attenuation function type program curve determined according to a decay base, a decay frequency, a fade-in time, and a fade-out time.

[0024] In the above solution, the determining module is further configured to, according to the current shooting stage, determine the offset range corresponding to the current shooting stage in the curve resources; determine the corresponding offset value according to the offset range, and determine the time difference between the current moment and the shooting moment corresponding to the current shooting stage; based on the time difference, determine the value corresponding to the time difference in the interpolation curve corresponding to the shooting interval time of the virtual shooting prop; and use the product of the offset value and the value as the jitter data corresponding to the current shooting stage.

[0025] In the above solution, the determining module is further configured to perform the following processing for each reference direction corresponding to the holding part: obtain a first program curve corresponding to the displacement, and use the first function value corresponding to the current moment in the first program curve as the displacement of the reference direction; obtain a second program curve corresponding to the rotation, and use the second function value corresponding to the current moment in the second program curve as the rotation of the reference direction.

[0026] In the above solution, the determining module is further configured to perform the following processing for each reference direction of the holding part: add the displacements in different reference directions included in the jitter data determined based on the curve resource to the displacements in different reference directions included in the jitter data determined based on the program curve to obtain a displacement sum; add the rotations in different reference directions included in the jitter data determined based on the curve resource to the rotations in different reference directions included in the jitter data determined based on the program curve to obtain a rotation sum; update the jitter data corresponding to the current shooting stage based on the displacement sum and the rotation sum.

[0027] In the above solution, the obtaining module is further configured to obtain the type of the virtual shooting prop; the determining module is further configured to determine a first adjustment coefficient corresponding to the type of the virtual shooting prop, and use the product of the first adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, where the first adjustment coefficient is positively correlated with the recoil or lethality of the type of the virtual shooting prop.

[0028] In the above solution, the obtaining module is further configured to obtain the shooting mode corresponding to the virtual character in the current shooting stage; the determining module is further configured to determine a second adjustment coefficient corresponding to the shooting mode, and use the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, where the accuracy of the shooting mode is negatively correlated with the second adjustment coefficient.

[0029] In the above solution, the control module is further configured to perform the following processing when updating and displaying each frame of the virtual scene in the current shooting stage: superimpose the displacements and rotations in different reference directions included in the jitter data of each frame of the image on the position components in the corresponding reference directions of the holding part, where the displacements and rotations in different reference directions are used to make the holding part drive the virtual shooting prop to perform corresponding jitters.

[0030] In the above solution, the obtaining module is further configured to obtain the real-time jitter direction of the virtual shooting prop in the current shooting stage; the determining module is further configured to determine a bullet landing point that synchronously offsets with the real-time jitter direction; and the control module is further configured to control the virtual bullet fired by the virtual shooting prop to hit the bullet landing point.

[0031] An embodiment of the present application provides an electronic device, including:

[0032] A memory for storing executable instructions;

[0033] A processor, when executing the executable instructions stored in the memory, implements the shooting control method of the virtual character provided by the embodiment of the present application.

[0034] An embodiment of the present application provides a computer-readable storage medium, storing executable instructions, which when executed by a processor, implement the shooting control method of the virtual character provided by the embodiment of the present application.

[0035] An embodiment of the present application provides a computer program product, the computer program product includes computer-executable instructions, which when executed by a processor, implement the shooting control method of the virtual character provided by the embodiment of the present application.

[0036] The embodiment of the present application has the following beneficial effects:

[0037] For different shooting stages, the jitter data corresponding to each shooting stage is respectively obtained, and in each shooting stage, based on the jitter data corresponding to the shooting stage, the holding part of the virtual character is controlled to drive the virtual shooting prop to perform corresponding jitter. In this way, during the shooting process, the shooting performances corresponding to different shooting stages are different, rather than using the method of repeatedly playing the same animation resource in the related art, thereby significantly improving the visual performance of the virtual character during shooting and giving the user a real shooting experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic diagram of an application mode of the shooting control method of the virtual character provided by the embodiment of the present application;

[0039] Figure 2 is a schematic diagram of an application mode of the shooting control method of the virtual character provided by the embodiment of the present application;

[0040] Figure 3 is a schematic diagram of the structure of the terminal device 400 provided by the embodiment of the present application;

[0041] Figure 4 is a schematic flowchart of the shooting control method of the virtual character provided by the embodiment of the present application;

[0042] Figure 5 It is a schematic flowchart of a shooting control method for a virtual character provided by an embodiment of the present application;

[0043] Figure 6 It is a schematic flowchart of a shooting control method for a virtual character provided by an embodiment of the present application;

[0044] Figure 7 It is a schematic diagram showing the shooting action performances corresponding to different shooting stages of a first-person character provided by the related art;

[0045] Figure 8 It is a schematic diagram showing the shooting action performances corresponding to different shooting stages of a first-person character provided by an embodiment of the present application;

[0046] Figure 9 It is a superimposed diagram of the maximum moment when the hand pulls back during continuous first-person shooting provided by an embodiment of the present application;

[0047] Figure 10 It is a schematic diagram showing the shooting action performances corresponding to different shooting stages when a first-person character provided by an embodiment of the present application is in the aiming state;

[0048] Figure 11 It is a superimposed diagram of the maximum moment when the hand pulls back during continuous shooting when a first-person character provided by an embodiment of the present application is in the aiming state;

[0049] Figure 12 It is a schematic flowchart of a shooting control method for a virtual character provided by an embodiment of the present application;

[0050] Figure 13 It is a schematic diagram of the configuration of a weapon shooting jitter slot provided by an embodiment of the present application. Detailed implementation manners

[0051] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0052] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0053] In the following description, the terms "first / second" only distinguish similar objects and do not represent a specific order for the objects. Understandably, "first / second" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0055] Before further elaborating on the embodiments of this application, the nouns and terms involved in the embodiments of this application are described. The nouns and terms involved in the embodiments of this application are subject to the following explanations.

[0056] 1) Client: An application program running on a terminal device for providing various services, such as a video playback client, a game client, etc.

[0057] 2) In response to: Used to represent the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or can have a set delay; without special instructions, there is no limit on the execution order of the multiple executed operations.

[0058] 3) Virtual scene: A virtual scene displayed (or provided) when an application program runs on a terminal device. The virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5D virtual scene, or a three-dimensional virtual scene. The embodiments of this application do not limit the dimension of the virtual scene. For example, the virtual scene can include the sky, land, ocean, etc. The land can include environmental elements such as deserts and cities, and users can control virtual characters to move in the virtual scene.

[0059] 4) Virtual character: The images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable objects can be virtual people, virtual animals, anime characters, etc., such as the people and animals displayed in a virtual scene. The virtual character can be a virtual image in a virtual scene used to represent a user. A virtual scene can include multiple virtual characters, and each virtual character has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.

[0060] For example, the virtual character can be drawn by means of a 3D game engine or digital content creation (DCC) software with the aid of 3D graphic modeling and rendering technology. Among them, the virtual character data can include character model data and character skeleton data.

[0061] 5) Scene data, which represents the characteristic data of the virtual scene. For example, it can be the area of the construction area in the virtual scene, the architectural style in which the virtual scene is currently located, etc.; it can also include the position of the virtual building in the virtual scene and the floor area of the virtual building.

[0062] Taking the virtual scene as the game scene as an example, in various shooting games, the related technology usually uses a simple shooting animation to simulate the shooting performance when presenting the shooting performance. That is, every time the user controls the virtual character to perform a shooting operation, this animation is repeatedly played as the shooting performance during continuous shooting. That is to say, the shooting performance presented by the related technology is relatively single, inconsistent with the shooting performance of actual firearms in the real world during shooting, resulting in an unrealistic shooting performance and a poor visual experience for users.

[0063] In view of the above technical problems, the embodiments of the present application provide a shooting control method, device, electronic device and computer-readable storage medium for a virtual character, which can simulate a real shooting performance to improve the visual experience of the user when controlling the virtual character to shoot. To facilitate easier understanding of the shooting control method for the virtual character provided by the embodiments of the present application, first, an exemplary implementation scenario of the shooting control method for the virtual character provided by the embodiments of the present application is described. The virtual scene in the shooting control method for the virtual character provided by the embodiments of the present application can be completely output based on the terminal device, or output based on the cooperation of the terminal device and the server.

[0064] In some other embodiments, the virtual scene can also be an environment for game characters to interact. For example, it can be an environment for game characters to fight in the virtual scene. By controlling the actions of the game characters, two-way interaction can be carried out in the virtual scene, so that the user can relieve the life pressure during the game process.

[0065] In one implementation scenario, refer to Figure 1 , Figure 1 which is a schematic diagram of the application mode of the shooting control method for the virtual character provided by the embodiments of the present application, and is applicable to some application modes that can complete the relevant data calculation of the virtual scene 100 only relying on the graphic processing hardware computing power of the terminal device 400, such as stand-alone / offline mode games, and the virtual scene is output through various types of terminal devices 400 such as smart phones, tablets, and virtual reality / augmented reality devices.

[0066] As an example, the types of graphics processing hardware include a central processing unit (CPU) and a graphics processing unit (GPU).

[0067] When forming the visual perception of the virtual scene 100, the terminal device 400 calculates the data required for display through the graphics computing hardware, and completes the loading, parsing, and rendering of the display data. The graphics output hardware outputs video frames that can form a visual perception of the virtual scene. For example, a two-dimensional video frame is presented on the display screen of a smartphone, or a video frame that realizes a three-dimensional display effect is projected onto the lens of an augmented reality / virtual reality glasses; in addition, in order to enrich the perception effect, the terminal device 400 can also form one or more of auditory perception, tactile perception, motion perception, and taste perception by means of different hardware.

[0068] As an example, a client 410 (such as a stand-alone game application) runs on the terminal device 400. During the operation of the client 410, a virtual scene including role-playing is output. The virtual scene can be an environment for game characters to interact. For example, it can be a plain, a street, a valley, etc. for game characters to fight; taking the display of the virtual scene 100 from the first-person perspective as an example, a virtual character 101 and a virtual shooting prop 102 (such as a virtual submachine gun, a virtual sniper rifle, a virtual shotgun, etc.) held by the virtual character 101 through a holding part (such as a hand) are displayed in the virtual scene 100. Among them, the virtual character 101 can be a game character controlled by the user, that is, the virtual character 101 is controlled by the real user and will move in the virtual scene 100 in response to the operation of the real user on the controller (such as a touch screen, a voice control switch, a keyboard, a mouse, and a joystick, etc.). For example, when the real user moves the joystick to the right, the virtual character 101 will move to the right in the virtual scene 100, and can also stay still, jump, and control the virtual character 101 to perform shooting operations, etc.

[0069] For example, when the client 410 receives a shooting operation triggered by the user based on the virtual shooting prop 102, it obtains the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop 102, and obtains the jitter data corresponding to the current shooting stage based on the obtained jitter configuration information. Also, in the current shooting stage, based on the jitter data corresponding to the current shooting stage, it controls the holding part of the virtual character 101 to drive the virtual shooting prop 102 to perform corresponding jitter. That is to say, during the shooting process, for different shooting stages, the jitter data corresponding to each shooting stage is respectively obtained, and in each shooting stage, based on the jitter data corresponding to that shooting stage, it controls the holding part of the virtual character 101 to drive the virtual shooting prop 102 to perform corresponding jitter. In this way, since the shooting performances corresponding to different shooting stages are different, rather than using the method of repeatedly playing the same animation resource in the related art, it can significantly improve the visual performance of the virtual character during shooting and give the user a real shooting experience.

[0070] In another implementation scenario, refer to Figure 2 , Figure 2 FIG. is a schematic diagram of an application mode of the shooting control method for a virtual character provided by an embodiment of the present application, which is applied to the terminal device 400 and the server 200, and is applicable to an application mode that depends on the computing power of the server 200 to complete virtual scene calculation and output the virtual scene on the terminal device 400.

[0071] Taking the visual perception of forming the virtual scene 100 as an example, the server 200 calculates the display data related to the virtual scene (such as scene data) and sends it to the terminal device 400 through the network 300. The terminal device 400 depends on the graphics computing hardware to complete the loading, parsing, and rendering of the calculation display data, and depends on the graphics output hardware to output the virtual scene to form visual perception. For example, it can present two-dimensional video frames on the display screen of a smart phone, or project video frames with a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses; for the perception of the form of the virtual scene, it can be understood that it can be output by means of the corresponding hardware of the terminal device 400, such as using a microphone to form auditory perception, using a vibrator to form tactile perception, and so on.

[0072] As an example, a client 410 (such as an online game application) is running on a terminal device 400. The terminal device 400 interacts with other users in a game by connecting to a server 200 (such as a game server). The terminal device 400 outputs a virtual scene 100 of the client 410. Taking the virtual scene 100 being displayed from a first-person perspective as an example, in the virtual scene 100, there is a virtual character 101 and a virtual shooting prop 102 (such as a virtual submachine gun, a virtual sniper rifle, a virtual shotgun, etc.) held by the virtual character 101 through a holding part (such as a hand). Among them, the virtual character 101 can be a game character controlled by a user, that is, the virtual character 101 is controlled by a real user and will move in the virtual scene 100 in response to the operation of the real user on a controller (such as a touch screen, a voice control switch, a keyboard, a mouse, and a joystick, etc.). For example, when the real user moves the joystick to the right, the virtual character 101 will move to the right in the virtual scene 100. It can also stay still in place, jump, and control the virtual character 101 to perform shooting operations, etc.

[0073] For example, when the client 410 receives a shooting operation triggered by a user based on the virtual shooting prop 102, it obtains the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop 102 (such as obtaining the jitter configuration information corresponding to the current shooting stage from the server 200), and obtains the jitter data corresponding to the current shooting stage according to the obtained jitter configuration information. And in the current shooting stage, based on the jitter data corresponding to the current shooting stage, it controls the holding part of the virtual character 101 to drive the virtual shooting prop 102 to perform corresponding jitter. That is to say, during the shooting process, for different shooting stages, the jitter data corresponding to each shooting stage is respectively obtained, and in each shooting stage, based on the jitter data corresponding to that shooting stage, it controls the holding part of the virtual character 101 to drive the virtual shooting prop 102 to perform corresponding jitter. In this way, since the shooting performances corresponding to different shooting stages are different from each other, rather than using the method of repeatedly playing the same animation resource in the related art, the visual performance of the virtual character during shooting can be significantly improved, giving the user a real shooting experience.

[0074] In some embodiments, the terminal device 400 may implement the shooting control method of the virtual character provided in the embodiments of the present application by running a computer program. For example, the computer program may be a native program or software module in the operating system; it may be a local (Native) application (APP, APPlication), that is, a program that needs to be installed in the operating system to run, such as a game APP (i.e., the above-mentioned client 410); it may also be a small program, that is, a program that only needs to be downloaded to the browser environment to run; it may also be a game small program that can be embedded in any APP. In short, the above computer program may be any form of application program, module or plug-in.

[0075] Taking the computer program as an application program as an example, in actual implementation, the terminal device 400 installs and runs an application program that supports a virtual scene. The application program may be any one of a first-person shooting game (FPS, First-Person Shootinggame), a third-person shooting game, a virtual reality application program, a three-dimensional map program, or a multiplayer gunfight survival game. The user uses the terminal device 400 to operate a virtual object located in the virtual scene to perform activities, and the activities include but are not limited to: adjusting the body posture, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, throwing, and building at least one of virtual buildings. Schematically, the virtual object may be a virtual character, such as a simulated human character or an anime character, etc.

[0076] In some other embodiments, the embodiments of the present application may also be implemented by means of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.

[0077] Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.

[0078] Exemplarily, Figure 2The server 200 therein may be an independent physical server, a server cluster or a 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, and big data and artificial intelligence platforms. The terminal device 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device 400 and the server 200 may be directly or indirectly connected through wired or wireless communication means, which is not limited in the embodiments of the present application.

[0079] In some other embodiments, the shooting control method for the virtual character provided by the embodiments of the present application may also be implemented in combination with blockchain technology.

[0080] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. Blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0081] Exemplarily, the jitter configuration information corresponding to different shooting stages pre-configured for the virtual shooting prop 102 may be stored in the blockchain network. When the terminal device 400 has the permission to initiate the acquisition of the jitter configuration information and receives a shooting trigger operation based on the virtual shooting prop 102, the terminal device 400 may generate a transaction for querying the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop 102 and submit it to the blockchain network. Among them, the query request carries a key name (i.e., the current shooting stage) for the consensus node in the blockchain network to execute the transaction to query the data corresponding to the key name (i.e., the jitter configuration information corresponding to the current shooting stage) from the state database. Then, the blockchain network sends the queried jitter configuration information corresponding to the current shooting stage to the terminal device 400, so that the terminal device 400 can obtain the jitter data corresponding to the current shooting stage according to the jitter configuration information, and in the current shooting stage, based on the jitter data corresponding to the current shooting stage, control the holding part of the virtual character 101 to drive the virtual shooting prop 102 to perform corresponding jitter. In this way, by storing the jitter configuration information corresponding to different shooting stages in the blockchain network, based on the decentralized, distributed storage, and immutability characteristics of the blockchain network, the security and reliability of the jitter configuration information are ensured.

[0082] Next, forFigure 1 Describe the structure of the terminal device 400 shown in. Refer to Figure 3 , Figure 3 is a schematic structural diagram of the terminal device 400 provided by an embodiment of the present application. Figure 3 The terminal device 400 shown in includes: at least one processor 420, a memory 460, at least one network interface 430, and a user interface 440. Each component in the terminal device 400 is coupled together through a bus system 450. It can be understood that the bus system 440 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 450 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear description, in Figure 3 all kinds of buses are labeled as the bus system 450.

[0083] The processor 420 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0084] The user interface 440 includes one or more output devices 441 that enable the presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 440 also includes one or more input devices 442, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons, and controls.

[0085] The memory 460 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disc drives, etc. The memory 460 optionally includes one or more storage devices that are physically located away from the processor 420.

[0086] The memory 460 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM, Read Only Memory), and the volatile memory can be a random access memory (RAM, Random Access Memory). The memory 460 described in the embodiments of the present application is intended to include any suitable type of memory.

[0087] In some embodiments, the memory 460 is capable of storing data to support various operations. Examples of these data include programs, modules, and data structures, or subsets or supersets thereof, which are described below by way of example.

[0088] An operating system 461, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0089] A network communication module 462, for reaching other computing devices via one or more (wired or wireless) network interfaces 430. Exemplary network interfaces 430 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), etc.;

[0090] A presentation module 463, for enabling the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 441 associated with the user interface 440 (e.g., a display screen, a speaker, etc.);

[0091] An input processing module 464, for detecting and translating one or more user inputs or interactions from one of one or more input devices 442.

[0092] In some embodiments, the shooting control device of the virtual character provided by the embodiments of the present application can be implemented in software. Figure 3 Shown is a shooting control device 465 of the virtual character stored in the memory 460, which can be software in the form of programs and plugins, etc., including the following software modules: a display module 4651, an acquisition module 4652, a control module 4653, and a determination module 4654. These modules are logical, so they can be combined arbitrarily or further split according to the functions implemented. It should be noted that, Figure 3 For the convenience of expression, all the above modules are shown at once, but it should not be considered that the shooting control device 465 of the virtual character excludes embodiments that may only include the display module 4651, the acquisition module 4652, and the control module 4653. The functions of each module will be described below.

[0093] In some other embodiments, the shooting control device for the virtual character provided in the embodiments of the present application may be implemented in a hardware manner. As an example, the shooting control device for the virtual character provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the shooting control method for the virtual character provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.

[0094] The shooting control method for the virtual character provided in the embodiments of the present application will be specifically described below with reference to the accompanying drawings. The shooting control method for the virtual character provided in the embodiments of the present application may be executed independently by the Figure 1 terminal device 400 in Figure 2 or may be executed collaboratively by the

[0095] terminal device 400 and the server 200 in Figure 1 Below, taking the execution of the shooting control method for the virtual character provided in the embodiments of the present application independently by the Figure 4 terminal device 400 in Figure 4 as an example for illustration. Refer to Figure 4 which is a schematic flowchart of the shooting control method for the virtual character provided in the embodiments of the present application, and the steps shown in

[0096] It should be noted that Figure 4 the method shown in

[0097] In step S101, a virtual character and a virtual shooting prop held by the virtual character through a holding part are displayed in the virtual scene.

[0098] In some embodiments, a client supporting a virtual scene is installed on a terminal device (for example, when the virtual scene is a game, the corresponding client can be a shooting game APP). When the user opens the client installed on the terminal device (for example, the user clicks on the icon corresponding to the shooting game APP presented on the user interface of the terminal device), and the terminal device runs the client, a virtual character (such as virtual character A controlled by the user) and a virtual shooting prop (such as a virtual heavy machine gun, a virtual shotgun, a virtual sniper rifle, etc.) held by the virtual character through a holding part (such as a hand) can be displayed in the virtual scene presented on the human-computer interaction interface of the client).

[0099] In some other embodiments, the above-mentioned display of a virtual character and a virtual shooting prop held by the virtual character through a holding part in the virtual scene can also be achieved in the following manner: in response to a virtual shooting prop selection operation, a virtual character and a selected target virtual shooting prop held by the virtual character through a holding part are displayed in the virtual scene).

[0100] For example, taking the virtual scene as a game, a variety of virtual weapons are provided in the game for the user to choose from, such as including a virtual heavy machine gun, a virtual shotgun, and a virtual sniper rifle, etc., and for each virtual weapon, a corresponding icon is displayed in the game screen. When the user clicks on the icon corresponding to the virtual heavy machine gun displayed in the game screen, the game screen of a virtual character controlled by the user holding the virtual heavy machine gun through the hand is displayed).

[0101] In some embodiments, the virtual scene can be displayed in the first-person perspective in the human-computer interaction interface of the client (for example, the user plays the virtual character in the game from his own perspective); it can also be displayed in the third-person perspective (for example, the user chases the virtual character in the game to play); it can also be displayed in a bird's-eye large perspective; among them, any switching can be performed between the above different perspectives).

[0102] As an example, the virtual character can be an object controlled by the current user in the game. Of course, other virtual characters can also be included in the virtual scene, such as virtual characters that can be controlled by other users or by a robot program. The virtual characters can be divided into any one of multiple teams, and the teams can be in a hostile relationship or a cooperative relationship. The teams in the virtual scene can include one or all of the above relationships).

[0103] Taking the display of a virtual scene from the first-person perspective as an example, the virtual scene displayed in the human-computer interaction interface may include: determining the field-of-view area of the virtual character according to the viewing position and field-of-view angle of the virtual character in the complete virtual scene, and presenting the partial virtual scene located in the field-of-view area in the complete virtual scene, that is, the displayed virtual scene may be a partial virtual scene relative to the panoramic virtual scene. Since the first-person perspective is the viewing perspective that can most impact the user, in this way, an immersive perception of the user being on the scene during the operation can be achieved.

[0104] Taking the display of a virtual scene from an aerial large perspective as an example, the virtual scene displayed in the human-computer interaction interface may include: in response to a zoom operation on the panoramic virtual scene, presenting a partial virtual scene corresponding to the zoom operation in the human-computer interaction interface, that is, the displayed virtual scene may be a partial virtual scene relative to the panoramic virtual scene. In this way, the operability of the user during the operation can be improved, and thus the efficiency of human-computer interaction can be improved.

[0105] In step S102, in response to a shooting trigger operation based on a virtual shooting prop, obtain the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop.

[0106] In some embodiments, different shooting stages may be distinguished by the number of shots. Then, before obtaining the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, the following processing may also be performed: obtaining the number of shots corresponding from the start shooting moment (i.e., the moment when the shooting trigger operation is received) to the current moment, determining the shooting stage corresponding to the number of shots, and using it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed number of shots (for example, each shooting stage may include 1 shot or multiple shots).

[0107] For example, assume that the moment when the shooting trigger operation is received (i.e., the start shooting moment) is 00:00, the current moment is 00:01, and the shooting interval time of the virtual shooting prop is 0.1 second (i.e., the virtual shooting prop shoots once every 0.1 second). Then, it can be determined that the number of shots corresponding from the start shooting moment to the current moment is 10 times. At the same time, assume that each shooting stage includes 2 shots. Then, it can be determined that the current shooting stage of the virtual shooting prop is the 5th shooting stage during the shooting process.

[0108] It should be noted that in actual applications, the value of the number of shots included in each shooting stage can be flexibly adjusted according to the actual situation. For example, when the performance of the terminal device is better, the value of the number of shots included in each shooting stage can be relatively small (for example, 1 shot can be used as a shooting stage, that is, the shooting performance of each shot can be different), so as to present the shooting effect more delicately; while when the performance of the terminal device is poor, the value of the number of shots included in each shooting stage can be relatively large (for example, 5 consecutive shots can be used as a shooting stage, that is, the shooting performance of these 5 shots is the same), so as to avoid the game running smoothly due to excessive focus on shooting performance (such as causing the game screen to freeze, etc.).

[0109] In some other embodiments, different shooting stages can also be distinguished by a fixed time period. Before obtaining the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, the following processing can also be performed: determining the time difference between the current moment and the start shooting moment, determining the shooting stage corresponding to the time difference, and using it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed duration (for example, the fixed duration included in each shooting stage can be 0.1 second or 0.5 second, etc.).

[0110] For example, assuming that the start shooting moment is 00:00 and the current moment is 00:01, then it can be determined that the time difference between the current moment and the start shooting moment is 1 second. At the same time, assuming that the fixed duration included in each shooting stage is 0.1 second, then it can be determined that the current shooting stage of the virtual shooting prop is the 10th shooting stage during the shooting process.

[0111] It should be noted that in actual applications, the value of the fixed duration included in each shooting stage can be flexibly adjusted according to the actual situation. For example, when the performance of the user's terminal device is better and the user has a higher requirement for the shooting action performance, the value of the fixed duration included in each shooting stage can be relatively small; while when the performance of the user's terminal device is poor or the user has a lower requirement for the shooting action performance, the value of the fixed duration included in each shooting stage can be relatively large. That is to say, the value of the fixed duration can be determined correspondingly according to the settings of the user in the game.

[0112] In some embodiments, the game user or game developer can pre-configure the jitter configuration information corresponding to each shooting stage for the different shooting stages of the virtual shooting prop during the shooting process in the configuration interface. In this way, after determining the current shooting stage of the virtual shooting prop, the jitter configuration information corresponding to the current shooting stage can be obtained from multiple jitter configuration information.

[0113] In step S103, jitter data corresponding to the current shooting stage is obtained according to the jitter configuration information.

[0114] In some embodiments, the jitter configuration information may include a configured animation recoil mode, where the animation recoil mode includes at least one of the following: overlay mode, superposition mode, curve mode. Then, the above-mentioned obtaining of the jitter data corresponding to the current shooting stage according to the jitter configuration information can be achieved by: obtaining the jitter data corresponding to the current shooting stage according to the animation recoil mode.

[0115] Exemplarily, when the animation recoil mode includes the overlay mode (which can also be called the interruption mode, that is, it will not accumulate the change values of the recoil force corresponding to each shooting stage, but will use the change values of the recoil force of the virtual shooting prop corresponding to each shooting stage to obtain the jitter data corresponding to the current shooting stage), then the above-mentioned obtaining of the jitter data corresponding to the current shooting stage according to the animation recoil mode can be achieved by: obtaining the change value of the recoil force of the virtual shooting prop corresponding to the current shooting stage; determining the jitter data corresponding to the current shooting stage according to the change value, where the jitter data includes the displacement and rotation of the holding part of the virtual character relative to different reference directions.

[0116] For example, taking the determination of the displacement of the holding part (such as the hand) of the virtual character relative to the X-axis in the current shooting stage as an example, first obtain the change value of the recoil force of the virtual shooting prop (such as a virtual light machine gun) corresponding to the current shooting stage, then decompose the obtained change value to obtain the change value component corresponding to the X-axis (when the change value component is positive, it corresponds to the positive direction of the X-axis, that is, the right direction; when the change value component is negative, it corresponds to the negative direction of the X-axis, that is, the left direction), and then determine the displacement of the hand position of the virtual character relative to the X-axis according to the change value component corresponding to the X-axis (for example, 1% of the change value component corresponding to the X-axis can be used as the displacement of the hand position of the virtual character relative to the X-axis).

[0117] It should be noted that in practical applications, the percentage value of the change value component corresponding to the X-axis can be adjusted according to specific situations. Among them, the percentage value can be positively correlated with the recoil force or lethality of the virtual shooting prop. For example, when the virtual shooting prop is a virtual heavy machine gun (with a large recoil force), the corresponding jitter is large, so the percentage value can also be larger (for example, 3% of the change value component corresponding to the X-axis can be used as the displacement of the hand relative to the X-axis); while when the virtual shooting prop is a virtual light machine gun (with a small recoil force), the corresponding jitter is small, so the value can also be smaller (for example, 1% of the change value component corresponding to the X-axis can be used as the displacement of the hand relative to the X-axis).

[0118] Exemplarily, when the animated recoil mode includes a superimposed mode (which can also be called an accumulative mode, that is, the change values of the recoil of the virtual shooting prop in each shooting stage will be accumulated. That is, it is equivalent to determining the jitter data corresponding to the current shooting stage based on the accumulated result of the change values of the recoil corresponding to each shooting stage from the start shooting stage to the current shooting stage), then the above-mentioned method of obtaining the jitter data corresponding to the current shooting stage according to the animated recoil mode can be implemented in the following way: Obtain the change values of the recoil of the virtual shooting prop corresponding to each shooting stage from the start shooting stage to the current shooting stage; perform an accumulation process on the multiple change values, and determine the jitter data corresponding to the current shooting stage according to the accumulated result, where the jitter data includes the displacement and rotation of the holding part of the virtual character relative to different reference directions.

[0119] For example, taking the determination of the rotation of the virtual character's hand around the X-axis in the current shooting stage as an example, first obtain the change values of the recoil of the virtual shooting prop (such as a virtual light machine gun) corresponding to each shooting stage from the start shooting stage to the current shooting stage, then perform an accumulation process on the multiple change values, and perform a decomposition process on the accumulated result to obtain the accumulated result component corresponding to the X-axis. Subsequently, the rotation of the virtual character's hand around the X-axis can be determined based on the accumulated result component corresponding to the X-axis (for example, assuming that it is determined that the rotation of the virtual character's hand around the X-axis is 0.5° based on the accumulated result component corresponding to the X-axis). That is to say, for the superimposed animated recoil mode, the value of the rotation of the virtual character's hand around the X-axis obtained is the total sum of the rotational changes from the start shooting stage to the current shooting stage.

[0120] Exemplarily, when the animated recoil mode includes a curve mode (including curve resources customized by game users or developers and program curves of fixed types provided by the system (such as trigonometric function types or attenuation function types) to determine the jitter data corresponding to the current shooting stage according to the curve resources or program curves), then the above-mentioned method of obtaining the jitter data corresponding to the current shooting stage according to the animated recoil mode can be implemented in the following way: Determine the curve resources (i.e., the curves customized by game users or developers) according to the correspondence between different shooting stages and offset ranges, and determine the jitter data corresponding to the current shooting stage according to the curve resources; or determine the jitter data corresponding to the current shooting stage according to the program curve (i.e., the curve of the fixed type provided by the system), where the program curve includes at least one of the following: a trigonometric function type of program curve determined according to the period, amplitude, and initial value; an attenuation function type of program curve determined according to the base of attenuation, attenuation frequency, fade-in time, and fade-out time.

[0121] For example, in the configuration interface of the jitter configuration information, there are multiple different types of animated recoil methods provided for game users or developers to choose from. When a game user or developer selects the curve method from multiple different types of animated recoil methods, a curve resource can be further configured (for example, the horizontal axis of the curve can be the sequentially increasing shooting stages, and the vertical axis of the curve can be the offset range corresponding to each shooting stage), or the curve type (such as sine or Perlin noise), period, amplitude, random initial value, decay base, decay frequency, fade-in time, fade-out time, etc. can be filled in, so as to obtain the curve resource or program curve for determining the jitter data corresponding to the current shooting stage subsequently.

[0122] Exemplarily, continuing from the above, the above-mentioned determination of the jitter data corresponding to the current shooting stage according to the curve resource can be achieved in the following way: according to the current shooting stage, determine the offset range corresponding to the current shooting stage in the curve resource; determine the corresponding offset value according to the offset range, and determine the time difference between the current moment and the shooting moment corresponding to the current shooting stage; based on the time difference, determine the value corresponding to the time difference in the interpolation curve corresponding to the shooting interval time of the virtual shooting prop; use the product of the offset value and the value as the jitter data corresponding to the current shooting stage.

[0123] For example, taking the determination of the displacement of the virtual character's hand relative to the X-axis in the current shooting stage as an example, assuming that after determining that the current shooting stage is the 3rd shooting stage, the offset range corresponding to the 3rd shooting stage can be first obtained from the curve resource (assuming the offset upper limit corresponding to the offset range is 1 and the offset lower limit is 0.2), then the corresponding offset value can be determined according to the offset range (for example, randomly select a value from the offset range, assuming the selected offset value is 0.5), then the time difference between the current moment and the shooting moment corresponding to the 3rd shooting stage is determined (assuming the time difference between the two is 0.05 seconds), and the interpolation curve corresponding to the shooting interval time of the virtual shooting prop is obtained (for example, assuming the shooting interval time of the virtual shooting prop is 0.1 seconds and the interval of the interpolation curve is 0-1, then 0 seconds corresponds to the value of the ordinate corresponding to the abscissa of 0 of the interpolation curve, and 0.1 seconds corresponds to the value of the ordinate corresponding to the abscissa of 1 of the interpolation curve). In this way, based on the time difference, the value corresponding to the time difference in the interpolation curve can be determined (that is, obtain the value of the ordinate corresponding to the abscissa of 0.5 of the interpolation curve, for example, assuming it is 0.5), and finally the product of the offset value and the value (that is, 0.5 * 0.5 = 0.25) can be used as the displacement of the virtual character's hand relative to the X-axis.

[0124] Exemplarily, continuing from the above, the above-mentioned determination of the jitter data corresponding to the current shooting stage according to the program curve can be achieved in the following manner: For each reference direction corresponding to the holding part (such as the hand) of the virtual character, perform the following processing: Obtain the first program curve corresponding to the displacement, and use the first function value corresponding to the current moment in the first program curve as the displacement of the reference direction; Obtain the second program curve corresponding to the rotation, and use the second function value corresponding to the current moment in the second program curve as the rotation of the reference direction.

[0125] For example, taking the reference direction as the X-axis as an example, the displacement of the hand of the virtual character relative to the X-axis can be obtained in the following manner: Obtain the first program curve corresponding to the displacement (such as a trigonometric function type program curve, where the abscissa of the program curve represents time and the ordinate represents displacement), and use the first function value corresponding to the current moment in the first program curve as the value of the displacement of the X-axis; Similarly, the rotation of the hand of the virtual character around the X-axis can be obtained in the following manner: Obtain the second program curve corresponding to the rotation (such as a decay function type program curve, where the abscissa of the program curve represents time and the ordinate represents rotation), and use the second function value corresponding to the current moment in the second program curve as the value of the rotation around the X-axis.

[0126] It should be noted that in practical applications, the first program curve and the second program curve can also be program curves of the same type. For example, both the first program curve and the second program curve are trigonometric function type program curves, or both are decay function type program curves. When both the first program curve and the second program curve are trigonometric function type program curves, parameters such as their periods, amplitudes, and initial values can be different.

[0127] In addition, it should be noted that in actual applications, when both curve resources and program curves are configured in the jitter configuration information corresponding to the current shooting stage, after determining the jitter data corresponding to the current shooting stage, the following processing can be performed: For each reference direction corresponding to the holding part of the virtual character, the following processing is performed: Add the displacements in different reference directions included in the jitter data determined based on the curve resources to the displacements in different reference directions included in the jitter data determined based on the program curves to obtain a displacement sum (that is, the result obtained by adding the two displacements. For example, taking the reference direction as the X-axis, assuming that the displacement of the virtual character's hand relative to the X-axis determined based on the curve resources is a, and the displacement of the virtual character's hand relative to the X-axis determined based on the program curves is b, then the displacement sum c obtained by adding the two displacements is c = a + b); Add the rotations in different reference directions included in the jitter data determined based on the curve resources to the rotations in different reference directions included in the jitter data determined based on the program curves to obtain a rotation sum (that is, the result obtained by adding the two rotations. For example, taking the reference direction as the X-axis, assuming that the rotation of the virtual character's hand around the X-axis determined based on the curve resources is d, and the rotation of the virtual character's hand around the X-axis determined based on the program curves is e, then the rotation sum f obtained by adding the two rotations is f = d + e); Update the jitter data corresponding to the current shooting stage based on the displacement sum and the rotation sum. In this way, by integrating the jitter data obtained by different methods and superimposing the integrated jitter data on the position of the holding part of the virtual character, the jitter effect during the process of presenting the user controlling the virtual character to shoot can be made smoother and more natural, so as to further improve the user's shooting experience.

[0128] For example, taking the determination of the displacement of the holding part of the virtual character relative to the X-axis in the current shooting stage as an example, when both curve resources and program curves are configured in the jitter configuration information, assuming that the displacement of the holding part of the virtual character relative to the X-axis determined based on the curve resources is a, and the displacement of the holding part of the virtual character relative to the X-axis determined based on the program curves is b, then the summation result c of these two displacements can be used as the final displacement of the holding part of the virtual character relative to the X-axis and superimposed on the position component of the holding part on the X-axis.

[0129] In some embodiments, Figure 4 The steps shown in S103 can be implemented by Figure 5 the steps shown in S1031A to S1032A, and will be described in conjunction with Figure 5 the steps shown.

[0130] In step S1031A, obtain the type of the virtual shooting prop.

[0131] In some embodiments, since the jitter situations corresponding to different actual firearms in the real world during shooting are different, in order to make the shooting performance of the virtual shooting prop more conform to the shooting performance of the actual firearm in real life, the jitter data corresponding to the current shooting stage can also be updated according to the type of the virtual shooting prop. The types of virtual shooting props can include virtual heavy machine guns, virtual light machine guns, virtual shotguns, virtual sniper guns, etc.

[0132] In step S1032A, determine the first adjustment coefficient corresponding to the type of the virtual shooting prop, and use the product of the first adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data.

[0133] In some embodiments, the jitter configuration information can also include the corresponding relationship between different types of virtual shooting props and adjustment coefficients. After obtaining the type of the virtual shooting prop, the first adjustment coefficient corresponding to the obtained type of the virtual shooting prop can be determined according to the corresponding relationship between the type of the virtual shooting prop and the adjustment coefficient, and the product of the first adjustment coefficient and the jitter data corresponding to the current shooting stage is used as the updated jitter data. The first adjustment coefficient can be positively correlated with the recoil or lethality of the type of the virtual shooting prop.

[0134] For example, assume that the type of the obtained virtual shooting prop is a virtual heavy machine gun. Then, the adjustment coefficient corresponding to the virtual heavy machine gun can be obtained from the corresponding relationship between different types of virtual shooting props and adjustment coefficients included in the jitter configuration information (assuming the obtained adjustment coefficient is a), and the product of the adjustment coefficient a and the jitter data corresponding to the current shooting stage is used as the updated jitter data (for example, assume that the displacement of the holding part relative to the X-axis included in the jitter data corresponding to the current shooting stage is b, then the updated displacement of the holding part relative to the X-axis is a*b). In this way, by updating the jitter data with the adjustment coefficient corresponding to the type of the virtual shooting prop, the shooting performances presented by different types of virtual shooting props subsequently are different, so that the shooting performances of different actual firearms in the real world during shooting can be simulated, further improving the visual experience of the user when controlling the virtual character to shoot.

[0135] In some other embodiments, Figure 4 The shown step S103 can also be implemented through Figure 6 The shown steps S1031B to S1032B, which will be described in combination with Figure 6 The shown steps.

[0136] In step S1031B, obtain the shooting mode corresponding to the virtual character in the current shooting stage.

[0137] In some embodiments, since the jitter conditions corresponding to real people shooting in different shooting modes (such as hip shooting, aiming, etc.) in real life are also different, in order to make the shooting performance of virtual shooting props more conform to the shooting performance corresponding to real people using different shooting modes in real life, the adjustment coefficient can also be determined according to the shooting mode corresponding to the virtual character in the current shooting stage, and the jitter data corresponding to the current shooting stage can be updated according to the determined adjustment coefficient.

[0138] In step S1032B, determine the second adjustment coefficient corresponding to the shooting mode, and use the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data.

[0139] In some embodiments, the jitter configuration information may further include the correspondence between different shooting modes and adjustment coefficients. After obtaining the shooting mode corresponding to the virtual character in the current shooting stage, the second adjustment coefficient corresponding to the virtual character's current shooting mode can be obtained from the correspondence between different shooting modes and adjustment coefficients included in the jitter configuration information, and the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage is used as the updated jitter data, where the second adjustment coefficient may be negatively correlated with the accuracy of the shooting mode.

[0140] For example, assume that the shooting mode corresponding to the virtual character in the current shooting stage is hip shooting (i.e., shooting without aiming, with relatively low accuracy). Then, the adjustment coefficient corresponding to hip shooting (assuming the obtained adjustment coefficient is c) can be obtained from the correspondence between different shooting modes and adjustment coefficients included in the jitter configuration information, and the product of the adjustment coefficient c and the jitter data corresponding to the current shooting stage is used as the updated jitter data (for example, assume that the displacement of the holding part relative to the X-axis included in the jitter data corresponding to the current shooting stage is d, then the updated displacement of the holding part relative to the X-axis is c * d). In this way, by adjusting the jitter data with the adjustment coefficient corresponding to the shooting mode in which the virtual character is currently located, the shooting performances corresponding to different shooting modes can be different when presenting the shooting performance subsequently, so as to simulate the shooting performance of real people shooting in different shooting modes in real life, and further improve the visual experience of users when controlling the virtual character to shoot.

[0141] It should be noted that in practical applications, the jitter data can also be adjusted by combining the first adjustment coefficient corresponding to the type of the virtual shooting prop and the second adjustment coefficient corresponding to the current shooting mode of the virtual character. In this way, by comprehensively considering the type of the virtual shooting prop and the current shooting mode of the character, the subsequent shooting performance can be made more in line with the shooting performance of the actual firearm in real life, so as to enhance the user's visual experience.

[0142] In step S104, in the current shooting stage, based on the jitter data corresponding to the current shooting stage, control the holding part to drive the virtual shooting prop to perform corresponding jitter.

[0143] In some embodiments, the above-mentioned control of the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage can be achieved in the following way: when updating and displaying each frame of the virtual scene in the current shooting stage, perform the following processing: superimpose the displacements and rotations in different reference directions included in the jitter data of each frame of the image on the position components of the holding part of the virtual character in the corresponding reference directions respectively, where the displacements and rotations in different reference directions are used to make the holding part of the virtual character drive the virtual shooting prop to perform corresponding jitter.

[0144] For example, taking the virtual scene as a game, when updating and displaying each frame of the game in the current shooting stage, the following processing can be performed: first, decompose the position where the hand of the virtual character is located to obtain the position components corresponding to different reference directions (for example, the position where the hand is located can be decomposed into position components in the X, Y, and Z directions), and then superimpose the displacements and rotations in different reference directions included in the jitter data of each frame of the image on the position components of the hand of the virtual character in the corresponding reference directions respectively. For example, superimpose the displacement and rotation corresponding to the X axis on the position component corresponding to the X axis, superimpose the displacement and rotation corresponding to the Y axis on the position component corresponding to the Y axis, and superimpose the displacement and rotation corresponding to the Z axis on the position component corresponding to the Z axis. In this way, by superimposing the corresponding positions and rotations on the position components of the hand of the virtual character in the corresponding reference directions, the jitter of the hand bones of the virtual character is realized, and then the virtual shooting prop held is driven to jitter, so as to simulate the shooting performance of the actual firearm in real life and enhance the shooting experience of the user when controlling the virtual character to shoot.

[0145] In some other embodiments, after controlling the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting phase, the real-time jitter direction of the virtual shooting prop in the current shooting phase can be obtained, the landing point synchronously offset with the real-time jitter direction can be determined, and the virtual bullet fired by the virtual shooting prop can be controlled to hit the determined landing point, so as to achieve the effect that the landing point of the virtual shooting prop shooting is consistent with the real-time jitter direction of the virtual shooting prop.

[0146] Exemplarily, taking a virtual scene as a game for example, after controlling the hand of the virtual character to drive the virtual weapon to perform corresponding jitter based on the jitter data corresponding to the current shooting phase, the real-time jitter direction corresponding to the current shooting phase of the virtual weapon can also be obtained (for example, the virtual weapon jitters to the right). Then, the landing point synchronously offset can be determined according to the jitter direction of the virtual weapon (when the virtual weapon jitters to the right, the landing point of the virtual bullet will also synchronously offset to the right), so as to control the virtual bullet fired by the virtual weapon to hit the determined landing point.

[0147] For example, assume that the landing point of the virtual bullet fired by the virtual shooting prop without jitter is A. When the hand of the virtual character drives the virtual shooting prop to jitter to the right, the virtual bullet fired at this time will land at B, which is a certain distance to the right of A. The distance between A and B is positively correlated with the jitter degree of the virtual shooting prop, that is, the greater the jitter degree of the virtual shooting prop, the farther the position of the landing point B corresponding to the jitter situation deviates from the position of the landing point A corresponding to the non-jitter situation. In this way, by controlling the landing point of the virtual shooting prop shooting to be consistent with the jitter direction, the realism and operability during shooting can be further improved, bringing a more real feeling to the user.

[0148] The shooting control method for the virtual character provided by the embodiments of the present application respectively obtains the jitter data corresponding to each shooting phase for different shooting phases, and in each shooting phase, based on the jitter data corresponding to the shooting phase, controls the holding part of the virtual character to drive the virtual shooting prop to perform corresponding jitter. In this way, during the shooting process, the shooting performances corresponding to different shooting phases are different, rather than using the method of repeatedly playing the same animation resource in the related art, so that the visual performance of the virtual character during shooting can be significantly improved, giving the user a real shooting experience.

[0149] Next, the exemplary application of the embodiments of the present application in an actual application scenario will be described.

[0150] In shooting games, when related technologies implement the action performance of a first-person character shooting, it is usually achieved by having an artist provide an animation resource for shooting (also known as firing). Since there is only one shooting animation resource, during the shooting process, the shooting action performance is single, inconsistent with the recoil jitter of a real person's action when actually shooting a firearm in real life, resulting in an unrealistic shooting performance and also causing problems such as visual fatigue for users.

[0151] Exemplarily, refer to Figure 7 , Figure 7 which is a schematic diagram of the shooting action performance corresponding to a first-person character at different shooting stages provided by related technologies. Among them, Figure 7 from top to bottom are the shooting action performances corresponding to the first-person not shooting, the first-person first shooting, and the first-person second shooting. As can be seen from Figure 7 it, since there is only one shooting animation resource, the action performance of the first shooting is the same as that of the second shooting. That is to say, every time the user controls the virtual character to perform a shooting operation, the same animation resource is repeatedly played. This simple and monotonous shooting action performance method is very likely to cause visual fatigue for users.

[0152] To address the above technical problems, the embodiments of the present application provide a shooting control method for a virtual character, which can provide a configuration system for game users or developers. During the game operation, according to parameter configurations (such as trigonometric functions, attenuation functions, jitter curves, etc.), the hand movement jitter data of the character during shooting can be generated in real time, and the jitter data is added to the position where the hand of the current virtual character is located, causing the hand bones to produce a jitter effect, thereby driving the virtual weapon to jitter together, so as to achieve the performance of simulating the shooting of a real weapon. At the same time, corresponding jitter configurations can be set for different weapons and different shooting modes (such as hip fire and aiming).

[0153] Exemplarily, refer to Figure 8 , Figure 8 which is a schematic diagram of the shooting action performance corresponding to a first-person character at different shooting stages provided by the embodiments of the present application. As shown in Figure 8 it, in the game, there is a virtual character 801 and a virtual weapon 802 held by the virtual character 801 through the hand. Among them, Figure 8From top to bottom are the first-person non-shooting state (at this time, the distance between the virtual weapon 802 and the top of the screen is A, and the distance from the right end of the screen is B), the maximum moment when the first-person's hand pulls back after the first shot (at this time, the distance between the virtual weapon 802 and the top of the screen is C, and the distance from the right end of the screen is D), the maximum moment when the first-person's hand pulls back after the second shot (at this time, the distance between the virtual weapon 802 and the top of the screen is E, and the distance from the right end of the screen is F), and the shooting action performance corresponding to the maximum moment when the first-person's hand pulls back after the third shot (at this time, the distance between the virtual weapon 802 and the top of the screen is G, and the distance from the right end of the screen is H). Among them, the values of A, C, E, and G are different, and the values of B, D, F, and H are also different.

[0154] Exemplarily, refer to Figure 9 , Figure 9 is an overlay diagram of the maximum moments when the first-person's hand pulls back during continuous shooting provided by the embodiments of the present application. As Figure 9 shown, in the game, a virtual character 901 and a virtual weapon 902 held by the virtual character 901 through the hand are displayed. In addition, Figure 9 it also shows the different positions and rotations of the virtual weapon 902 in different shooting stages (for example, the position and rotation 903 of the virtual weapon 902 during the first shot and the position and rotation 904 of the virtual weapon 902 during the second shot). Combining Figure 8 and Figure 9 it can be seen that at the same moment of each shot, the positions and deflections of the virtual character's hand and the virtual weapon are different (the afterimage reduces the transparency of the picture). That is to say, when the character starts shooting, the program will generate offsets in displacement and rotation according to the shooting configuration of the weapon, thereby producing a jitter effect, making the action performance of each shot different.

[0155] Exemplarily, refer to Figure 10 , Figure 10 is a schematic diagram of the shooting action performance corresponding to different shooting stages when the first-person character is in the aiming state provided by the embodiments of the present application. As Figure 10 shown, in the game, a virtual character 1001 and a virtual weapon 1002 held by the virtual character 1001 through the hand are displayed. Among them, Figure 10From top to bottom are the first-person aiming state without shooting (at this time, the distance of the virtual weapon 1002 from the bottom end of the screen is I, and the distance from the right end of the screen is J), the maximum moment when the hand pulls back after the first shot in the first-person aiming state (at this time, the distance of the virtual weapon 1002 from the bottom end of the screen is K, and the distance from the right end of the screen is L), the maximum moment when the hand pulls back after the second shot in the first-person aiming state (at this time, the distance of the virtual weapon 1002 from the bottom end of the screen is M, and the distance from the right end of the screen is N), and the maximum moment when the hand pulls back after the third shot in the first-person aiming state (at this time, the distance of the virtual weapon 1002 from the bottom end of the screen is O, and the distance from the right end of the screen is P). The shooting action performances corresponding to these states are shown, where the values of I, K, M, and O are different, and the values of J, L, N, and P are also different.

[0156] For example, see Figure 11 , Figure 11 is an overlay diagram of the maximum moment when the hand pulls back during continuous shooting when the first-person character in the embodiment of the present application is in the aiming state. As Figure 11 shown, in the game, there is a virtual character 1101 and a virtual weapon 1102 held by the virtual character 1101 through the hand. In addition, Figure 11 it also shows the different positions and rotations of the virtual weapon 1102 in different shooting stages (for example, the position and rotation 1103 of the virtual weapon 1102 when shooting for the first time and the position and rotation 1104 of the virtual weapon 1102 when shooting for the second time). Combining Figure 10 and Figure 11 it can be seen that when the virtual character is in the aiming state, at the same moment of each shot, the positions and deflections of the virtual character's hand and the virtual weapon are different (the afterimage reduces the transparency of the picture). That is to say, when the character starts shooting, the program will generate offsets in displacement and rotation according to the shooting configuration of the weapon, thus producing a jitter effect, making the action performances of each shot different; and, combining Figure 9 and Figure 11 it can be seen that the jitter effects corresponding to different shooting modes (for example Figure 9 the un-aiming state shown and Figure 11 the aiming state shown) are also different.

[0157] Next, a specific description of the shooting control method for the virtual character provided by the embodiment of the present application will be given.

[0158] For example, see Figure 12 , Figure 12 is a schematic flowchart of the shooting control method for the virtual character provided by the embodiment of the present application. As Figure 12As shown, the shooting control method for virtual characters provided by the embodiments of the present application mainly includes five steps: receiving a shooting instruction input by the user, updating the shooting logic, generating hand animation jitter data according to the weapon shooting configuration program, the animation update logic obtaining the jitter data, and applying the jitter data to the animation bone calculation. The following will be described separately.

[0159] (1) Receiving a shooting instruction input by the user

[0160] In some embodiments, when the user (or player) presses the shooting button displayed on the screen, it is equivalent to the user inputting a shooting instruction. When the virtual weapon (corresponding to the above-mentioned virtual shooting prop) receives the instruction to start shooting input by the user, it will shoot in a loop at a certain interval time in a logic similar to a timer.

[0161] (2) Updating the shooting logic

[0162] In some embodiments, when the weapon module updates the shooting logic, it generally also accumulatively updates the current shooting times according to the shooting interval time in a logic similar to a timer. For example, assume that the shooting interval time of the virtual weapon is 0.1 second, and the duration from the current moment to the moment when the instruction to start shooting input by the user is received is 1 second, then the current shooting time is the 10th shooting.

[0163] (3) Generating hand animation jitter data according to the weapon shooting configuration program

[0164] In some embodiments, after determining the current shooting times, the jitter data (such as hand jitter data) corresponding to the current shooting can be obtained from the Figure 13 shown weapon shooting configuration according to the current shooting times.

[0165] The following will describe Figure 13 the meanings of the various parameters included in the shown weapon shooting configuration.

[0166] Animation recoil mode (Weap Anim Recoil Type): Three different types of animation recoil modes are provided, including: Override, also known as the interrupt mode, which does not accumulate the weapon recoil force for each shooting, but processes the animation with the change value of the weapon recoil force for each frame; Additive, also known as the accumulative mode, which accumulates the change of the weapon recoil force for each frame, equivalent to the total rotation change from the start of shooting to the current moment; Wave, where two different curve modes are provided, one is to configure a curve resource, and the other is to fill in the curve type (including Sine or Perlin), period, amplitude, random initial value, decay base, decay frequency, fade-in time, fade-out time, etc.

[0167] Animation Offset Type: Divided into Rotation (Rot) and Location (Loc), depending on whether the current sub - configuration is dealing with rotation or location.

[0168] Axis: Which axis among X, Y, and Z to process.

[0169] Weapon Anim Recoil Curve: A three - in - one curve of X, Y, and Z. The Z - curve is not used, only the X and Y curves are used. Here, X is the lower limit of random values, Y is the upper limit of random values, and the horizontal axis is the number of shots.

[0170] Initial Offset Type: Divided into No Offset (Zero) and Random Offset (Random), only effective for program curves.

[0171] Duration: Can be flexibly set by game users or developers. For example, the duration can be set to 5 seconds.

[0172] Waveform: Includes trigonometric functions (such as Sine) or attenuation functions (such as PerlinNoise).

[0173] Wave Amplitude: Can be filled with positive or negative values.

[0174] Wave Period: For the sine function (Sine), one complete Sine period can be marked with 1 second, that is, 1 second corresponds to 2π, half a period is 0.5 seconds, corresponding to π, which is the 0 - point.

[0175] Power Base Value: The base for the attenuation function.

[0176] Power Frequency: Used for the speed of attenuation.

[0177] Blend In Time: Can be flexibly set by game users or developers. For example, the blend - in time can be set to 0.5 seconds.

[0178] Blend in Progress Curve: A curve set based on the blend - in time, used to represent the blend - in process.

[0179] Blend Out Time: It can be flexibly set by game users or developers. For example, the blend out time can be set to 0.4 seconds.

[0180] Blend Out Progress Curve: A curve set based on the blend out time, used to represent the blend out process.

[0181] Curve FOV Weight at different field of view angles: X is the field of view (FOV), and Y is the scaling ratio (Weight).

[0182] Interp Speed: Used for Additive and Override types.

[0183] Curve Interp: An interpolation curve for curve type changes, which can be used to configure the speed, start, and end of interpolation. Scaled to the firing interval time based on the entire length of the interpolation curve. For example, assume the interval of curve X is 0 - 1 and the firing interval time is 0.1 seconds. Then 0 seconds corresponds to the value of curve X at 0, and 0.1 seconds corresponds to the value of curve X at 1.

[0184] For example, for a virtual weapon, generally about 6 jitter slots can be configured to calculate the displacements of the X, Y, and Z axes and the rotations around the X, Y, and Z axes of the hand bones of the virtual character respectively. According to the configuration parameters in the jitter slots, for example, obtain the offset value from the curve resource (the horizontal axis is the number of shots, and the vertical axis is the offset value), and after obtaining the offset value, perform a smooth interpolation on the offset value according to the interpolation curve based on the time difference between the current moment and this shooting moment. This is the entire calculation process for each slot. After calculating all the slots separately, all the jitter data for this shooting can be obtained (including the displacements of the X, Y, and Z axes and the rotations around the X, Y, and Z axes).

[0185] In addition, it should be noted that since the jitter situations corresponding to different actual firearms in the real world during shooting are different, therefore, the weapon configuration in the embodiments of this application can also be configured separately according to different virtual weapons. In this way, when presenting the shooting performance, for a virtual light machine gun, the corresponding jitter during shooting will be a little smaller; while for a virtual heavy machine gun, the corresponding jitter during shooting will be a little larger, so as to be more in line with the recoil jitter situation of real people when actual firearms shoot in the real world, thereby further improving the visual performance when users control virtual characters to shoot.

[0186] (4) Animation update logic to obtain jitter data

[0187] In some embodiments, when the animation module is updated, it also performs animation updates for each frame of the game screen in a logic similar to a timer. When performing the update, the program accesses the jitter data generated in the weapon module and saves the jitter data to the animation module for calculating the bone position and rotation after the animation module is updated.

[0188] (5) Applying jitter data to animation bone calculation

[0189] In some embodiments, after the animation module is updated, it calculates the position and rotation data of the bones of the virtual character. When calculating the hand bones of the virtual character, it can access the hand animation jitter data saved in the animation module and superimpose the jitter data on the position where the current hand bones of the virtual character are located, so as to make the hand bones of the virtual character produce a jitter effect, and then drive the virtual weapon to jitter together.

[0190] In other embodiments, in order to further improve the realism and operability during shooting, when the virtual weapon fires, it is also possible to control the landing point of the virtual bullet fired by the virtual weapon to be consistent with the current jitter direction of the virtual weapon. For example, when the shooting moment arrives, control the virtual weapon to fire, and according to the current jitter direction of the virtual weapon, control the landing point of the virtual bullet fired to be consistent with the jitter direction. For example, when the jitter direction of the virtual weapon is shifted to the left, the landing point of the virtual weapon also shifts to the left accordingly (for example, assuming that when the virtual weapon does not jitter, the landing point of the virtual bullet fired by the virtual weapon is A, and when the hand of the virtual character drives the virtual weapon to jitter to the left, at this time the landing point of the virtual bullet fired by the virtual weapon will be at B, a certain distance to the left of A. Among them, the distance between the landing point A and the landing point B is positively correlated with the jitter degree of the virtual weapon, that is, the greater the jitter degree of the virtual weapon, the greater the distance by which the landing point B deviates from the landing point A), so that the shooting process of the virtual weapon can more conform to the shooting performance of actual firearms in real life, in order to improve the shooting experience of the user.

[0191] The shooting control method for the virtual character provided by the embodiments of the present application, when the game is running, will generate the hand movement jitter data of the character during shooting in real time according to the parameter configuration, and superimpose the generated jitter data on the position where the current hand bones of the virtual character are located, so as to be able to simulate the performance during real weapon shooting. In this way, it can significantly improve the visual performance of the character during shooting, give the user a real shooting experience, and bring the user a better feel and experience.

[0192] Next, the exemplary structure of the shooting control device 465 of the virtual character provided in the embodiment of the present application implemented as a software module will be further described. In some embodiments, as Figure 3 shown, the software module in the shooting control device 465 of the virtual character stored in the memory 460 may include: a display module 4651, an acquisition module 4652, and a control module 4653.

[0193] The display module 4651 is configured to display a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene; the acquisition module 4652 is configured to acquire jitter configuration information corresponding to the current shooting stage of the virtual shooting prop in response to a shooting trigger operation based on the virtual shooting prop; the acquisition module 4652 is further configured to acquire jitter data corresponding to the current shooting stage according to the jitter configuration information; the control module 4653 is configured to, in the current shooting stage, control the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage.

[0194] In some embodiments, the acquisition module 4652 is further configured to acquire the number of shots fired corresponding to the time from the start of shooting to the current moment; the shooting control device 465 of the virtual character further includes a determination module 4654 configured to determine the shooting stage corresponding to the number of shots fired and use it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed number of shots; the determination module 4654 is further configured to determine the time difference between the current moment and the start of shooting, and to determine the shooting stage corresponding to the time difference and use it as the current shooting stage of the virtual shooting prop, where each shooting stage includes a fixed duration.

[0195] In some embodiments, the acquisition module 4652 is further configured to acquire jitter data corresponding to the current shooting stage according to the animation recoil mode.

[0196] In some embodiments, the acquisition module 4652 is further configured to acquire the change value of the recoil force corresponding to the current shooting stage of the virtual shooting prop; the determination module 4654 is further configured to determine the jitter data corresponding to the current shooting stage according to the change value, where the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

[0197] In some embodiments, the acquisition module 4652 is further configured to acquire the change values of the recoil force corresponding to the virtual shooting prop from the start of the shooting stage to the current shooting stage respectively; the determination module 4654 is further configured to perform an accumulation process on the multiple change values and determine the jitter data corresponding to the current shooting stage according to the accumulation result, where the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

[0198] In some embodiments, the determination module 4654 is further configured to determine curve resources according to the correspondence between different shooting phases and offset ranges, and determine jitter data corresponding to the current shooting phase according to the curve resources; or, to determine jitter data corresponding to the current shooting phase according to a program curve, where the program curve includes at least one of the following: a program curve of a trigonometric function type determined according to a period, an amplitude, and an initial value; a program curve of an attenuation function type determined according to a base of attenuation, a frequency of attenuation, a fade-in time, and a fade-out time.

[0199] In some embodiments, the determination module 4654 is further configured to, according to the current shooting phase, determine the offset range corresponding to the current shooting phase in the curve resources; determine the corresponding offset value according to the offset range, and determine the time difference between the current moment and the shooting moment corresponding to the current shooting phase; based on the time difference, determine the value corresponding to the time difference in the interpolation curve corresponding to the shooting interval time of the virtual shooting prop; and use the product of the offset value and the value as the jitter data corresponding to the current shooting phase.

[0200] In some embodiments, the determination module 4654 is further configured to perform the following processing for each reference direction corresponding to the holding part: obtain a first program curve corresponding to the displacement, and use the first function value corresponding to the current moment in the first program curve as the displacement of the reference direction; obtain a second program curve corresponding to the rotation, and use the second function value corresponding to the current moment in the second program curve as the rotation of the reference direction.

[0201] In some embodiments, the determination module 4654 is further configured to perform the following processing for each reference direction of the holding part: add the displacements in different reference directions included in the jitter data determined based on the curve resources to the displacements in different reference directions included in the jitter data determined based on the program curve to obtain a displacement sum; add the rotations in different reference directions included in the jitter data determined based on the curve resources to the rotations in different reference directions included in the jitter data determined based on the program curve to obtain a rotation sum; and update the jitter data corresponding to the current shooting phase based on the displacement sum and the rotation sum.

[0202] In some embodiments, the acquisition module 4652 is further configured to acquire the type of the virtual shooting prop; the determination module 4654 is further configured to determine a first adjustment coefficient corresponding to the type of the virtual shooting prop, and use the product of the first adjustment coefficient and the jitter data corresponding to the current shooting phase as the updated jitter data, where the first adjustment coefficient is positively correlated with the recoil or lethality of the type of the virtual shooting prop.

[0203] In some embodiments, the obtaining module 4652 is further configured to obtain the shooting mode corresponding to the virtual character in the current shooting stage; the determining module 4654 is further configured to determine a second adjustment coefficient corresponding to the shooting mode, and use the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, where the accuracy of the shooting mode is negatively correlated with the second adjustment coefficient.

[0204] In some embodiments, the control module 4653 is further configured to perform the following processing when updating each frame image of the virtual scene in the current shooting stage: superimpose the displacements and rotations in different reference directions included in the jitter data of each frame image on the position components of the holding part corresponding to the reference directions respectively, where the displacements and rotations in different reference directions are used to cause the holding part to drive the virtual shooting prop to perform corresponding jitters.

[0205] In some embodiments, the obtaining module 4652 is further configured to obtain the real-time jitter direction of the virtual shooting prop in the current shooting stage; the determining module 4654 is further configured to determine the impact point that is synchronously offset with the real-time jitter direction; the control module 4653 is further configured to control the virtual bullet fired by the virtual shooting prop to hit the impact point.

[0206] It should be noted that the description of the device in the embodiments of the present application is similar to the implementation of the shooting control method of the virtual character in the above text and has similar beneficial effects, so it will not be elaborated here. For the technical details not described in the virtual character shooting control device provided in the embodiments of the present application, they can be understood according to Figure 4 to Figure 6 or Figure 12 the description of any one of the drawings.

[0207] The embodiments of the present application provide a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the shooting control method of the virtual character in the above embodiments of the present application.

[0208] The embodiments of the present application provide a computer-readable storage medium storing executable instructions, where the executable instructions are stored, and when the executable instructions are executed by a processor, they will cause the processor to execute the method provided in the embodiments of the present application, for example, Figures 4 to 6 or Figure 12 the shooting control method of the virtual character shown.

[0209] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0210] In some embodiments, the executable instructions may be in the form of a program, software, software module, script, or code, and may be written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a stand-alone program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0211] As an example, the executable instructions may or may not correspond to a file in the file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or stored in multiple cooperating files (for example, files that store one or more modules, subroutines, or code portions).

[0212] As an example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one location, or, on multiple computing devices distributed at multiple locations and interconnected by a communication network.

[0213] In summary, the embodiments of the present application respectively obtain the jitter data corresponding to each shooting stage for different shooting stages, and in each shooting stage, based on the jitter data corresponding to the shooting stage, control the holding part of the virtual character to drive the virtual shooting prop to perform corresponding jitter. In this way, the shooting performance of each shooting stage can be different, rather than a simple and single animation, thereby significantly improving the visual performance when the virtual character shoots and giving the user a real shooting experience.

[0214] The above is only the embodiments of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A shooting control method for a virtual character, characterized in that, the method includes: displaying a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene; in response to a shooting trigger operation based on the virtual shooting prop, obtaining jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, obtaining jitter data corresponding to the current shooting stage according to the jitter configuration information, and in the current shooting stage, based on the jitter data corresponding to the current shooting stage, controlling the holding part to drive the virtual shooting prop to perform corresponding jitter; wherein, when the jitter configuration information includes the correspondence between different shooting modes and adjustment coefficients, the obtaining of the jitter data corresponding to the current shooting stage according to the jitter configuration information includes: obtaining the shooting mode corresponding to the virtual character in the current shooting stage; determining a second adjustment coefficient corresponding to the shooting mode, and taking the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, and the accuracy of the shooting mode is negatively correlated with the second adjustment coefficient.

2. The method according to claim 1, characterized in that, before obtaining the jitter configuration information corresponding to the current shooting stage of the virtual shooting prop, the method further includes: obtaining the number of shots corresponding to the time from the start of shooting to the current moment, determining the shooting stage corresponding to the number of shots, and using it as the current shooting stage of the virtual shooting prop, wherein each shooting stage includes a fixed number of shots; or, determining the time difference between the current moment and the start of shooting, determining the shooting stage corresponding to the time difference, and using it as the current shooting stage of the virtual shooting prop, wherein each shooting stage includes a fixed duration.

3. The method according to claim 1, characterized in that, when the jitter configuration information includes a configured animation recoil mode, the obtaining of the jitter data corresponding to the current shooting stage according to the jitter configuration information includes: obtaining the jitter data corresponding to the current shooting stage according to the animation recoil mode; wherein, the animation recoil mode includes at least one of the following: covering mode, superimposing mode, curve mode.

4. The method according to claim 3, characterized in that, when the animation recoil mode includes the covering mode, the obtaining of the jitter data corresponding to the current shooting stage according to the animation recoil mode includes: obtaining the change value of the recoil force corresponding to the virtual shooting prop in the current shooting stage; determining the jitter data corresponding to the current shooting stage according to the change value, wherein the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

5. The method according to claim 3, characterized in that, when the animation recoil mode includes the superimposing mode, the obtaining of the jitter data corresponding to the current shooting stage according to the animation recoil mode includes: Obtain the change value of the recoil corresponding to the virtual shooting prop from the start shooting stage to the current shooting stage respectively; Accumulatively process the multiple change values, and determine the jitter data corresponding to the current shooting stage according to the accumulation result, where the jitter data includes the displacement and rotation of the holding part relative to different reference directions.

6. The method according to claim 3, characterized in that, when the animation recoil mode includes the curve mode, the obtaining the jitter data corresponding to the current shooting stage according to the animation recoil mode includes: determining curve resources according to the corresponding relationship between different shooting stages and offset ranges, and determining the jitter data corresponding to the current shooting stage according to the curve resources; or, determining the jitter data corresponding to the current shooting stage according to a program curve, where the program curve includes at least one of the following: a program curve of a trigonometric function type determined according to a period, an amplitude, and an initial value; a program curve of an attenuation function type determined according to a decay base, a decay frequency, a fade-in time, and a fade-out time.

7. The method according to claim 6, characterized in that, the determining the jitter data corresponding to the current shooting stage according to the curve resources includes: determining the offset range corresponding to the current shooting stage in the curve resources according to the current shooting stage; determining the corresponding offset value according to the offset range, and determining the time difference between the current moment and the shooting moment corresponding to the current shooting stage; based on the time difference, determining the value corresponding to the time difference in the interpolation curve corresponding to the shooting interval time of the virtual shooting prop; using the product of the offset value and the value as the jitter data corresponding to the current shooting stage.

8. The method according to claim 6, characterized in that, the determining the jitter data corresponding to the current shooting stage according to the program curve includes: for each reference direction corresponding to the holding part, perform the following processing: obtaining a first program curve corresponding to the displacement, and using the first function value corresponding to the current moment in the first program curve as the displacement of the reference direction; obtaining a second program curve corresponding to the rotation, and using the second function value corresponding to the current moment in the second program curve as the rotation of the reference direction.

9. The method according to claim 1, characterized in that, when the jitter configuration information includes the corresponding relationship between different types of virtual shooting props and adjustment coefficients, the obtaining the jitter data corresponding to the current shooting stage according to the jitter configuration information includes: obtaining the type of the virtual shooting prop; determining a first adjustment coefficient corresponding to the type of virtual shooting prop, and using the product of the first adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, where the first adjustment coefficient is positively correlated with the recoil or lethality of the type of virtual shooting prop.

10. The method according to claim 1, characterized in that, The jitter data includes the displacement and rotation of the holding part relative to different reference directions; Controlling the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage includes: When updating and displaying each frame of the virtual scene in the current shooting stage, perform the following processing: Superimpose the displacements and rotations in different reference directions included in the jitter data of each frame of the image on the position components of the holding part corresponding to the reference directions respectively, where the displacements and rotations in different reference directions are used to make the holding part drive the virtual shooting prop to perform corresponding jitter.

11. The method according to claim 1, wherein, the method further includes: Obtain the real-time jitter direction of the virtual shooting prop in the current shooting stage, and determine the impact point that is synchronously offset with the real-time jitter direction; Control the virtual bullet fired by the virtual shooting prop to hit the impact point.

12. A shooting control device for a virtual character, wherein, the device includes: A display module for displaying a virtual character and a virtual shooting prop held by the virtual character through a holding part in a virtual scene; An acquisition module for obtaining jitter configuration information corresponding to the current shooting stage of the virtual shooting prop in response to a shooting trigger operation based on the virtual shooting prop; The acquisition module is further configured to obtain jitter data corresponding to the current shooting stage according to the jitter configuration information; A control module for controlling the holding part to drive the virtual shooting prop to perform corresponding jitter based on the jitter data corresponding to the current shooting stage in the current shooting stage; The acquisition module is further configured to obtain the shooting mode corresponding to the virtual character in the current shooting stage; A determination module for determining a second adjustment coefficient corresponding to the shooting mode, and using the product of the second adjustment coefficient and the jitter data corresponding to the current shooting stage as the updated jitter data, wherein the accuracy of the shooting mode is negatively correlated with the second adjustment coefficient.

13. An electronic device, wherein, the electronic device includes: A memory for storing executable instructions; A processor for implementing the shooting control method of the virtual character according to any one of claims 1-11 when executing the executable instructions stored in the memory.

14. A computer-readable storage medium, wherein, stores executable instructions for implementing the shooting control method of the virtual character according to any one of claims 1-11 when being executed by a processor.

15. A computer program product, including a computer program or instruction, wherein, when the computer program or instruction is executed by a processor, it implements the shooting control method of the virtual character according to any one of claims 1-11.

Citation Information

Patent Citations

  • Shooting control method and device, equipment and storage medium

    CN112121424A