Method and apparatus for shooting in virtual scene, device, medium and program product

By directly responding to shooting instructions within the virtual vehicle, the virtual object is controlled to shoot outside the virtual vehicle, which solves the problem of cumbersome shooting operations in the prior art and improves execution efficiency and human-computer interaction efficiency.

WO2025123856A1PCT designated stage expired Publication Date: 2025-06-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/121051
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-09-25
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

In the prior art, the shooting operation in virtual scenes is too cumbersome, resulting in low execution efficiency and human-computer interaction efficiency.

Method used

A shooting method in a virtual scene is provided. By directly responding to the shooting command within the virtual vehicle, the virtual object is controlled to shoot outside the virtual vehicle, and the entire virtual object is located inside the virtual vehicle.

Benefits of technology

The shooting operation process in virtual scenes is simplified, the execution efficiency of shooting operations and human-computer interaction efficiency are improved, and the utilization rate of hardware processing resources is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024121051_19062025_PF_FP_ABST
    Figure CN2024121051_19062025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a method and apparatus for shooting in a virtual scene, an electronic device, a computer-readable storage medium and a computer program product. The method comprises: in a virtual scene, displaying a virtual vehicle and a virtual object located in the virtual vehicle; and, in response to a shooting instruction, controlling the virtual object to shoot outside the virtual vehicle, wherein, during the process of the virtual object shooting outside the virtual vehicle, the virtual object is wholly located in the virtual vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Shooting method, device, equipment, medium and program product in virtual scene

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] The embodiments of this application are based on the Chinese patent application with application number 202311724892.5 and application date December 14, 2023, and claim the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into the embodiments of this application as a reference. Technical Field

[0003] The present application relates to the field of Internet technology, and in particular to a shooting method, device, electronic device, computer-readable storage medium, and computer program product in a virtual scene. Background Art

[0004] In games of related technologies, when a player controls a virtual object to ride a virtual vehicle, if the player wants to shoot outside the virtual vehicle, the player needs to first control the virtual object to lean out of the virtual vehicle based on controls, and then control the virtual object that pops out of the virtual vehicle to shoot outside the virtual vehicle. However, this shooting method is too cumbersome, resulting in low execution efficiency of shooting operations in virtual scenes and low human-computer interaction efficiency.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a shooting method, device, electronic device, computer-readable storage medium and computer program product in a virtual scene, which can improve the execution efficiency of shooting operations in the virtual scene, the low efficiency of human-computer interaction and the utilization rate of hardware processing resources.

[0007] The technical solution of the embodiment of the present application is implemented as follows:

[0008] The present invention provides a method for shooting in a virtual scene, including:

[0009] In a virtual scene, displaying a virtual vehicle and virtual objects located in the virtual vehicle;

[0010] In response to a shooting instruction, controlling the virtual object to shoot at the exterior of the virtual vehicle;

[0011] Wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entire virtual object is located inside the virtual vehicle.

[0012] An embodiment of the present application provides a shooting device in a virtual scene, comprising:

[0013] a display module configured to display a virtual vehicle and virtual objects located in the virtual vehicle in the virtual scene;

[0014] The control module is configured to control the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction; wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entire virtual object is located inside the virtual vehicle.

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

[0016] a memory configured to store computer-executable instructions or a computer program;

[0017] The processor is configured to implement the shooting method in the virtual scene provided by the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.

[0018] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions are executed by a processor, the shooting method in the virtual scene provided by the embodiment of the present application is implemented.

[0019] The present invention provides a computer program product comprising computer-executable instructions or a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions or the computer program from the computer-readable storage medium and executes the computer-executable instructions or the computer program, causing the electronic device to perform the shooting method in a virtual scene provided in the present invention.

[0020] The embodiments of the present application have the following beneficial effects:

[0021] When a virtual object is inside a virtual vehicle, it can directly respond to a shooting command and control the virtual object to shoot outside the virtual vehicle. Meanwhile, during this shooting process, the virtual object remains entirely inside the virtual vehicle. This reduces the need to control the virtual object to lean out, simplifies the shooting process within the virtual scene, and improves the efficiency of shooting operations within the scene, while also enhancing human-computer interaction and hardware resource utilization within the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of the architecture of a shooting system 100 in a virtual scene provided by an embodiment of the present application;

[0023] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0024] FIG3 is a flow chart of a shooting method in a virtual scene provided by an embodiment of the present application;

[0025] FIG4 is a schematic diagram of a virtual vehicle, a virtual object located in the virtual vehicle, and a shooting control according to an embodiment of the present application;

[0026] FIG5 is a schematic diagram of a shooting prop in different states provided by an embodiment of the present application;

[0027] FIG6 is a schematic diagram of a shooting prop provided in an embodiment of the present application;

[0028] FIG7 is a flowchart illustrating a process of controlling the virtual object to shoot at the exterior of the virtual vehicle according to an embodiment of the present application;

[0029] FIG8 is a schematic diagram of a process for obtaining a first shooting animation according to an embodiment of the present application;

[0030] FIG9 is a schematic diagram of a first posture animation and a second posture animation provided in an embodiment of the present application;

[0031] FIG10 is a flow chart of a process for obtaining a state switching animation according to an embodiment of the present application;

[0032] FIG11 is a schematic diagram of state switching of a shooting prop provided in an embodiment of the present application;

[0033] FIG12 is a technical architecture diagram of a general operation performed by a player according to an embodiment of the present application;

[0034] FIG13 is a schematic diagram of the update process of TakeupTime provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting the embodiments of the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0036] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0037] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

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

[0039] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0040] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed can be real-time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.

[0041] 2) Client, also known as user end, refers to the program corresponding to the server that provides local services to users. Except for some applications that can only run locally, it is generally installed on the terminal and needs to cooperate with the server to run. That is, there must be corresponding servers and service programs in the network to provide corresponding services. In this way, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application, such as the virtual scene client (such as the game client).

[0042] 3) Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0043] 4) Virtual scene: This is the virtual scene displayed (or provided) when the application is running on the terminal. This virtual scene can be a simulation of the real world, a virtual environment that is partially simulated and partially fictional, or a purely fictional virtual environment. The virtual scene can be any of two-dimensional, two-and-a-half-dimensional, or three-dimensional.

[0044] For example, a virtual scene may include the sky, land, ocean, etc., where the land may include environmental elements such as deserts and cities. Users may control virtual objects to perform activities in the virtual scene, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. The virtual scene may be displayed from a first-person perspective (e.g., the user plays the role of a virtual object in the game from their own perspective); from a third-person perspective (e.g., the user chases the virtual object in the game); or from a bird's-eye view perspective. The aforementioned perspectives may be switched arbitrarily.

[0045] 5) Virtual objects: These are images of various people and objects that can interact in a virtual scene, or movable objects within the virtual scene. These movable objects can be virtual people, virtual animals, cartoon characters, etc., for example, people, animals, plants, oil drums, walls, rocks, vehicles, etc. displayed within the virtual scene. A virtual object can be a virtual avatar that represents the user within the virtual scene. A virtual scene can include multiple virtual objects, each with its own unique shape and volume, occupying a portion of the space within the virtual scene.

[0046] For example, the virtual object can be a user character controlled by operations on the client, an artificial intelligence set up through training to fight in a virtual scene, or a non-player character (NPC) set up for interaction in the virtual scene. The number of virtual objects participating in the interaction in the virtual scene can be pre-set or dynamically determined based on the number of clients participating in the interaction.

[0047] 6) Third-person perspective: the in-game camera is positioned a certain distance behind the player character, and the player can see the character and all combat elements in the surrounding environment.

[0048] 7) First-person perspective: The in-game camera is at the player character's eye position, and the player can see the character's body parts and all combat elements in the surrounding environment.

[0049] 8) The folded and raised state is used to address the problem of penetration between the shooting prop and obstacles. When the shooting prop is blocked by an obstacle, it enters the folded and raised state, which means that the shooting prop will first retract a distance. If the retraction distance is too far, the shooting prop will rotate, that is, turn the shooting prop sideways.

[0050] 9) The stowed state is used to address the problem of interplay between the shooting prop and the vehicle's internal structure when the prop is mounted on the vehicle. When the prop intersects too much with the vehicle's internal structure, simply using the folded and raised state alone is insufficient. In this case, under certain conditions, the character will enter a different action, holding the prop and lowering it, which is the stowed state. While in the stowed state, common operations related to the prop, such as reloading and shooting, are not possible.

[0051] 10) A virtual camera is a "camera" set up in computer animation software or a virtual engine. The role of a virtual camera in expressing viewpoints during animation is equivalent to that of a traditional camera. The subjects of a virtual camera and a physical camera are completely different, but their functions are extremely similar. A physical camera shoots real people or actually built scenes, while a virtual camera shoots models built in 3D software, which can achieve infinite possibilities. The virtual camera is presented in the form of an icon in the virtual engine and also has parameters such as lens, focal length, focus, aperture, and depth of field. It can achieve camera actions such as "push, pull, shake, move, follow, swing, rise, fall, and comprehensive movement", and can achieve shooting effects that are difficult or even impossible to achieve with a physical camera, such as: passing through walls, through keyholes, through objects, etc. The parameters that need to be adjusted for a physical camera are distributed on the body of the physical camera and require manual operation. The camera parameters of the virtual camera are buttons or numerical input bars integrated on the panel. The operator only needs to input the parameters or drag the mouse. Sometimes a few key frames can determine the motion path of the virtual camera. In actual shooting, physical cameras often require a stabilizer or motion control system. Even so, the shaking of the picture still exists.

[0052] 11) Frame time, the time taken by one frame.

[0053] 12) Pose: The position, rotation, and scale of the character's skeleton. Together, these pieces of information define the state of a virtual object in three-dimensional space.

[0054] 13) Animation resources: art resources used for animation performance in the game.

[0055] 14) Animation overlay, which can add the difference between two animations to a new animation.

[0056] 15) Animation blending: You can blend two animations into a new animation through weights. The Transform of the new animation bone is the weighted sum of the two bones.

[0057] 16) BasePose: The initial pose in the entire animation pipeline is generally called the base pose, which can be subsequently superimposed in various ways.

[0058] 17) Superimposed animation resources. When animations are superimposed, the animation resource obtained by subtracting the difference between the two animations is the superimposed animation resource.

[0059] Refer to Figure 1, which is a schematic diagram of the architecture of a shooting system 100 in a virtual scene provided in an embodiment of the present application, including a terminal (terminal 400 is shown as an example), and the terminal 400 is connected to the server 200 via a network 300, wherein the network 300 can be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using wireless or wired links.

[0060] The server 200 is configured to send scene data corresponding to a virtual scene including a virtual vehicle and virtual objects in the virtual vehicle to the terminal 400;

[0061] Terminal 400 is used to receive scene data corresponding to a virtual scene including a virtual vehicle and a virtual object located in the virtual vehicle; display the virtual scene based on the scene data; display the virtual vehicle and the virtual object located in the virtual vehicle in the virtual scene; and control the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction; wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entire virtual object is located inside the virtual vehicle.

[0062] In some embodiments, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal 400 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, an intelligent voice interaction device, a smart home appliance, a virtual reality device, a vehicle-mounted terminal, an aircraft, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device, an intelligent speaker, and a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0063] Next, an electronic device for implementing the shooting method in the virtual scene provided by an embodiment of the present application is described. Referring to Figure 2, Figure 2 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. The electronic device can be a server or a terminal. Taking the electronic device as the terminal shown in Figure 1 as an example, the electronic device shown in Figure 2 includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understandable that the bus system 440 is configured to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the various buses are all labeled as bus system 440 in Figure 2.

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

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

[0066] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0067] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0068] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0069] Operating system 451, including system programs configured to handle various basic system services and perform hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., configured to implement various basic services and handle hardware-based tasks;

[0070] A network communication module 452 is configured to reach other electronic devices via one or more (wired or wireless) network interfaces 420 , exemplary network interfaces 420 including Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB);

[0071] a presentation module 453 configured to enable display of information via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430 (e.g., a user interface configured to operate peripheral devices and display content and information);

[0072] The input processing module 454 is configured to detect user input or interaction from one or more input devices 432 and to translate the detected input or interaction.

[0073] In some embodiments, the device provided by the embodiments of the present application can be implemented using software. FIG2 shows a shooting device 455 stored in a virtual scene in memory 450. The shooting device 455 can be software in the form of a program or plug-in, and includes the following software modules: a display module 4551 and a control module 4552. These modules are logical and can be arbitrarily combined or further separated according to the functions implemented. The functions of each module will be described below.

[0074] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the shooting device in the virtual scene provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the shooting method in the virtual scene provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt 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.

[0075] In some embodiments, the terminal or server can implement the shooting method in the virtual scene provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a local (Native) application (Application, APP), that is, a local client, that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP, a web browser APP; it can also be a small program, that is, a program that can be run only by downloading it into a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of client, module or plug-in.

[0076] Based on the above description of the shooting system and electronic device in the virtual scene provided by the embodiment of the present application, the following describes the shooting method in the virtual scene provided by the embodiment of the present application. In actual implementation, the shooting method in the virtual scene provided by the embodiment of the present application can be implemented independently by the terminal or server, or by the terminal and server in collaboration. The shooting method in the virtual scene provided by the embodiment of the present application is described as an example of terminal 400 in Figure 1 executing the shooting method in the virtual scene provided by the embodiment of the present application independently. Referring to Figure 3, Figure 3 is a schematic flow chart of the shooting method in the virtual scene provided by the embodiment of the present application. Next, the steps shown in Figure 3 will be described.

[0077] In step 101 , a terminal displays a virtual vehicle and virtual objects in the virtual vehicle in a virtual scene.

[0078] In actual implementation, a terminal is installed with an application that supports virtual scenes. This application can be any of a first-person shooter game, a third-person shooter game, a multiplayer online tactical competitive game, a virtual reality application, a 3D map program, or a multiplayer shooter survival game. Users can use the terminal to manipulate virtual objects in the virtual scene.

[0079] When a user opens an application on a terminal and the terminal runs the application, the terminal presents a picture of a virtual scene (such as a driving game scene). Here, the picture of the virtual scene is observed from a first-person perspective, or from a third-person perspective. The picture of the virtual scene includes virtual objects. The virtual objects can be player characters controlled by the current player or player characters controlled by other players (teammates) in the same group as the current player. Virtual vehicles can assist the player characters in moving in the virtual scene. Common virtual vehicles include virtual cars, virtual ships, virtual airplanes, etc. This embodiment of the application does not limit this.

[0080] It should be noted that the virtual object located in the virtual vehicle can also perform projection operations inside the virtual vehicle, including throwing operations and shooting operations, such as performing shooting operations through the displayed shooting controls. For example, in a virtual scene, a virtual vehicle, a virtual object located in the virtual vehicle, and a shooting control are displayed. For example, refer to Figure 4, which is a schematic diagram of the virtual vehicle, the virtual object located in the virtual vehicle, and the shooting control provided in an embodiment of the present application. Based on Figure 4, the picture a in Figure 4 is obtained by observing the virtual scene from the first-person perspective of the virtual object, and the dotted box 401 indicates the shooting control. The picture b in Figure 4 is obtained by observing the virtual scene from the third-person perspective of the virtual object, the dotted box 402 indicates the shooting control, and 403 indicates the virtual object.

[0081] In actual implementation, the virtual object is equipped with shooting props. When the virtual object is in the virtual vehicle, the shooting props are in a folded state or a raised state, wherein the folded state indicates that the shooting props are in a standby state or an unused state, such as the state in which the virtual object carries the shooting props, or the state in which the virtual object places the shooting props on the legs or in a virtual backpack, or the state in which the virtual object places the shooting props on the seat of the virtual vehicle, etc. The raised state includes a folded raised state and a normal raised state, indicating that the shooting props are in a state waiting to be used, such as an aiming state. The distance between the shooting props in the folded raised state and the virtual object is smaller than the distance between the shooting props in the normal raised state and the virtual object; in this way, the folded state is used to avoid the problem of penetration of the shooting props with the obstacles in front when the shooting props are raised.

[0082] At the same time, the folded and raised state includes a backward folded state and a rotated folded state, wherein the distance between the shooting props in the backward folded and raised state and the virtual object is smaller than the distance between the shooting props in the normal raised state and the virtual object; the distance between the shooting props in the rotated folded and raised state and the virtual object is smaller than the distance between the shooting props in the normal raised state and the virtual object, and is rotated compared to the shooting props in the normal raised state.

[0083] For example, refer to Figure 5, which is a schematic diagram of shooting props in different states provided in an embodiment of the present application. Based on Figure 5, the shooting prop in Figure 5a is in a normally raised state, the shooting prop in Figure 5b is in a backward folded state, and the shooting prop in Figure 5c is in a rotated folded state.

[0084] It should be noted that the operating process of the shooting props in the raised state mentioned in the implementation of this application is used to indicate that the shooting props can perform corresponding shooting operations or aiming operations when they are in the folded and raised state or in the normally raised state. Correspondingly, the operating process of the shooting props in the folded and raised state mentioned in the implementation of this application is used to indicate that the shooting props can perform corresponding shooting operations or aiming operations when they are in the backward folded state or in the rotated folded state.

[0085] In actual implementation, before the virtual object enters the virtual vehicle, the virtual object is equipped with shooting props, which can be in a raised state or a retracted state. When the virtual object enters the virtual vehicle and is located in the co-pilot position of the virtual vehicle, no matter what state the shooting props equipped on the virtual object outside the virtual vehicle are in, after the virtual object enters the virtual vehicle, the shooting props are in a raised state by default; when the virtual object enters the virtual vehicle, if the virtual object is located in the back row of the virtual vehicle, that is, non-driving seat and non-co-pilot seat, no matter what state the shooting props equipped on the virtual object outside the virtual vehicle are in, after the virtual object enters the virtual vehicle, the shooting props are in a retracted state by default.

[0086] In some embodiments, as described above, after a virtual object enters a virtual vehicle, if the virtual object is located in the back row of the virtual vehicle, that is, the non-driving seat and the non-co-pilot seat, the shooting props are in a retracted state by default, that is, the virtual object is equipped with shooting props, and the shooting props are in a retracted state; at this time, the perspective of the virtual object can also be converted, thereby switching the perspective of the virtual object, and in response to the perspective conversion instruction for the virtual object, the virtual object is controlled to convert the perspective; when the orientation of the virtual object after the perspective conversion is not within the target angle range, the virtual object is controlled to switch the state of the shooting props from a retracted state to a raised state; thereby, in the subsequent process of controlling the virtual object to shoot at the outside of the virtual vehicle in response to the shooting instruction, it can be that in response to the shooting instruction, the virtual object is controlled to use the shooting props in the raised state to shoot at the outside of the virtual vehicle.

[0087] It should be noted that the target angle range is pre-set. When a virtual object enters a virtual vehicle, a coordinate system is constructed with the virtual object as the origin and the virtual vehicle's travel direction as the vertical axis. After the virtual object is controlled to perform a perspective conversion in response to a perspective conversion instruction for the virtual object, the angle corresponding to the orientation of the virtual object after the perspective conversion is obtained based on the constructed coordinate system, and a determination is made as to whether the angle is within the target angle range. If the angle is not within the target angle range, the virtual object is controlled to switch the state of the shooting prop from the stowed state to the raised state. If the angle is within the target angle range, the virtual object is controlled to maintain the state of the shooting prop in the stowed state. The angle corresponding to the orientation here is the angle between the orientation and the vertical axis. At the same time, the target angle range can also be pre-set, such as 0 degrees to 45 degrees.

[0088] It should be noted that when the orientation of the virtual object is within the target angle range, it is used to indicate that the virtual object is facing the inside of the virtual vehicle, which means that the virtual object has no intention of shooting at the outside of the virtual vehicle. Therefore, the virtual object is controlled to keep the state of the shooting props in the retracted state; when the orientation of the virtual object is not within the target angle range, it is used to indicate that the virtual object is facing the outside of the virtual vehicle, which means that the virtual object has the intention of shooting at the outside of the virtual vehicle. Therefore, the virtual object is controlled to switch the state of the shooting props from the retracted state to the raised state, so as to facilitate the virtual object to shoot at the outside of the virtual vehicle.

[0089] Applying the above embodiment, when the shooting props are in a retracted state, if the virtual object is performing a perspective conversion, it can be determined whether the virtual object should lift the shooting props based on the perspective conversion angle of the virtual object. If the virtual object is facing the inside of the virtual vehicle, it means that the virtual object has no intention of shooting outside the virtual vehicle, and there is no need to lift the shooting props. If the virtual object is facing the outside of the virtual vehicle, it means that the virtual object has the intention of shooting outside the virtual vehicle, and it is necessary to lift the shooting props. Based on this, it is determined whether the state of the shooting props needs to be switched from a retracted state to a lifted state, thereby facilitating the virtual object to shoot at the outside of the virtual vehicle, thereby improving the execution efficiency of the shooting operation and the efficiency of human-computer interaction.

[0090] In actual implementation, as described above, the raised state includes a folded and raised state, and the distance between the shooting prop in the folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; thus, when the orientation of the virtual object after the perspective conversion is not within the target angle range, the process of controlling the virtual object to switch the state of the shooting prop from the retracted state to the raised state may be, when the orientation of the virtual object after the perspective conversion is not within the target angle range, in response to the presence of an obstacle directly in front of the virtual object, controlling the virtual object to switch the state of the shooting prop from the retracted state to the folded and raised state; thus, in response to a shooting instruction, the process of controlling the virtual object to use the shooting prop in the raised state to shoot at the outside of the virtual vehicle may be, in response to a shooting instruction, controlling the virtual object to use the shooting prop in the folded and raised state to shoot at the outside of the virtual vehicle;

[0091] It should be noted that the obstacle directly in front of the virtual object may be, for example, the glass on both sides of the rear row of the virtual vehicle, and the front of the virtual object refers to the current orientation or time direction of the virtual object. Therefore, when there is an obstacle directly in front of the virtual object, the virtual object is controlled to switch the state of the shooting prop from the retracted state to the folded and raised state, and then shoot; in this way, when an obstacle appears directly in front of the virtual object, the folded state is used to avoid the problem of penetration of the shooting prop with the obstacle in front when the shooting prop is raised, thereby improving the player's immersion and gaming experience.

[0092] Alternatively, when the orientation of the virtual object after the perspective conversion is not within the target angle range, in response to the absence of an obstacle directly in front of the virtual object, the virtual object is controlled to switch the state of the shooting prop from the retracted state to the normally raised state; thus, in response to the shooting instruction, the virtual object is controlled to use the shooting prop in the raised state to shoot at the outside of the virtual vehicle. The process may be, in response to the shooting instruction, the virtual object is controlled to use the shooting prop in the normally raised state to shoot at the outside of the virtual vehicle.

[0093] In actual implementation, the aforementioned description describes the state changes of the shooting props after the virtual object enters the virtual vehicle. For example, if the virtual object equipped with the shooting props enters the virtual vehicle and is located in the back seat of the virtual vehicle, the shooting props will be in the stowed state. If the virtual object equipped with the shooting props enters the virtual vehicle and is located in the co-pilot seat of the virtual vehicle, the shooting props will be in the raised state. Before the virtual object enters the virtual vehicle, the shooting props also have two states: stowed and raised. Therefore, the state of the shooting props will also change before and after the virtual object enters the virtual vehicle. Next, using the two state change scenarios as examples, the process of displaying the virtual vehicle and the virtual object in the virtual vehicle in the virtual scene will be explained.

[0094] In some embodiments, when a shooting prop equipped by a virtual object outside a virtual vehicle is in a raised state and the virtual object is located in the back row of the virtual vehicle after entering the virtual vehicle, the process of displaying the virtual vehicle and the virtual object located in the virtual vehicle in the virtual scene may be: displaying the virtual vehicle and the virtual object located outside the virtual vehicle in the virtual scene; wherein, when the virtual object is outside the virtual vehicle, the shooting prop equipped by the virtual object is in a raised state; in response to a vehicle entry instruction for the virtual object, controlling the virtual object to enter the virtual vehicle, and controlling the virtual object to switch the state of the shooting prop from a raised state to a retracted state.

[0095] It should be noted that since the front row of seats is in front of the back row, when the virtual object enters the virtual vehicle and is located in the back row, the shooting props are in the retracted state by default. Then, based on the perspective conversion process described above, it is determined whether the state of the shooting props has changed, such as maintaining the retracted state or changing from the retracted state to the raised state. This will not be elaborated here.

[0096] In other embodiments, when the shooting props equipped on the virtual object outside the virtual vehicle are in a retracted state and the virtual object is located at the co-pilot position of the virtual vehicle after entering the virtual vehicle, the virtual object is equipped with shooting props, and the process of displaying the virtual vehicle and the virtual object located in the virtual vehicle in the virtual scene may be, in the virtual scene, displaying the virtual vehicle and the virtual object located outside the virtual vehicle; wherein, when the virtual object is located outside the virtual vehicle, the shooting props equipped on the virtual object are in a retracted state; in response to a vehicle entry instruction for the virtual object, controlling the virtual object to enter the virtual vehicle, and controlling the virtual object to switch the state of the shooting props from a retracted state to a raised state.

[0097] For example, referring to Figure 6, Figure 6 is a schematic diagram of the shooting props provided in an embodiment of the present application. Based on Figure 6, when the shooting props equipped on the virtual object outside the virtual vehicle are in a retracted state, and the virtual object enters the virtual vehicle and is located in the co-pilot position of the virtual vehicle, the virtual object is controlled to switch the state of the shooting props from the retracted state to the raised state as shown in Figure 6.

[0098] It should be noted that, as mentioned above, since the front seat is in front of the back seat, when the virtual object enters the virtual vehicle and is located in the back seat, the shooting props are in the retracted state by default, and there is glass in front of the co-pilot position, which can be used to observe the outside of the virtual vehicle and shoot. Therefore, when the virtual object enters the virtual vehicle and is located in the co-pilot position, the shooting props are in the raised state by default.

[0099] In actual applications, by limiting the state change process of the shooting props before and after the virtual object enters the virtual vehicle, the process of the virtual object entering the virtual vehicle is made smoother, which improves the player's immersion and gaming experience, as well as the resource utilization in the virtual scene.

[0100] At the same time, as mentioned above, the raised state includes a folded and raised state, and the distance between the shooting props in the folded and raised state and the virtual object is smaller than the distance between the shooting props in the normal raised state and the virtual object; thus, in response to the vehicle entry instruction for the virtual object, the virtual object is controlled to enter the virtual vehicle, and the virtual object is controlled to switch the state of the shooting props from the folded state to the raised state, the process of controlling the virtual object to switch the state of the shooting props from the folded state to the raised state may be, when there is an obstacle directly in front of the virtual object, the virtual object is controlled to switch the state of the shooting props from the folded state to the folded and raised state; when there is no obstacle directly in front of the virtual object, the virtual object is controlled to switch the state of the shooting props from the folded state to the normal raised state.

[0101] In addition, when the perspective of the virtual object is converted, in response to the perspective conversion instruction for the virtual object, the virtual object is controlled to convert the perspective. If there is no obstacle directly in front of the virtual object, the virtual object is controlled to keep the shooting prop in a normal raised state, such as maintaining the normal raised state (that is, there is no obstacle directly in front of the virtual object before the perspective conversion) or controlling the virtual object to switch the state of the shooting prop from a folded raised state to a normal raised state (that is, there is an obstacle directly in front of the virtual object before the perspective conversion, and the shooting prop was originally in a folded raised state). Alternatively, if there is an obstacle directly in front of the virtual object, the virtual object is controlled to keep the shooting prop in a folded raised state, such as maintaining the folded raised state (that is, there is also an obstacle directly in front of the virtual object before the perspective conversion) or controlling the virtual object to switch the state of the shooting prop from a normal raised state to a folded raised state (that is, there is no obstacle directly in front of the virtual object before the perspective conversion, and the shooting prop was originally in a normal raised state).

[0102] It should be noted that the process of determining the state of the shooting props based on whether the orientation of the virtual object is within the target angle range is for the virtual object located in the back row. Since the shooting props equipped on the virtual object located at the co-pilot position are in a raised state, the shooting props of the virtual object are in a raised state regardless of whether the orientation of the virtual object located at the co-pilot position is within the target angle range. It is only necessary to determine whether the raised state of the shooting props is a normal raised state or a folded raised state based on whether there is an obstacle in front of the virtual object.

[0103] For example, if the virtual vehicle is a car, when the virtual object is located in the co-pilot position, the obstacle in front of the virtual object can be the windshield directly in front of the virtual object before the perspective is converted, or it can be the side glass directly in front of the virtual object after the perspective is converted; when the virtual object is located in the back seat, the obstacle in front of the virtual object can be the seat directly in front of the virtual object before the perspective is converted, or it can be the side glass directly in front of the virtual object after the perspective is converted.

[0104] It should be noted that the obstacles are determined based on the length of the shooting props and the distance between the virtual object and other objects. The obstacle determination process will be explained later and will not be repeated here.

[0105] In actual implementation, as described above, in a virtual scene, after displaying a virtual vehicle and a virtual object in the virtual vehicle, regardless of whether the virtual object is located in the co-pilot position or the back seat, or whether a perspective conversion is performed, when there is an obstacle directly in front of the virtual object, the virtual object is controlled to put the shooting prop in a folded and raised state; wherein, as described above, the distance between the shooting prop in the folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normally raised state and the virtual object; thus, the subsequent process of controlling the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction may be, in response to a shooting instruction, controlling the virtual object to use the shooting prop in the folded and raised state to shoot at the outside of the virtual vehicle.

[0106] It should be noted that when the virtual object is in the back row and there is an obstacle directly in front of the virtual object, the process of controlling the virtual object to put the shooting prop in the folded and raised state is as described above. After the virtual object's perspective is controlled to switch, if the virtual object's orientation is not within the target angle range, the virtual object is controlled to switch the state of the shooting prop from the folded state to the folded and raised state. If the virtual object's orientation is within the target angle range, the virtual object is controlled to keep the shooting prop in the folded state.

[0107] When the virtual object is in the co-pilot position, if there is an obstacle directly in front of the virtual object when the virtual object enters the virtual vehicle, the process of controlling the virtual object to put the shooting props in a folded and raised state is as described above. If the virtual object has not undergone a perspective conversion and there is an obstacle directly in front of the virtual object, the shooting props are in a folded and raised state by default. Or as described above, if there is an obstacle directly in front of the virtual object after the perspective conversion, the folded and raised state is maintained or the virtual object is controlled to switch the state of the shooting props from a normal raised state to a folded and raised state.

[0108] By applying the above embodiment, when there is an obstacle directly in front of the virtual object, the virtual object is controlled to put the shooting prop in a folded and raised state so that shooting can be performed. In this way, when an obstacle appears directly in front of the virtual object, the folded and raised state can avoid the problem of penetration of the shooting prop with the obstacle in front when the shooting prop is raised, and at the same time, it can also enable the player to prepare for shooting, which not only improves the player's immersion and gaming experience, but also improves the execution efficiency of the shooting operation.

[0109] In some embodiments, before subsequently responding to a shooting instruction to control the virtual object to shoot at the outside of the virtual vehicle, the virtual object can also be controlled to aim at the outside of the virtual vehicle in response to an aiming instruction directed to the outside of the virtual vehicle, so that after aiming, the virtual object can be controlled to shoot at the outside of the virtual vehicle in response to the shooting instruction.

[0110] It should be noted that the aiming instruction can be triggered by a perspective conversion operation on a virtual object, that is, the aiming instruction can be regarded as the perspective conversion instruction mentioned above, such as using the perspective conversion process as the aiming process (such as when telescope aiming is not required); it can also be triggered based on the aiming control, such as before or after the perspective conversion process, in response to the triggering operation on the aiming control, an aiming instruction is received (such as when telescope aiming is required).

[0111] In some embodiments, if the shooting prop is in a retracted state, the process of controlling the virtual object to aim at the outside of the virtual vehicle in response to an aiming instruction directed at the outside of the virtual vehicle may be that when the shooting prop equipped by the virtual object is in a retracted state, the virtual object is controlled to gradually switch the state of the shooting prop from the retracted state to the raised state in response to an aiming instruction directed at the outside of the virtual vehicle; in the process of switching the state of the shooting prop from the retracted state to the raised state, the virtual object is controlled to aim at the outside of the virtual vehicle.

[0112] In other embodiments, if the shooting prop is in a raised state, the process of controlling the virtual object to aim at the outside of the virtual vehicle in response to an aiming instruction directed at the outside of the virtual vehicle may be that when the shooting prop equipped by the virtual object is in a raised state, the virtual object is directly controlled to aim at the outside of the virtual vehicle in response to an aiming instruction directed at the outside of the virtual vehicle.

[0113] In some embodiments, the virtual object realizes shooting at the outside of the virtual vehicle based on the shooting prop. Before subsequently responding to the shooting instruction and controlling the virtual object to shoot at the outside of the virtual vehicle, it can also be controlled to configure the key components of the shooting prop in response to the component configuration operation for the shooting prop; wherein the key components of the shooting prop include at least one of the following: a scope, a virtual sub-prop corresponding to the shooting prop, a silencer, and a virtual buttstock.

[0114] It should be noted that the magnification here can be a 2x magnification, a 4x magnification, a 6x magnification or an 8x magnification, etc., and the virtual sub-props can be virtual bullets corresponding to the shooting props, so that the component configuration operation for the shooting props can be a bullet replacement operation for the shooting props, an assembly operation for the magnification, a virtual buttstock and a silencer, etc.

[0115] In actual applications, when the virtual object is inside the virtual vehicle, the components of the shooting props can also be configured. This not only improves the player experience and human-computer interaction efficiency, but also improves the utilization of hardware resources.

[0116] In actual implementation, in response to the configuration operation for the shooting props, the process of controlling the virtual object to configure the components of the shooting props may be that when the shooting props equipped by the virtual object are in a retracted state, in response to the configuration operation for the shooting props, the virtual object is controlled to gradually switch the state of the shooting props from the retracted state to the raised state; in the process of switching the state of the shooting props from the retracted state to the raised state, the virtual object is controlled to configure the components of the shooting props.

[0117] It should be noted that when the virtual object configures the shooting props, the shooting props need to be in a raised state. When a configuration operation is received for the shooting props in the raised state, the virtual object is directly controlled to configure the components of the shooting props; when a configuration operation is received for the shooting props in the retracted state, the virtual object is automatically controlled to gradually switch the state of the shooting props from the retracted state to the raised state; in the process of switching the state of the shooting props from the retracted state to the raised state, the virtual object is controlled to configure the components of the shooting props.

[0118] In this way, compared with the solution in the related art that requires first lifting the shooting props in the retracted state and then configuring the shooting props, the present application controls the virtual object to configure the components of the shooting props during the process of switching the state of the shooting props from the retracted state to the raised state, thereby shortening the time for configuring the components of the shooting props and improving the efficiency of configuring the components of the shooting props. At the same time, it reduces the user's operation of controlling the virtual object to switch the state of the shooting props from the retracted state to the raised state, and also improves the efficiency of human-computer interaction.

[0119] In some embodiments, the virtual object realizes shooting at the outside of the virtual vehicle based on a shooting prop, and the shooting prop includes at least one key component; in addition, the status of each key component of the shooting prop can be detected to obtain a detection result; wherein the status includes a normal state and a state to be configured; when the detection result indicates that a target key component among at least one key component is in a state to be configured, configuration prompt information is displayed, and the configuration prompt information is used to prompt the configuration of the target key component.

[0120] It should be noted that, as mentioned above, the key components of the shooting props include at least one of the following: a scope, a virtual sub-prop corresponding to the shooting prop, a silencer, and a virtual buttstock. For the scope, the normal state is used to indicate that the shooting prop is equipped with a scope, and the to-be-configured state is used to indicate that the shooting prop is not equipped with a scope. For the virtual sub-props, the normal state is used to indicate that the virtual sub-props loaded in the shooting prop have reached the maximum capacity, and the to-be-configured state is used to indicate that the virtual sub-props loaded in the shooting prop have not reached the maximum capacity and can continue to be loaded. For the silencer, the normal state is used to indicate that the shooting prop is equipped with a silencer, and the to-be-configured state is used to indicate that the shooting prop is not equipped with a silencer. For the virtual buttstock, the normal state is used to indicate that the shooting prop is equipped with a virtual buttstock, and the to-be-configured state is used to indicate that the shooting prop is not equipped with a virtual buttstock.

[0121] In actual implementation, the timing for detecting the status of each key component of the shooting prop can be after each shooting operation, or the user can manually trigger the detection process for the status of each key component of the shooting prop. This embodiment of the application does not limit this.

[0122] By applying the above embodiment, the status of each key component of the shooting prop is detected to determine the key components to be configured, and then the key components to be configured are configured. In this way, the player can clearly perceive the status of each key component, which is convenient for the player to determine which key component needs to be configured. This not only reduces the difficulty of the game and improves the playability of the game, but also improves the player's gaming experience, human-computer interaction efficiency, and hardware resource utilization of electronic equipment.

[0123] Step 102 , in response to a shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle; wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entire virtual object is located inside the virtual vehicle.

[0124] It should be noted that, as mentioned above, a shooting control can also be displayed. Therefore, the shooting instruction is triggered by clicking on the shooting control, or the shooting instruction can be triggered by at least one of the keyboard, mouse or joystick, and this is not limited in this embodiment of the present application; and the entire virtual object is located inside the virtual vehicle, which is used to indicate that the entire body of the virtual object is located inside the virtual vehicle; controlling the virtual object to shoot outside the virtual vehicle can be shooting at a second virtual object outside the virtual vehicle, or it can be shooting directly outside the virtual vehicle, and this is not limited in this embodiment of the present application.

[0125] It should be noted that when controlling a virtual object to shoot at the outside of a virtual vehicle is to shoot at a second virtual object outside the virtual vehicle, the second virtual object can be a player character controlled by other players who are in the hostile camp to the player character controlled by the current player, or it can be an AI-controlled object in the virtual scene for players to interact with, or an NPC in the virtual scene, etc.

[0126] In some embodiments, the virtual object is equipped with a shooting prop, the orientation of the virtual object is within the target angle range, and the virtual object can also be controlled to put the shooting prop in a retracted state; thus, in response to a shooting instruction, the process of controlling the virtual object to shoot at the outside of the virtual vehicle can be, in response to the shooting instruction, controlling the virtual object to gradually switch the state of the shooting prop from a retracted state to a raised state; in the process of switching the state of the shooting prop from a retracted state to a raised state, controlling the virtual object to use the shooting prop to shoot at the outside of the virtual vehicle.

[0127] It should be noted that, as mentioned above, the target angle range is pre-set. When the virtual object is located in the virtual vehicle, a coordinate system is constructed with the virtual object as the origin and the driving direction of the virtual vehicle as the vertical axis. Then, based on the constructed coordinate system, the angle corresponding to the orientation of the virtual object is obtained, and it is determined whether the angle is within the target angle range. Therefore, when the orientation of the virtual object is within the target angle range, the shooting props of the virtual object are controlled to be in a retracted state. As mentioned above, the current orientation of the virtual object can be the orientation of the virtual object after the perspective conversion, or the orientation of the virtual object without the perspective conversion. At the same time, before the virtual object is controlled to retract the shooting props, the shooting props of the virtual object can be in a raised state or in a retracted state.

[0128] It should be noted that when the virtual object shoots at the outside of the virtual vehicle, the shooting props need to be in a raised state. When the shooting props are in the raised state and receive a shooting instruction, the virtual object is directly controlled to shoot at the outside of the virtual vehicle; when the shooting props are in the retracted state and receive a shooting instruction, the virtual object is automatically controlled to gradually switch the state of the shooting props from the retracted state to the raised state; in the process of switching the state of the shooting props from the retracted state to the raised state, the virtual object is controlled to shoot at the outside of the virtual vehicle.

[0129] In actual applications, compared with the related art that requires first lifting up the shooting props in the folded state before shooting at the enemy and then leaning out to shoot at the enemy, the present application controls the virtual object to shoot at the outside of the virtual vehicle during the process of switching the state of the shooting props from the folded state to the raised state, which reduces the user's operation of controlling the virtual object to switch the state of the shooting props from the folded state to the raised state and the operation of leaning out, and also improves the efficiency of human-computer interaction.

[0130] In actual implementation, after controlling the virtual object to use the shooting prop to shoot at the outside of the virtual vehicle, it is also possible to control the virtual object to switch the state of the shooting prop from the raised state to the retracted state when the virtual object completes shooting at the outside of the virtual vehicle.

[0131] It should be noted that, in the process of the virtual object completing the shooting of the outside of the virtual vehicle, if the orientation of the virtual object is always within the target angle range, the shooting completion time is displayed, and the shooting completion time is used to indicate the duration of the end moment of the shooting operation at the current moment. When the shooting completion time reaches the target completion time, the virtual object is automatically controlled to switch the state of the shooting prop from the raised state to the retracted state; if the orientation of the virtual object changes and is no longer within the target angle range, the virtual object is controlled to keep the state of the shooting prop in the raised state.

[0132] By applying the above embodiment, if the virtual object completes shooting at the outside of the virtual vehicle, the state of the shooting prop can be automatically switched from the raised state to the retracted state. In this way, the shooting prop is automatically switched to the original retracted state, reducing the need to manually switch the shooting prop from the raised state to the retracted state, which not only improves the efficiency of human-computer interaction, but also improves the player experience.

[0133] In actual implementation, as described above, when a shooting command is received while the shooting gadget is raised, the virtual object is directly controlled to shoot at the exterior of the virtual vehicle. When a shooting command is received while the shooting gadget is retracted, the virtual object is automatically controlled to gradually switch the shooting gadget's state from retracted to raised. During this transition, the virtual object is controlled to shoot at the exterior of the virtual vehicle. Next, the process of controlling the virtual object to shoot at the exterior of the virtual vehicle in response to a shooting command is described based on the two aforementioned scenarios.

[0134] In some embodiments, the virtual object is equipped with a shooting prop, and the shooting prop is in a retracted state; see Figure 7, which is a flow chart of the process of controlling the virtual object to shoot at the outside of the virtual vehicle provided in an embodiment of the present application. Based on Figure 7, step 102 can be implemented through the following steps.

[0135] Step 1021: In response to a shooting instruction, obtain a first shooting animation and a state switching animation.

[0136] Among them, the first shooting animation is used to indicate the process of the virtual object using a shooting prop in a raised state to perform a shooting operation when the virtual object is in a virtual vehicle, and the state switching animation is used to indicate the process of the virtual object switching the state of the shooting prop from a retracted state to a raised state in the virtual vehicle.

[0137] It should be noted that the first shooting animation and the state switching animation have the same animation duration and the same number of image frames, that is, the first shooting animation and the state switching animation have the same frame rate.

[0138] In actual implementation, for the process of obtaining the first shooting animation, refer to Figure 8, which is a schematic diagram of the process of obtaining the first shooting animation provided by an embodiment of the present application. Based on Figure 8, the process of obtaining the first shooting animation provided by an embodiment of the present application can be implemented by the following steps.

[0139] Step 10211a, obtaining a first posture animation of the virtual object, a second shooting animation of the virtual object, and a second posture animation of the virtual object;

[0140] Among them, the first posture animation is used to indicate the posture of the virtual object when it is outside the virtual vehicle and is equipped with a shooting prop in a raised state. The second shooting animation is used to indicate the process of performing a shooting operation using a shooting prop in a raised state when the virtual object is outside the virtual vehicle. The second posture animation is used to indicate the posture of the virtual object when it is inside the virtual vehicle and is equipped with a shooting prop in a raised state. The upper body posture of the virtual object in the first posture animation is the same as that of the virtual object in the second posture animation.

[0141] It should be noted that the first posture animation is used to indicate a basic posture, that is, the posture of the virtual object outside the virtual vehicle when it raises the shooting prop, and the second posture animation is also used to indicate a basic posture, that is, the posture of the virtual object inside the virtual vehicle when it raises the shooting prop. The upper body posture of the virtual object in the first posture animation and the virtual object in the second posture animation are the same, but the lower body posture is different. For example, the lower body of the virtual object in the first posture animation is in a standing state, while the lower body of the virtual object in the second posture animation is in a sitting state. For example, referring to Figure 9, Figure 9 is a schematic diagram of the first posture animation and the second posture animation provided in an embodiment of the present application. Based on Figure 9, 901 indicates the first posture animation, and 902 indicates the second posture animation.

[0142] Step 10212a: superimpose the first posture animation, the second shooting animation, and the second posture animation to obtain the first shooting animation.

[0143] In actual implementation, the process of superimposing the first posture animation, the second shooting animation and the second posture animation to obtain the first shooting animation can be to subtract the posture parameters of the virtual object in the second shooting animation from the posture parameters of the virtual object in the first posture animation to obtain the superimposed animation resource; and then superimpose the superimposed animation resource on the virtual object in the second posture animation to obtain the first shooting animation.

[0144] It should be noted that the first shooting animation includes multiple first shooting image frames, and the second shooting animation includes multiple second shooting image frames, so that the first posture animation, the second shooting animation and the second posture animation are superimposed to obtain the first shooting animation. The process can be performed frame by frame. The first posture animation, the second shooting animation and the second posture animation are superimposed to obtain the first shooting animation. The process can be that for each second shooting image frame included in the second shooting animation, the following processing is performed respectively to obtain multiple first shooting image frames: obtain the value of the posture parameter of the virtual object in the second shooting image frame and the value of the posture parameter of the virtual object in the first posture animation; subtract the posture parameter of the virtual object in the second shooting image frame from the value of the posture parameter of the virtual object in the first posture animation to obtain the posture difference value; obtain the value of the posture parameter of the virtual object in the second posture animation, and sum the posture difference value with the value of the posture parameter of the virtual object in the second posture animation to obtain the first shooting image frame; combine multiple first shooting image frames to obtain the first shooting animation.

[0145] It should be noted that, in the above process, the posture parameters of the virtual object in the second shooting animation are subtracted from the posture parameters of the virtual object in the first posture animation to obtain the superimposed animation resource, that is, for each second shooting image frame included in the second shooting animation, the following processing is performed respectively: the value of the posture parameter of the virtual object in the second shooting image frame and the value of the posture parameter of the virtual object in the first posture animation are obtained; the posture parameters of the virtual object in the second shooting image frame are subtracted from the value of the posture parameters of the virtual object in the first posture animation to obtain the posture difference value; multiple posture difference values ​​are determined as superimposed animation resources; and the superimposed animation resource is superimposed on the virtual object in the second posture animation to obtain the first shooting animation, that is, the value of the posture parameter of the virtual object in the second posture animation is obtained, and the posture difference value is summed with the value of the posture parameter of the virtual object in the second posture animation to obtain the first shooting image frame; multiple first shooting image frames are combined to obtain the first shooting animation.

[0146] It should be noted that the posture parameters in the above process can be used to indicate various parts of the body of the corresponding virtual object, and the values ​​of the posture parameters can be used to indicate the movement amplitude of the corresponding parts.

[0147] By applying the above-mentioned embodiment, combined with the posture of the virtual object when equipping the shooting prop in a raised state when the virtual object is outside the virtual vehicle, the process of using the shooting prop in a raised state to perform a shooting operation when the virtual object is outside the virtual vehicle, and the posture of the virtual object when equipping the shooting prop in a raised state when the virtual object is inside the virtual vehicle, the process of using the shooting prop in a raised state to perform a shooting operation when the virtual object is inside the virtual vehicle is determined. Compared with the solution in the related art that requires additional production of shooting animation resources for the virtual object on the virtual vehicle, a large amount of resources is saved, and resource consumption and performance overhead are reduced.

[0148] In actual implementation, as described above, the raised state includes one of a folded raised state and a normal raised state, and the distance between the shooting props in the folded raised state and the virtual object is smaller than the distance between the shooting props in the normal raised state and the virtual object; and the state switching animation includes a first state switching animation and a second state switching animation, the first state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting props is switched from a folded state to a folded raised state, and the second state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting props is switched from a folded state to a normal raised state; based on this, for the process of obtaining the state switching animation, see Figure 10, Figure 10 is a flow chart of the process of obtaining the state switching animation provided in an embodiment of the present application, based on Figure 10, the process of obtaining the state switching animation provided in an embodiment of the present application can be implemented through the following steps.

[0149] Step 10211b: In response to the shooting instruction, the lifting state of the shooting prop is detected to obtain a detection result, which is used to indicate whether the shooting prop is in contact with other objects when in the lifted state.

[0150] It should be noted that other objects may be the objects closest to the shooting props in the virtual vehicle. When the shooting props are in a normally raised state and come into contact with other objects, the other objects may be regarded as the obstacles mentioned above.

[0151] In actual implementation, the process of detecting the raised state of the shooting prop and obtaining the detection result can be: obtaining the length of the shooting prop, the distance between the virtual object and other objects, and comparing the length of the shooting prop with the distance; if the comparison result indicates that the length of the shooting prop is less than the distance, a detection result is obtained indicating that there is no contact between the shooting prop and other objects when the shooting prop is in the raised state; if the comparison result indicates that the length of the shooting prop is not less than the distance, a detection result is obtained indicating that there is contact between the shooting prop and other objects when the shooting prop is in the raised state.

[0152] It should be noted that whether the shooting prop is in contact with other objects when in the raised state indicates whether the shooting prop is in contact with other objects when in the normal raised state.

[0153] Step 10212b: If the detection result indicates that the shooting prop is in contact with other objects when in the raised state, determine that the raised state of the shooting prop is the folded raised state, and obtain a first shooting animation and a first state switching animation.

[0154] It should be noted that when the detection result indicates that the shooting prop is in a raised state and is in contact with other objects, the raised state of the shooting prop is determined to be a folded raised state. As mentioned above, the shooting prop is retracted toward the direction of the virtual object, thereby avoiding the penetration phenomenon caused by the shooting prop and other objects.

[0155] In actual implementation, as described above, the folded and raised state includes a backward folded state and a rotated folded state. The distance between the shooting prop in the backward folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; the distance between the shooting prop in the rotated folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object, and is rotated compared to the shooting prop in the normal raised state; the first state switching animation includes a third state switching animation and a fourth state switching animation, the third state switching animation is used to indicate the process of switching the state of the shooting prop from the retracted state to the backward folded state when the virtual object is in the virtual vehicle, and the fourth state switching animation is used to indicate the process of switching the state of the shooting prop from the retracted state to the rotated folded state when the virtual object is in the virtual vehicle;

[0156] Therefore, the process of obtaining the first shooting animation and the first state switching animation may be to obtain the contact point between the shooting prop and other objects, and obtain the distance between the contact point and the virtual camera corresponding to the virtual scene; if the distance is not greater than the distance threshold, determine that the folded and raised state of the shooting prop is the backward folded state, and obtain the first shooting animation and the third state switching animation; if the distance is greater than the distance threshold, determine that the folded and raised state of the shooting prop is the rotated folded state, and obtain the first shooting animation and the fourth state switching animation.

[0157] It should be noted that the contact point between the shooting prop and other objects is used to indicate the contact point and penetration position of the shooting prop with other objects when the virtual object is not controlled to put the shooting prop in a folded and raised state; if the distance does not exceed the distance threshold, it is only necessary to move the shooting prop backward by the first target distance, that is, to determine that the folded and raised state of the shooting prop is a backward folded state, and obtain the third state switching animation, so as to control the virtual object to put the shooting prop in a backward folded state; if the distance exceeds the distance threshold, it is necessary to rotate the shooting prop according to a preset angle, and at the same time move the shooting prop backward by the second target distance, to determine that the folded and raised state of the shooting prop is a rotated folded state, and obtain the fourth state switching animation, so as to control the virtual object to put the shooting prop in a rotated folded state, that is, to avoid penetration by rotation, wherein the second target distance is smaller than the first target distance.

[0158] Step 10213b: If the detection result indicates that the shooting prop is not in contact with other objects when in the raised state, determine that the raised state of the shooting prop is a normal raised state, and obtain the first shooting animation and the second state switching animation.

[0159] By applying the above embodiment, based on the length of the shooting prop and the distance between the virtual object and other objects, it is determined whether the shooting prop should be in a normal raised state or a folded raised state. Furthermore, if the shooting prop is in the folded raised state, it is determined whether it is in a backward folded state or a rotated folded state, thereby determining which state switching animation to obtain. In this way, by comparing the length of the shooting prop and the distance between the virtual object and other objects, the determination process of the shooting prop is quantified, thereby improving the accuracy of the determined state of the shooting prop and the smoothness of the resulting target shooting animation.

[0160] Step 1022: Merge the first shooting animation and the state switching animation to obtain a target shooting animation.

[0161] The target shooting animation is used to indicate, when the virtual object is in the virtual vehicle, an animation process of using the shooting prop to shoot at the outside of the virtual vehicle while switching the state of the shooting prop from the retracted state to the raised state.

[0162] In actual implementation, the first shooting animation includes multiple first shooting image frames, and the state switching animation includes multiple state switching image frames. The number of first shooting image frames included in the first shooting animation is the same as the number of state switching image frames included in the state switching animation; thus, the process of fusing the first shooting animation and the state switching animation to obtain the target shooting animation can be to perform the following processing on each first shooting image frame included in the first shooting animation to obtain multiple fused image frames: obtain the timestamp of the first shooting image frame, and based on the timestamp, obtain the state switching image frame with the same timestamp from the state switching animation; obtain the first weight of the first shooting image frame and the second weight of the state switching image frame, and based on the first weight and the second weight, fuse the first shooting image frame and the state switching image frame to obtain a fused image frame; combine multiple fused image frames to obtain the target shooting animation.

[0163] It should be noted that, starting from the initial timestamp, the first shot image frames are processed frame by frame according to the order of the timestamps. The sum of the first weight and the second weight is 1. The first weights corresponding to different first shot image frames can be the same or different, and the second weights corresponding to different state switching image frames can also be the same or different. That is, during the fusion process, the first weight and the second weight are changing.

[0164] For example, in the first shooting image frame corresponding to the initial timestamp, the virtual object is shooting with a shooting prop in a raised state, while in the state switching image frame corresponding to the corresponding timestamp, the virtual object has just picked up the shooting prop in a retracted state. In this case, the corresponding fused image frame mainly displays the content of the state switching image frame. The second weight can be set to 0.9, and the first weight can be 0.1.

[0165] For example, in the first shooting image frame corresponding to the middle timestamp, the virtual object is shooting with the shooting prop in the raised state, while in the state switching image frame corresponding to the corresponding timestamp, the virtual object is in a state between the retracted state and the raised state of the shooting prop. In this case, the corresponding fused image frame needs to display both the content of the state switching image frame and the content of the first shooting image frame. In this case, the second weight can be set to 0.5, and the first weight can be 0.5.

[0166] For the first shooting image frame corresponding to the end timestamp, the virtual object is in a shooting posture using a shooting prop in a raised state, while the virtual object in the state switching image frame corresponding to the corresponding timestamp has just had the shooting prop in a raised state. At this time, the corresponding fused image frame mainly displays the content of the first shooting image frame, and the second weight can be set to 0.1, and the first weight can be 0.9.

[0167] In this way, the first weight and the second weight make the fusion effect of the image frames smoother and meet the needs of actual scenes.

[0168] In actual implementation, after the first shooting image frame corresponding to the last timestamp is acquired and the corresponding fused image frame is determined, multiple fused image frames are combined to obtain the target shooting animation.

[0169] Step 1023: Play the target shooting animation to display the process of the virtual object shooting at the exterior of the virtual vehicle.

[0170] In other embodiments, the virtual object is equipped with a shooting prop, and the shooting prop is in a raised state, so that in response to a shooting instruction, the virtual object is controlled to shoot at the outside of the virtual vehicle. It can be that in response to the shooting instruction, a first shooting animation is obtained, and the first shooting animation is played to display the process of the virtual object shooting at the outside of the virtual vehicle; wherein, the process of obtaining the first shooting animation is as described above, and this embodiment of the present application will not be elaborated on.

[0171] In this way, based on the shooting animation process of the virtual object outside the virtual vehicle, the shooting animation process of the virtual object inside the virtual vehicle is determined. Compared with the solution in the related art that requires additional production of shooting animation resources for the virtual object on the virtual vehicle, a large amount of resources is saved, and resource consumption and performance overhead are reduced.

[0172] In some embodiments, as described above, the process of controlling the virtual object to aim at the outside of the virtual vehicle and the process of configuring the components of the shooting props may also be in the process of switching the state of the shooting props from the retracted state to the raised state. Therefore, in response to the aiming instruction for the outside of the virtual vehicle, the process of controlling the virtual object to aim at the outside of the virtual vehicle may also be, in response to the aiming instruction for the outside of the virtual vehicle, obtaining a first aiming animation and a state switching animation; wherein the first aiming animation is used to indicate that when the virtual object is in the virtual vehicle, the shooting props in the raised state are used to aim at the outside of the virtual vehicle. The process of executing an aiming operation, wherein the state switching animation is used to indicate the process of the virtual object switching the state of the shooting prop from the retracted state to the raised state within the virtual vehicle; the first aiming animation and the state switching animation are merged to obtain a target aiming animation; wherein the target aiming animation is used to indicate the process of the virtual object, while in the virtual vehicle, performing an aiming operation at the exterior of the virtual vehicle using the shooting prop in the raised state while switching the state of the shooting prop from the retracted state to the raised state; and the target aiming animation is played to show the process of the virtual object aiming at the exterior of the virtual vehicle using the shooting prop in the raised state;

[0173] Correspondingly, in response to the component configuration operation on the shooting prop, the process of controlling the virtual object to configure the key components of the shooting prop can also be, in response to the component configuration operation on the shooting prop, obtaining a first configuration animation and a state switching animation; wherein, the first configuration animation is used to indicate that when the virtual object is in the virtual vehicle, the configuration operation is performed on the shooting prop in the raised state, and the state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting prop is switched from a retracted state to a raised state; the first configuration animation and the state switching animation are merged to obtain a target configuration animation; wherein, the target configuration animation is used to indicate that when the virtual object is in the virtual vehicle, the configuration operation is performed on the shooting prop in the raised state during the process of switching the state of the shooting prop from a retracted state to a raised state; the target configuration animation is played to display the process of configuring the shooting prop in the raised state.

[0174] It should be noted that the process of obtaining the first aiming animation and the state switching animation, as well as the process of obtaining the first configuration animation and the state switching animation, are similar to the process of obtaining the first shooting animation and the state switching animation described above. The process of fusing the first aiming animation and the state switching animation to obtain the target aiming animation, as well as the process of fusing the first configuration animation and the state switching animation to obtain the target configuration animation, are also similar to the process of fusing the first shooting animation and the state switching animation to obtain the target shooting animation described above. This will not be elaborated in the embodiments of the present application.

[0175] In some embodiments, the virtual vehicle includes at least one transparent component, and at least one transparent component includes a target transparent component, and the target transparent component can block the projection operation directed at the virtual object from the outside of the virtual vehicle; therefore, before controlling the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction, it is also possible to control the virtual object to aim at the outside of the virtual vehicle with the target transparent component as an observation window in response to an aiming instruction directed at the outside of the virtual vehicle; thus, the process of controlling the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction may be that when the virtual object has completed aiming, the virtual object is controlled to shoot at the outside of the virtual vehicle in response to the shooting instruction.

[0176] It should be noted that projection operations include throwing operations and shooting operations, and transparent components on the virtual vehicle can be glass on the virtual vehicle. For example, when the virtual vehicle is a virtual car, the transparent components can be vehicle windows, front and rear windshields, or roof sunroofs. When the virtual vehicle is a virtual airplane, the transparent components can be aircraft windows. Target transparent components serve as cover for virtual objects, indicating that the transparent components hinder attack operations directed at the virtual object, such as directly blocking the attack operation directed at the virtual object or reducing the damage caused by the attack operation directed at the virtual object. The target transparent components can be pre-set.

[0177] It should be noted that when the virtual object performs the aiming operation, the shooting props can be in a normal raised state or in a folded raised state, and the embodiments of the present application do not limit this; and the aiming operation can be triggered by an aiming control, that is, the aiming operation can be a trigger operation for the aiming control, or the aiming operation can be triggered by at least one of the keyboard, mouse or joystick, and the embodiments of the present application do not limit this.

[0178] By applying the above embodiment, the projection operation of the virtual object outside the virtual vehicle is blocked by the target transparent component, which not only increases the diversity of the interaction mode in the virtual scene, thereby increasing the efficiency of human-computer interaction, but also increases the utilization rate of display resources.

[0179] In actual implementation, the transparent components can also be hidden, and hidden controls for each of the transparent components are displayed, and the hidden controls are used to cancel the display of the corresponding transparent controls that are currently displayed; thus, when the virtual object has completed aiming, in response to a shooting instruction, the process of controlling the virtual object to shoot at the outside of the virtual vehicle may be that when the virtual object has completed aiming, in response to a triggering operation of a target hidden control in at least one hidden control, the corresponding target transparent component is canceled; in response to the shooting instruction, the virtual object is controlled to use the area where the target transparent component that has been canceled is located as an observation window to shoot at the outside of the virtual vehicle.

[0180] It should be noted that each transparent component has a corresponding hidden control. When a trigger operation is received for a target hidden control in at least one hidden control, the corresponding target transparent component is canceled. The process of canceling the display of the corresponding target transparent component can be to gradually lower the target transparent component like lowering a car window, or to directly hide the target transparent component. The embodiment of the present application does not limit this. As a result, there is no object in the area where the target transparent component is located, and in response to a shooting instruction, the virtual object is controlled to use the area where the target transparent component is canceled as an observation window to shoot at the outside of the virtual vehicle.

[0181] In actual implementation, after canceling the display of the corresponding target transparent component, the corresponding target transparent component can also be redisplayed. In some embodiments, the target transparent component is displayed again in response to a triggering operation on the target hidden control. Here, the target hidden control has two functions. When the target transparent component is displayed, the target hidden control is used to cancel the display of the corresponding target transparent component. When the target transparent component is canceled, the target hidden control is used to display the corresponding target transparent component that has been canceled.

[0182] In other embodiments, a target display control is displayed for the target transparent component, and the target display control is used to display the target transparent component that is canceled from display; in response to a trigger operation on the target display control, the target transparent component is displayed; here, in addition to a corresponding hidden control, each transparent component also has a corresponding display control, and the hidden control is used to cancel the display of the corresponding transparent component that is currently displayed, and the display control is used to display the corresponding transparent component that is currently canceled from display.

[0183] It should be noted that, in addition to canceling the display of the target transparent component by hiding the control, the target transparent component can also be canceled by controlling the virtual object to smash the target transparent component.

[0184] It should be noted that some specific scenarios may prevent the virtual object from using the shooting prop in the folded and raised state to aim with a scope, or because the shooting prop is too long, the virtual object cannot use the shooting prop in the folded and raised state to aim. Therefore, in these scenarios, the player can trigger the hidden control corresponding to the target transparent component to cancel the display of the corresponding target transparent component, or control the virtual object to perform a shooting operation on the target transparent component, causing the target transparent component to completely shatter and no longer display. Then, when the target transparent component is no longer displayed, control the virtual object to switch the state of the shooting prop from the folded and raised state to the normal raised state, and control the virtual object to aim at the exterior of the virtual vehicle based on the shooting prop in the normal raised state, or control the virtual object to use the shooting prop in the normal raised state and use the scope to aim at the exterior of the virtual vehicle. In this way, the player's behavior is no longer restricted. Although the protection capability of the target transparent component is lost, the virtual object can be controlled to aim freely, improving the accuracy of the shooting operation, creating a gameplay option with both risk and reward.

[0185] In this way, by canceling the display of the target transparent component, the player can perform the aiming and shooting operations. After the player completes the aiming and shooting operations, the target transparent component is displayed again, allowing the player to regain the protection ability of the target transparent component. On the basis of reducing the risk of the player being hit, the diversity of interaction methods in the interaction process is increased.

[0186] By applying the above-described embodiments of the present application, when a virtual object is located in a virtual vehicle, it can directly respond to a shooting command and control the virtual object to shoot outside the virtual vehicle. At the same time, during the virtual object's shooting process, the entire virtual object is located inside the virtual vehicle. This reduces the number of operations required to control the virtual object to lean out, simplifies the operational flow of the shooting process in the virtual scene, and improves not only the execution efficiency of the shooting operation in the shooting scene, but also the efficiency of human-computer interaction and the hardware resource utilization of the electronic device.

[0187] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.

[0188] In games of related technologies, when a player controls a virtual object to ride a virtual vehicle, if he wants to shoot outside the virtual vehicle, he needs to first control the virtual object to lean out of the virtual vehicle based on the controls, and then control the virtual object that pops out of the virtual vehicle to shoot outside the virtual vehicle, or first lift the shooting props and then shoot; however, this leads to problems such as difficulty in reusing resources and the incompatibility between shooting props and vehicle models. Especially for games with complex action systems, supporting the same operation on the vehicle requires the production of multiple animation resources, and the implementation cost is very high, resulting in low shooting efficiency and human-computer interaction efficiency in the virtual scene.

[0189] Based on this, the embodiments of the present application provide a solution that allows shooting and performing common character operations inside a vehicle. By stowing the shooting props and folding and raising the shooting props, the problem of the shooting props and the vehicle body fitting into the model is avoided. When raising the shooting props, programmatic processing allows the reuse of most normal combat animations in the vehicle, eliminating the need for additional output resources, saving artist manpower, package size, and runtime memory. Furthermore, when adding new features later, no additional vehicle processing is required. This eliminates the need to lean out to shoot, allowing the character to perform the same operations as on the ground while sitting inside the vehicle, without the need for duplicate output resources.

[0190] Next, the technical solution of this application is explained from the product side.

[0191] In the technical solution of the present application, the shooting prop can be in a normal state (normal raised state), a retracted state, and a folded state (folded raised state), respectively. Referring to FIG11, FIG11 is a schematic diagram of the state switching of the shooting prop provided in the embodiment of the present application. Based on FIG11, if the shooting prop in the technical solution of the present application is switched from the normal state to the retracted state or the folded state, it can be achieved through steps 1101 to 1105. First, the character (virtual object) controlled by the player is controlled to put the shooting prop in the normal state. Then, when the character's orientation is within a certain angle (target angle range), the character is controlled to switch the state of the shooting prop from the normal state to the retracted state. When the character's orientation is not within the certain angle, it is determined whether there is an obstacle in front of the character. When there is an obstacle in front of the character, the character is controlled to switch the state of the shooting prop from the normal state to the folded state. When there is no obstacle in front of the character, the character is controlled to keep the shooting prop in the normal state. In this way, the action state to be entered is automatically determined based on "character orientation" and "whether there is an obstacle in front", and no player operation intervention is required, which is quite automated in experience. Secondly, this application can automatically switch between the three states freely, and the action performance is also very smooth.

[0192] In actual implementation, when the player needs to perform various operations (using props, changing bullets and other general operations), refer to Figure 12. Figure 12 is a technical architecture diagram of the player performing general operations provided by an embodiment of the present application. Based on Figure 12, when the player needs to perform a general operation, first determine the current state of the shooting prop, and then obtain the animation to be played based on the current state. When the shooting prop is in a normal state, if the character needs to perform a general operation, obtain the animation of the character performing a general action when the shooting prop is in a normal state; when the shooting prop is in a folded state, if the character needs to perform a general operation, obtain the animation of the character performing a general action when the shooting prop is in a folded state; when the shooting prop is in a retracted state, If the character needs to perform a common action, it first determines whether there is an obstacle in front of the character. If so, it retrieves the animation for the common action performed by the character when the shooting prop is in the folded state, as well as the animation for switching the shooting prop from the stowed state to the folded state. The animation for the common action performed by the character during the switching from the stowed state to the folded state is determined. If there is no obstacle in front of the character, it retrieves the animation for the common action performed by the character when the shooting prop is in the normal state, as well as the animation for switching the shooting prop from the stowed state to the normal state. The animation for the common action performed by the character during the switching from the stowed state to the normal state is determined. The retrieved animation is then played. This not only saves a lot of resources by directly reusing existing ground animation assets, but also does not restrict the player's state. The player can use the same operations in the vehicle under any conditions as on the ground, without forcing the player's camera or character position to change.

[0193] It should be noted that the animation of the shooting prop in the folded state does not need to be specially produced, but is obtained by rotating or offsetting the shooting prop held by the character during the animation of the shooting prop in the normal state. That is, the animation of the shooting prop in the folded state is obtained by updating the animation of the shooting prop in the normal state.

[0194] Next, the technical solution of this application is explained from a technical perspective.

[0195] The technical solution of this application realizes the first-person combat mode in the vehicle, without the need to lean forward to shoot, and can reuse common animation resources in the vehicle to perform the same operations, such as reloading and inspecting shooting props, without the need to produce additional art resources. The implementation is mainly divided into three parts:

[0196] 1. Reuse resources on the vehicle for general operations (BasePose reuses the upper body)

[0197] 2. The three states of stowed, normal, and folded on the vehicle and their conversion

[0198] First, let's explain the process of reusing assets on vehicles. First, animations when not in a vehicle are primarily based on two states: unarmed (with the weapon stowed), and equipped (with the weapon raised). These two states each have their own BasePose, representing a fully standing position. For example, actions like spraying and climbing are overlaid with animation assets on the unarmed BasePose, while actions related to weapon reloading, checking weapon items, and shooting are overlaid with animation assets on the equipped BasePose.

[0199] Secondly, because characters on vehicles need to be seated, their BasePose differs from that of characters on the ground. Therefore, reusing overlay animation assets on the ground, such as deploying ammunition and reloading, requires the same BasePose as on the ground, which is obviously impossible. However, animations like deploying ammunition and reloading only utilize the upper body skeleton, while characters on vehicles only need the lower body to align with the vehicle. Therefore, the vehicle's BasePose (second pose animation) is first generated, and the upper body of the non-vehicle BasePose (first pose animation) is copied to the vehicle's BasePose. For example, the BasePose of a character equipped with a shooting prop is shown in Figure 9. As shown in Figure 9, the upper body of the two animations is identical, down to the skeleton level—that is, the upper body and its child skeletons are identical. Here, the characteristic of overlay animation is the subtraction between the two animations. For non-vehicle animation assets like reloading and deploying ammunition, the subtraction from the non-vehicle BasePose actually only differs in the upper body. Therefore, the BasePose of the above vehicle can directly use all the superimposed animations when it is not a vehicle, including taking medicine, changing bullets, inspecting shooting props, etc.

[0200] The design and implementation of the vehicle's three states for the shooting prop: stowed, normally raised, and folded and raised. The resulting effect is: within a given angle range, the player is forced to stow the shooting prop and place it on their legs. Outside of this range, the shooting prop is automatically raised, allowing the player to fire. Outside of these two states, if the shooting prop is detected to be in a collision with a collider, it will be folded.

[0201] In actual implementation, an animation resource is used to realize the actions of folding and raising the shooting prop. First, the artists designed a Takeup animation. Playing forward from front to back is the process of raising the shooting prop; playing backward from back to front is the process of folding the shooting prop. In order to obtain information on whether it is fully raised or fully lowered, and to better connect when performing common operations later, the normal animation playback node is not used here, but the EvaluateSequence node is used. The EvaluateSequence node samples the Pose output of that frame from the corresponding time point of the animation resource based on the input time. Therefore, when the vehicle switches between folding and raising the shooting prop, the same animation is essentially used, but it is sampled from different time points in the animation.

[0202] In actual implementation, two variables are maintained at the top level of the vehicle animation system: bShouldPutDown and TakeupTime. bShouldPutDown indicates whether the prop should be put away. This is determined by whether the current angle is within a set range; if not, it returns False. TakeupTime is the sampling time point input to EvaluateSequence. For putting away and raising the prop, bShouldPutDown is incremented or decremented on a per-frame basis.

[0203] As an example, the process of performing general operations is explained by taking the bullet-changing operation as an example. When putting away the shooting props on the vehicle, if you want to perform operations such as changing bullets, you need to lift the shooting props first and then do it. After that, decide whether to put away the shooting props again based on the current orientation. Therefore, there are two core concerns about the process of performing general operations in this application: First, the operation time for general operations on the vehicle must be consistent with the operation time for general operations when not on a vehicle, that is, the gameplay of the general operation cannot be affected by the actions of lifting and putting away the shooting props; second, the whole process must be coherent and cannot jump. Therefore, the final solution is that when the props involved in the folding are changed, the bullet-changing action when not on a vehicle will be calculated first, and then mixed with the BasePose of the vehicle, and the TakeupTime will be incremented; when the bullet-changing is completed, the TakeupTime will be set to the length of the Takeup animation, that is, the end, and then the normal process of putting away the shooting props will be followed. Here, when changing bullets, since the poses of different general operations are different, they can only be performed in a mixed manner. However, after this is done, the normal animation of putting away the shooting props can be played, and at this time, the state switching process of putting away the shooting props and raising the shooting props is returned to the normal state.

[0204] Refer to Figure 13, which is a schematic diagram of the update process of TakeupTime provided by the embodiment of the present application. Based on Figure 13, the update process of TakeupTime provided by the embodiment of the present application is implemented through steps 1301 to 1304, updating the acquired frame time, and then judging whether a general operation is currently being performed. If a general operation is currently being performed, the next frame time is acquired, and then based on the acquired next frame time, it is judged whether the general operation is completed. When it is completed, the end frame time is acquired, and then the normal process of putting away the shooting props is carried out. If it is not completed, this process is ended. The frame time processing process re-updates the acquired frame time. If the general operation is not being performed, it is determined whether the shooting props should be put away. When the shooting props should be put away, it means that the general operation has been completed, and the previous frame time is obtained, that is, the takeup animation is reversed. When the shooting props should not be put away, the next frame time is obtained, and then based on the next frame time obtained, it is determined whether the general operation is completed. When it is completed, the end frame time is obtained, and then the normal process of putting away the shooting props is carried out. If it is not completed, the processing process of this frame time is ended and the acquired frame time is re-updated.

[0205] It should be noted that the frame time here refers to the duration of each image frame. The next frame time is the current frame time plus the unit frame time. Correspondingly, the previous frame time is the current frame time minus the unit frame time. Furthermore, after obtaining the frame time, the image frame corresponding to that frame time can be determined in the animation, and then processed. This is based on the image frame, achieving the process of controlling the character's general operation from the state of the shooting prop from stowed to raised.

[0206] It should be noted that the folding state of the shooting prop is a function that exists when it is not a vehicle. Its purpose is to prevent the shooting prop from penetrating the collision body. The system of folding the shooting prop is also connected to the vehicle to ensure that there will be no penetration during the complex folding and lifting of the shooting prop and general operations. Folding the shooting prop can be understood as a kind of post-processing. After the calculations for folding and lifting the shooting prop and general operations are completed, the calculation of whether to put the shooting prop in a folded state is based on the position and orientation of the shooting prop at this time. It is equivalent to making an additional offset or rotation after the animation calculation. Specifically, a ray is shot from the root point of the shooting prop, that is, the position of the character, in the direction of the shooting prop. The length of the ray is the length of the collision body of the shooting prop. If there is a contact point, it means that the shooting prop needs to be folded and lifted. According to the distance from the contact point to the virtual camera, if the distance does not exceed a certain range, the shooting prop only needs to be displaced backward by the corresponding distance (backward folded state); if the distance exceeds a certain range, the shooting prop needs to be rotated according to a pre-set value, and at this time only a small set backward displacement is required (rotated folded state), that is, rotation is mainly used to avoid penetration.

[0207] In this way, this solution can realize first-person shooting and other general operations in vehicles on mobile platforms, improve the smoothness of the state transition process of shooting props, and basically reuse resources when not in a vehicle. Compared with the related technology that requires additional animation resources for the vehicle, this application saves a lot of resources and has lower performance overhead.

[0208] By applying the above-described embodiments of the present application, when a virtual object is located in a virtual vehicle, it can directly respond to a shooting command and control the virtual object to shoot outside the virtual vehicle. At the same time, during the virtual object's shooting process, the entire virtual object is located inside the virtual vehicle. This reduces the number of operations required to control the virtual object to lean out, simplifies the operational flow of the shooting process in the virtual scene, and improves not only the execution efficiency of the shooting operation in the shooting scene, but also the efficiency of human-computer interaction and the hardware resource utilization of the electronic device.

[0209] The following further describes an exemplary structure of a shooting device 455 in a virtual scene provided by an embodiment of the present application implemented as a software module. In some embodiments, as shown in FIG2 , the software modules in the shooting device 455 in the virtual scene stored in the memory 450 may include:

[0210] a display module 4551 configured to display a virtual vehicle and virtual objects located in the virtual vehicle in a virtual scene;

[0211] The control module 4552 is configured to control the virtual object to shoot at the outside of the virtual vehicle in response to a shooting instruction; wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entire virtual object is located inside the virtual vehicle.

[0212] In some embodiments, the device also includes a second control module, which is configured to control the virtual object to put the shooting prop in a folded and raised state when there is an obstacle directly in front of the virtual object; wherein the distance between the shooting prop in the folded and raised state and the virtual object is smaller than the distance between the shooting prop in a normally raised state and the virtual object; the control module 4552 is further configured to control the virtual object to use the shooting prop in the folded and raised state to shoot at the outside of the virtual vehicle in response to a shooting instruction.

[0213] In some embodiments, the virtual object is equipped with a shooting prop, and the device further includes a third control module, which is configured to control the virtual object to put the shooting prop in a retracted state when the orientation of the virtual object is within a target angle range; the control module 4552 is further configured to control the virtual object to gradually switch the state of the shooting prop from a retracted state to a raised state in response to a shooting instruction; in the process of switching the state of the shooting prop from the retracted state to the raised state, control the virtual object to use the shooting prop to shoot at the outside of the virtual vehicle.

[0214] In some embodiments, the device further includes a fourth control module, and the fourth control module is configured to control the virtual object to switch the state of the shooting prop from the raised state to the retracted state when the virtual object completes shooting at the outside of the virtual vehicle.

[0215] In some embodiments, the virtual object realizes shooting at the outside of the virtual vehicle based on a shooting prop, and the device also includes a configuration module, which is configured to control the virtual object to configure the key components of the shooting prop in response to a component configuration operation for the shooting prop; wherein the key components of the shooting prop include at least one of the following: a scope, a virtual sub-prop corresponding to the shooting prop, a silencer, and a virtual buttstock.

[0216] In some embodiments, the configuration module is further configured to, when the shooting prop equipped by the virtual object is in a retracted state, in response to a configuration operation on the shooting prop, control the virtual object to gradually switch the state of the shooting prop from the retracted state to the raised state; and in the process of switching the state of the shooting prop from the retracted state to the raised state, control the virtual object to configure the components of the shooting prop.

[0217] In some embodiments, the virtual object realizes shooting at the outside of the virtual vehicle based on a shooting prop, and the shooting prop includes at least one key component; the device also includes a detection module, and the detection module is configured to detect the status of each key component of the shooting prop to obtain a detection result; wherein, the status includes a normal state and a to-be-configured state; when the detection result indicates that the target key component among the at least one key component is in the to-be-configured state, configuration prompt information is displayed, and the configuration prompt information is used to prompt the configuration of the target key component.

[0218] In some embodiments, the virtual object is equipped with a shooting prop, and the shooting prop is in a retracted state; the device also includes a fifth control module, and the fifth control module is configured to control the virtual object to perform a perspective conversion in response to a perspective conversion instruction for the virtual object; when the orientation of the virtual object after the perspective conversion is not within the target angle range, the virtual object is controlled to switch the state of the shooting prop from the retracted state to the raised state; the control module 4552 is also configured to control the virtual object to use the shooting prop in the raised state to shoot at the outside of the virtual vehicle in response to a shooting instruction.

[0219] In some embodiments, the display module 4551 is further configured to display a virtual vehicle and a virtual object located outside the virtual vehicle in the virtual scene; wherein, when the virtual object is located outside the virtual vehicle, the shooting props equipped by the virtual object are in the raised state; in response to a vehicle entry instruction for the virtual object, the virtual object is controlled to enter the virtual vehicle, and the virtual object is controlled to switch the state of the shooting props from a raised state to a retracted state.

[0220] In some embodiments, the raised state includes a folded raised state, and the distance between the shooting prop in the folded raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; the fifth control module is also used to control the virtual object to switch the state of the shooting prop from the retracted state to the folded raised state in response to the presence of an obstacle directly in front of the virtual object when the orientation of the virtual object after the perspective conversion is not within the target angle range; the control module 4552 is also configured to control the virtual object to use the shooting prop in the folded raised state to shoot at the outside of the virtual vehicle in response to a shooting instruction.

[0221] In some embodiments, the virtual object is equipped with a shooting prop, and the shooting prop is in a retracted state; the control module 4552 is further configured to obtain a first shooting animation and a state switching animation in response to a shooting instruction; wherein, the first shooting animation is used to indicate that when the virtual object is in the virtual vehicle, the shooting operation is performed using the shooting prop in a raised state, and the state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting prop is switched from a retracted state to a raised state; the first shooting animation and the state switching animation are fused to obtain a target shooting animation; wherein, the target shooting animation is used to indicate that when the virtual object is in the virtual vehicle, in the process of switching the state of the shooting prop from a retracted state to a raised state, the shooting prop is used to shoot at the outside of the virtual vehicle; the target shooting animation is played to display the process of the virtual object shooting at the outside of the virtual vehicle.

[0222] In some embodiments, the first shooting animation includes multiple first shooting image frames, the state switching animation includes multiple state switching image frames, and the number of first shooting image frames included in the first shooting animation is the same as the number of state switching image frames included in the state switching animation; the control module 4552 is also configured to perform the following processing on each of the first shooting image frames included in the first shooting animation to obtain multiple fused image frames: obtain the timestamp of the first shooting image frame, and based on the timestamp, obtain the state switching image frame with the same timestamp from the state switching animation; obtain the first weight of the first shooting image frame and the second weight of the state switching image frame, and based on the first weight and the second weight, fuse the first shooting image frame and the state switching image frame to obtain a fused image frame; combine multiple fused image frames to obtain the target shooting animation.

[0223] In some embodiments, the control module 4552 is further configured to obtain a first posture animation of the virtual object, a second shooting animation of the virtual object, and a second posture animation of the virtual object; wherein the first posture animation is used to indicate the posture of the virtual object when equipping a shooting prop in a raised state when the virtual object is outside the virtual vehicle, the second shooting animation is used to indicate the process of performing a shooting operation using the shooting prop in a raised state when the virtual object is outside the virtual vehicle, and the second posture animation is used to indicate the posture of the virtual object when equipping a shooting prop in a raised state when the virtual object is inside the virtual vehicle, and the upper body posture of the virtual object in the first posture animation is the same as that of the virtual object in the second posture animation; the first posture animation, the second shooting animation, and the second posture animation are superimposed to obtain the first shooting animation.

[0224] In some embodiments, the first shooting animation includes multiple first shooting image frames, and the second shooting animation includes multiple second shooting image frames; the control module 4552 is also configured to perform the following processing for each second shooting image frame included in the second shooting animation to obtain multiple first shooting image frames: obtain the value of the posture parameter of the virtual object in the second shooting image frame, and the value of the posture parameter of the virtual object in the first posture animation; subtract the posture parameter of the virtual object in the second shooting image frame from the value of the posture parameter of the virtual object in the first posture animation to obtain a posture difference value; obtain the value of the posture parameter of the virtual object in the second posture animation, and sum the posture difference value with the value of the posture parameter of the virtual object in the second posture animation to obtain a first shooting image frame; combine multiple first shooting image frames to obtain the first shooting animation.

[0225] In some embodiments, the raised state includes one of a folded raised state and a normal raised state, and the distance between the shooting prop in the folded raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; the state switching animation includes a first state switching animation and a second state switching animation, The first state switching animation is used to indicate the process of switching the state of the shooting prop from a retracted state to a folded and raised state when the virtual object is in the virtual vehicle, and the second state switching animation is used to indicate the process of switching the shooting prop from a retracted state to a normally raised state when the virtual object is in the virtual vehicle; the control module 4552 is further configured to detect the raised state of the shooting prop in response to a shooting instruction and obtain a detection result, wherein the detection result is used to indicate whether the shooting prop is in contact with other objects when in the raised state; if the detection result indicates that the shooting prop is in contact with other objects when in the raised state, it is determined that the raised state of the shooting prop is a folded and raised state, and the first shooting animation and the first state switching animation are obtained; if the detection result indicates that the shooting prop is not in contact with other objects when in the raised state, it is determined that the raised state of the shooting prop is a normally raised state, and the first shooting animation and the second state switching animation are obtained.

[0226] In some embodiments, the control module 4552 is further configured to obtain the length of the shooting prop, the distance between the virtual object and the other object; compare the length of the shooting prop with the distance; if the comparison result indicates that the length of the shooting prop is less than the distance, obtain a detection result indicating that there is no contact between the shooting prop and the other object when the shooting prop is in the raised state; if the comparison result indicates that the length of the shooting prop is not less than the distance, obtain a detection result indicating that there is contact between the shooting prop and the other object when the shooting prop is in the raised state.

[0227] In some embodiments, the folded and raised state includes a backward folded state and a rotated folded state. The distance between the shooting prop in the backward folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; the distance between the shooting prop in the rotated folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object, and the shooting prop is rotated compared to the normal raised state; the first state switching animation includes a third state switching animation and a fourth state switching animation, and the third state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting prop is switched from the folded state to the fourth state. The fourth state switching animation is used to indicate the process of switching the state of the shooting prop from the retracted state to the rotated folded state when the virtual object is in the virtual vehicle; the control module 4552 is further configured to obtain the contact point between the shooting prop and the other object, and obtain the distance between the contact point and the virtual camera corresponding to the virtual scene; if the distance is not greater than the distance threshold, determine that the folded and raised state of the shooting prop is the backward folded state, and obtain the first shooting animation and the third state switching animation; if the distance is greater than the distance threshold, determine that the folded and raised state of the shooting prop is the rotated folded state, and obtain the first shooting animation and the fourth state switching animation.

[0228] In some embodiments, the virtual vehicle includes at least one transparent component, and the at least one transparent component includes a target transparent component, and the target transparent component can block the projection operation directed at the virtual object from the outside of the virtual vehicle; the device also includes a sixth control module, and the sixth control module is configured to respond to the aiming instruction directed at the outside of the virtual vehicle, and control the virtual object to use the target transparent component as an observation window to aim at the outside of the virtual vehicle; the control module 4552 is also configured to control the virtual object to shoot at the outside of the virtual vehicle in response to the shooting instruction when the virtual object has completed aiming.

[0229] In some embodiments, the device also includes a seventh control module, which is configured to display a hidden control for each of the transparent components, and the hidden control is used to cancel the display of the corresponding transparent control currently displayed; the control module 4552 is also configured to cancel the display of the corresponding target transparent component in response to a trigger operation of a target hidden control in at least one hidden control when the virtual object is aimed; and in response to a shooting instruction, control the virtual object to use the area where the target transparent component that is canceled from display is located as an observation window to shoot at the outside of the virtual vehicle.

[0230] The present invention provides a computer program product comprising computer-executable instructions or a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions or the computer program from the computer-readable storage medium and executes the computer-executable instructions or the computer program, causing the electronic device to perform the shooting method in the virtual scene described in the present invention.

[0231] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the shooting method in the virtual scene provided by the embodiment of the present application, for example, the shooting method in the virtual scene shown in Figure 3.

[0232] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM; or various devices including one or any combination of the above memories.

[0233] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, 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 as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0234] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0235] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0236] In summary, the embodiments of the present application have the following beneficial effects:

[0237] (1) Compared with the solution in the related art in which the virtual object in the virtual vehicle must first lean out and then perform the shooting operation outside the virtual vehicle, the operation of controlling the virtual object to lean out is reduced, and the operation flow of the shooting process in the virtual scene is simplified. This not only improves the execution efficiency of the shooting operation in the shooting scene, but also improves the human-computer interaction efficiency and the hardware resource utilization of the electronic equipment.

[0238] (2) Through the first weight and the second weight, the fusion effect of the image frame is smoother and meets the needs of the actual scene.

[0239] (3) Based on the shooting animation process of the virtual object outside the virtual vehicle, the shooting animation process of the virtual object inside the virtual vehicle is determined. Compared with the solution in the related art that requires additional production of shooting animation resources for the virtual object on the virtual vehicle, a large amount of resources is saved, and resource consumption and performance overhead are reduced.

[0240] It should be noted that in the embodiments of the present application, when it comes to obtaining user operation data and other related data, when the embodiments of the present application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0241] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A shooting method in a virtual scene, the method being performed by an electronic device, the method comprising: In a virtual scene, displaying a virtual vehicle and a virtual object located in the virtual vehicle; In response to a shooting instruction, controlling the virtual object to shoot at the exterior of the virtual vehicle; Wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entirety of the virtual object is located inside the virtual vehicle.

2. The method of claim 1, wherein: The virtual object is equipped with a shooting prop, and in the virtual scene, a virtual vehicle is displayed behind the virtual object in the virtual vehicle, and the method further comprises: When there is an obstacle in front of the virtual object, controlling the virtual object to put the shooting prop into a folded and raised state; Wherein, the distance between the shooting prop in the folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normally raised state and the virtual object; In response to the shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle includes: In response to a shooting instruction, the virtual object is controlled to use the shooting prop in the folded and raised state to shoot at the exterior of the virtual vehicle.

3. The method according to claim 1 or 2, wherein: The virtual object is equipped with a shooting prop. After displaying the virtual vehicle and the virtual object in the virtual vehicle in the virtual scene, the method further includes: When the orientation of the virtual object is within the target angle range, controlling the virtual object to put the shooting prop in a retracted state; In response to the shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle includes: In response to a shooting instruction, controlling the virtual object to gradually switch the state of the shooting prop from a retracted state to a raised state; In the process of switching the state of the shooting prop from the retracted state to the raised state, the virtual object is controlled to use the shooting prop to shoot at the outside of the virtual vehicle.

4. The method of claim 3, wherein: After controlling the virtual object to use the shooting prop to shoot at the exterior of the virtual vehicle, the method further includes: When the virtual object completes shooting at the outside of the virtual vehicle, the virtual object is controlled to switch the state of the shooting prop from the raised state to the retracted state.

5. The method according to any one of claims 1 to 4, wherein: The virtual object realizes shooting at the exterior of the virtual vehicle based on the shooting props. Before the virtual object is controlled to shoot at the exterior of the virtual vehicle in response to the shooting instruction, the method further includes: In response to a component configuration operation for the shooting prop, controlling the virtual object to configure key components of the shooting prop; Among them, the key components of the shooting props include at least one of the following: a zoom lens, a virtual sub-prop corresponding to the shooting props, a silencer, and a virtual buttstock.

6. The method of claim 5, wherein: In response to the configuration operation on the shooting prop, controlling the virtual object to configure the components of the shooting prop includes: When the shooting prop equipped by the virtual object is in a retracted state, in response to a configuration operation on the shooting prop, controlling the virtual object to gradually switch the state of the shooting prop from the retracted state to the raised state; In the process of switching the state of the shooting prop from the stowed state to the raised state, the virtual object is controlled to configure the components of the shooting prop.

7. The method according to any one of claims 1 to 6, wherein: The virtual object realizes shooting at the outside of the virtual vehicle based on a shooting prop, and the shooting prop includes at least one key component; The method further comprises: The status of each key component of the shooting prop is detected to obtain a detection result; wherein the status includes Normal state and waiting for configuration state; When the detection result indicates that a target key component among the at least one key component is in a state to be configured, configuration prompt information is displayed, where the configuration prompt information is used to prompt the target key component to be configured.

8. The method according to any one of claims 1 to 7, wherein: The virtual object is equipped with a shooting prop, and the shooting prop is in a retracted state; Before controlling the virtual object to shoot at the outside of the virtual vehicle in response to the shooting instruction, the method further includes: In response to a perspective conversion instruction for the virtual object, controlling the virtual object to convert the perspective; When the orientation of the virtual object after the perspective conversion is not within the target angle range, controlling the virtual object to switch the state of the shooting prop from the retracted state to the raised state; In response to the shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle includes: In response to a shooting instruction, the virtual object is controlled to use the shooting prop in the raised state to shoot at the exterior of the virtual vehicle.

9. The method of claim 8, wherein: Displaying a virtual vehicle and a virtual object in the virtual vehicle in a virtual scene includes: In the virtual scene, displaying a virtual vehicle and virtual objects outside the virtual vehicle; Wherein, when the virtual object is outside the virtual vehicle, the shooting prop equipped by the virtual object is in the raised state; In response to a vehicle entry instruction for the virtual object, the virtual object is controlled to enter the virtual vehicle, and the virtual object is controlled to switch the state of the shooting prop from a raised state to a retracted state.

10. The method of claim 8, wherein: The raised state includes a folded raised state and a normal raised state, and the distance between the shooting prop in the folded raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; When the orientation of the virtual object after the perspective conversion is not within the target angle range, controlling the virtual object to switch the state of the shooting prop from the retracted state to the raised state includes: When the orientation of the virtual object after the perspective conversion is not within the target angle range, in response to the presence of an obstacle directly in front of the virtual object, the virtual object is controlled to switch the state of the shooting prop from the retracted state to the folded and raised state; In response to the shooting instruction triggered by the shooting control, controlling the virtual object to use the shooting prop in the raised state to shoot at the outside of the virtual vehicle includes: In response to a shooting instruction triggered based on a shooting control, the virtual object is controlled to use the shooting prop in the folded and raised state to shoot at the exterior of the virtual vehicle.

11. The method according to any one of claims 1 to 10, wherein: The virtual object is equipped with a shooting prop, and the shooting prop is in a retracted state; In response to the shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle includes: In response to a shooting instruction, obtaining a first shooting animation and a state switching animation; The first shooting animation is used to indicate the process of performing a shooting operation using the shooting prop in a raised state when the virtual object is in the virtual vehicle, and the state switching animation is used to indicate the process of the virtual object switching the state of the shooting prop from a retracted state to a raised state in the virtual vehicle; The first shooting animation and the state switching animation are merged to obtain a target shooting animation; The target shooting animation is used to indicate, when the virtual object is in the virtual vehicle, an animation process of using the shooting prop to shoot at the outside of the virtual vehicle in the process of switching the state of the shooting prop from the retracted state to the raised state; The target shooting animation is played to display the process of the virtual object shooting at the exterior of the virtual vehicle.

12. The method of claim 11, wherein: The first shooting animation includes a plurality of first shooting image frames, the state switching animation includes a plurality of state switching image frames, and the number of the first shooting image frames included in the first shooting animation is the same as the number of the state switching image frames included in the state switching animation; The step of fusing the first shooting animation and the state switching animation to obtain a target shooting animation includes: For each of the first shooting image frames included in the first shooting animation, the following processing is performed respectively to obtain a plurality of fused image frames: obtaining a timestamp of the first shooting image frame, and based on the timestamp, obtaining the state switching image frame with the same timestamp from the state switching animation; obtaining a first weight of the first shooting image frame and a second weight of the state switching image frame, and based on the first weight and the second weight, fusing the first shooting image frame and the state switching image frame to obtain a fused image frame; The target shooting animation is obtained by combining a plurality of fused image frames.

13. The method of claim 11, wherein: The obtaining of the first shooting animation comprises: Acquire a first posture animation of the virtual object, a second shooting animation of the virtual object, and a second posture animation of the virtual object; The first posture animation is used to indicate the posture of the virtual object when the shooting prop in a raised state is equipped when the virtual object is outside the virtual vehicle, the second shooting animation is used to indicate the process of performing a shooting operation using the shooting prop in a raised state when the virtual object is outside the virtual vehicle, the second posture animation is used to indicate the posture of the virtual object when the shooting prop in a raised state is equipped when the virtual object is inside the virtual vehicle, and the upper body posture of the virtual object in the first posture animation and the upper body posture of the virtual object in the second posture animation are the same; The first posture animation, the second shooting animation and the second posture animation are superimposed to obtain the first shooting animation.

14. The method of claim 13, wherein: The first shooting animation includes a plurality of first shooting image frames, and the second shooting animation includes a plurality of second shooting image frames; The step of superimposing the first posture animation, the second shooting animation and the second posture animation to obtain the first shooting animation includes: For each of the second shooting image frames included in the second shooting animation, the following processing is performed respectively to obtain a plurality of first shooting image frames: obtaining a value of a posture parameter of the virtual object in the second shooting image frame and a value of a posture parameter of the virtual object in the first posture animation; subtracting a value of a posture parameter of the virtual object in the second shooting image frame from a value of a posture parameter of the virtual object in the first posture animation to obtain a posture difference value; obtaining a value of a posture parameter of the virtual object in the second posture animation, and summing the posture difference value with the value of the posture parameter of the virtual object in the second posture animation to obtain a first shooting image frame; The first shooting animation is obtained by combining a plurality of first shooting image frames.

15. The method of claim 11, wherein: The raised state includes one of a folded raised state and a normal raised state, and the distance between the shooting prop in the folded raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; The state switching animation includes a first state switching animation and a second state switching animation, wherein the first state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting prop is switched from a retracted state to a folded and raised state, and the second state switching animation is used to indicate that when the virtual object is in the virtual vehicle, the state of the shooting prop is switched from a retracted state to a normally raised state; The step of obtaining a first shooting animation and a state switching animation in response to a shooting instruction includes: In response to a shooting instruction, detecting the lifting state of the shooting prop to obtain a detection result, wherein the detection result is used to indicate whether the shooting prop is in contact with other objects when in the lifting state; If the detection result indicates that the shooting prop is in contact with other objects when in the raised state, determining that the raised state of the shooting prop is a folded raised state, and acquiring the first shooting animation and the first state switching animation; If the detection result indicates that the shooting prop is not in contact with other objects when in the raised state, the raised state of the shooting prop is determined to be a normal raised state, and the first shooting animation and the second state switching animation are obtained.

16. The method of claim 15, wherein: The detecting of the lifting state of the shooting prop to obtain the detection result includes: Obtaining the length of the shooting prop and the distance between the virtual object and the other object; comparing the length of the shooting prop with the distance; If the comparison result indicates that the length of the shooting prop is less than the distance, a detection result indicating that the shooting prop is not in contact with the other object when in the raised state is obtained; If the comparison result indicates that the length of the shooting prop is not less than the distance, a detection result indicating that the shooting prop is in contact with the other object when in the raised state is obtained.

17. The method of claim 15, wherein: The folded and raised state includes a backward folded state and a rotational folded state, and the distance between the shooting prop in the backward folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normal raised state and the virtual object; The distance between the shooting prop in the rotated, folded and raised state and the virtual object is smaller than the distance between the shooting prop in the normally raised state and the virtual object, and the shooting prop is rotated compared to the normally raised state; The first state switching animation includes a third state switching animation and a fourth state switching animation, wherein the third state switching animation is used to indicate a process of switching the state of the shooting prop from a retracted state to a backward folded state when the virtual object is in the virtual vehicle, and the fourth state switching animation is used to indicate a process of switching the state of the shooting prop from a retracted state to a rotated folded state when the virtual object is in the virtual vehicle; The obtaining the first shooting animation and the first state switching animation includes: Acquire the contact point between the shooting prop and the other object, and acquire the distance between the contact point and the virtual camera corresponding to the virtual scene; If the distance is not greater than the distance threshold, determining that the folded and raised state of the shooting prop is the backward folded state, and acquiring the first shooting animation and the third state switching animation; If the distance is greater than a distance threshold, the folded and raised state of the shooting prop is determined to be the rotated and folded state, and the first shooting animation and the fourth state switching animation are obtained.

18. The method according to any one of claims 1 to 17, wherein: The virtual vehicle includes at least one transparent component, the at least one transparent component includes a target transparent component, and the target transparent component can block a projection operation on the virtual object from outside the virtual vehicle; the method further includes: In response to an aiming instruction for the exterior of the virtual vehicle, controlling the virtual object to aim at the exterior of the virtual vehicle using the target transparent component as an observation window; In response to the shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle includes: When the virtual object has completed aiming, in response to a shooting instruction, the virtual object is controlled to shoot at the outside of the virtual vehicle.

19. The method of claim 18, wherein: The method further comprises: Displaying a hidden control for each of the transparent components, wherein the hidden control is used to cancel the display of the corresponding transparent control currently displayed; When the virtual object has completed aiming, in response to a shooting instruction, controlling the virtual object to shoot at the outside of the virtual vehicle comprises: When the virtual object is aimed, in response to a triggering operation on a target hidden control in at least one hidden control, canceling display of the corresponding target transparent component; In response to a shooting instruction, the virtual object is controlled to use the area where the target transparent component is located as an observation window to shoot at the outside of the virtual vehicle.

20. A shooting device in a virtual scene, the device comprising: A display module configured to display a virtual vehicle and a virtual object located in the virtual vehicle in the virtual scene; The control module is configured to control the virtual object to shoot at the outside of the virtual vehicle in response to the shooting instruction; wherein, during the process of the virtual object shooting at the outside of the virtual vehicle, the entirety of the virtual object is located at The interior of the virtual vehicle.

21. An electronic device, comprising: a memory configured to store computer executable instructions or a computer program; The processor is configured to implement the shooting method in the virtual scene described in any one of claims 1 to 19 when executing the computer executable instructions or computer programs stored in the memory.

22. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein when the computer-executable instructions or the computer program are executed by a processor, the shooting method in the virtual scene according to any one of claims 1 to 19 is implemented.

23. A computer program product, comprising computer executable instructions or a computer program, which, when executed by a processor, implements the shooting method in a virtual scene according to any one of claims 1 to 19.

Citation Information

Patent Citations

  • Method and device for controlling virtual characters in game

    CN110201391A

  • Virtual object control method in virtual scene, computer equipment and storage medium

    CN110597389A

  • Control method and device of a virtual flight vehicle, terminal and storage medium

    CN113117333A

  • Game control method and device, electronic equipment and storage medium

    CN113827967A

  • Game device, game system, control method of game device and program

    JP2013158456A