Virtual character switching method and apparatus, device, storage medium and program product
By introducing a transition process of intermediate perspectives in virtual games, the problem of stiff virtual character switching process is solved, and the fluency and human-computer interaction efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/116910
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-17
- Filing Date
- 2024-09-04
- Publication Date
- 2025-05-22
AI Technical Summary
In existing virtual games, the virtual character switching process is relatively stiff, lacks coherence, and has low human-computer interaction efficiency.
By presenting the intermediate perspective display process during the role switching operation, the transition process is added to make the perspective switching smoother.
It improves the smoothness of virtual role switching and human-computer interaction efficiency, reduces the hardware pressure on the screen response of the monitor and device graphics card, and ensures the visual consistency of the viewing angle switching process.
Smart Images

Figure CN2024116910_22052025_PF_FP_ABST
Abstract
Description
Virtual character switching method, device, equipment, storage medium and program product
[0001] This application claims priority to Chinese patent application number 202311548128.7, filed on November 17, 2023, entitled “Virtual character switching method, device, equipment, storage medium and program product”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of virtual scene technology, and in particular to a virtual character switching method, device, equipment, storage medium and program product. Background Art
[0003] In some virtual games, when there are multiple virtual characters that can provide perspective images in the virtual game, the user can select a target virtual character through a switching operation, thereby displaying the perspective image corresponding to the target virtual character.
[0004] In related art, character switching is typically achieved through simple keystrokes. When a user presses a designated key, the game character is instantly switched, and the viewing angle simultaneously switches to the target character. This character switching is achieved by detecting the user's keystrokes. When the game program detects the user pressing a designated key, it immediately invokes the character switching function, switching the current game character to another.
[0005] However, this process is usually completed in an instant, and the perspective switching process accompanying the character switching is rather abrupt and lacks coherence.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a method, apparatus, device, storage medium, and program product for switching virtual characters, which can improve the smoothness of switching virtual characters and enhance the efficiency of human-computer interaction. The technical solution is as follows.
[0008] In one aspect, a method for switching a virtual character is provided, which is executed by a computer device, and the method includes:
[0009] Displaying a first-perspective image, wherein the first-perspective image is an image of a virtual scene observed from a first perspective of a first virtual character, the first virtual character being a master virtual character;
[0010] In response to receiving a role switching operation, presenting a role switching process from the first virtual character to the second virtual character, wherein the role switching operation is used to switch the controlling virtual character from the first virtual character to the second virtual character, and the role switching process includes a display process of an intermediate perspective, wherein the display process of the intermediate perspective is a process corresponding to a transition from the first perspective to the second perspective;
[0011] In response to the character switching process being completed, a second perspective picture is displayed, where the second perspective picture is a picture of observing the virtual scene through the second perspective of the second virtual character.
[0012] In another aspect, a virtual character switching device is provided, the device comprising:
[0013] A display module, configured to display a first perspective image, wherein the first perspective image corresponds to a first perspective of a first virtual character, and the first virtual character is a master virtual character;
[0014] a switching module configured to present a role switching process from the first virtual character to the second virtual character in response to receiving a role switching operation, wherein the role switching operation is configured to switch the controlling virtual character from the first virtual character to the second virtual character, and wherein the role switching process includes a display process of an intermediate perspective, wherein the display process of the intermediate perspective is a process corresponding to a transition from the first perspective to the second perspective;
[0015] The display module is further configured to display a second perspective image in response to completion of the character switching process, where the second perspective image is an image of the virtual scene observed through the second perspective of the second virtual character.
[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the virtual character switching method as described in any of the above-mentioned embodiments of the present application.
[0017] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual character switching method as described in any of the above-mentioned embodiments of the present application.
[0018] In another aspect, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual character switching method described in any of the above embodiments.
[0019] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0020] During the process of switching a virtual character controlled by a client, a character switching operation triggers the client to present the character switching process to the user. The character switching process transitions between the first perspective image before the perspective switch and the second perspective image after the perspective switch. The character switching process includes an intermediate perspective display process to display an intermediate perspective transitioning from the first perspective of the currently controlled virtual character to the second perspective of the virtual character after the perspective switch. The intermediate perspective is a transitional perspective between the first and second perspectives. That is, the intermediate perspective image is used to enhance the transition process from the first perspective image to the second perspective image. This eliminates the need for the device's display to directly switch from the first perspective image to the second perspective image within a short period of time when displaying the perspective switch process. The display's pixel units no longer need to respond to rapid color changes between different perspective images within a short period of time, thereby reducing the hardware pressure on the display and the device's graphics card in terms of image response. Furthermore, the intermediate perspective image makes the perspective switching process associated with the character switch smoother, ensuring visual continuity during the perspective switching process. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0022] FIG2 is a flow chart of a virtual character switching method provided by an exemplary embodiment of the present application;
[0023] FIG3 is a schematic diagram of a role switching animation provided by an exemplary embodiment of the present application;
[0024] FIG4 is a flow chart of a method for displaying character switching animations provided by an exemplary embodiment of the present application;
[0025] FIG5 is a flow chart of a method for displaying a role switching control provided by an exemplary embodiment of the present application;
[0026] FIG6 is a flow chart of a method for displaying character switching animations provided by an exemplary embodiment of the present application;
[0027] FIG7 is a flow chart of a method for determining a second virtual character provided by an exemplary embodiment of the present application;
[0028] FIG8 is a schematic diagram of a method for determining a second virtual character provided by an exemplary embodiment of the present application;
[0029] FIG9 is a schematic diagram of virtual character switching provided by an exemplary embodiment of the present application;
[0030] FIG10 is a flow chart of a method for determining a user switchable role provided by an exemplary embodiment of the present application;
[0031] FIG11 is a flow chart of a role screening module provided by an exemplary embodiment of the present application;
[0032] FIG12 is a flowchart of role switching provided by an exemplary embodiment of the present application;
[0033] FIG13 is a structural block diagram of a virtual character switching device provided by an exemplary embodiment of the present application;
[0034] FIG14 is a structural block diagram of a virtual character switching device module provided by an exemplary embodiment of the present application;
[0035] FIG15 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0036] In some virtual games, when there are multiple virtual characters that can provide perspective images in the virtual game, the user can select the target virtual character through a switching operation, thereby displaying the perspective image corresponding to the target virtual character. In the related art, character switching is usually achieved through a simple key operation. When the user presses the specified key, the game character will be switched immediately, and the perspective image will be switched to the target character at the same time. This character switching is achieved by detecting the user's key input. When the game program detects that the user presses the specified key, it will immediately call the character switching function and switch the current game character to another character. However, this process is usually completed instantly, and the perspective switching process accompanying the character switching is relatively stiff and lacks coherence. It also has low fault tolerance for players accidentally touching the switching operation, and the human-computer interaction efficiency is low.
[0037] In an embodiment of the present application, a virtual character switching method is provided. During the switching process of a virtual character controlled by a client, a character switching operation is triggered to present the character switching process to the user on the client. The character switching process is used to transition between a first perspective image before the perspective switch and a second perspective image after the perspective switch. The character switching process includes an intermediate perspective display process to display an intermediate perspective transitioning from the first perspective of the currently controlled virtual character to the second perspective of the virtual character after the perspective switch. The intermediate perspective is a transitional perspective between the first and second perspectives. That is, the intermediate perspective image is used to enhance the transition process from the first perspective image to the second perspective image. This allows the device display to display the perspective switch process without having to directly switch from the first perspective image to the second perspective image in a short period of time. The display pixel units no longer need to respond to rapid color changes between different perspective images in a short period of time, thereby reducing the hardware pressure on the display and the device graphics card in terms of image response. Furthermore, the intermediate perspective image makes the perspective switching process associated with the character switch smoother, ensuring visual continuity during the perspective switching process.
[0038] In some embodiments, the terminal synchronously displays the character switching animation according to the duration of the character switching operation, that is, the character switching animation is in response to the continuously received character switching operations, and the player can stop the perspective switching at any time during the switching process to return to the first perspective screen, thereby improving the fault tolerance for accidental touches of the character switching operation and improving the efficiency of human-computer interaction.
[0039] First, a brief introduction to the terms involved in the embodiments of this application is given:
[0040] A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. This virtual scene can be a simulation of the real world, a semi-simulated, semi-fictional three-dimensional world, or a purely fictional three-dimensional world. The virtual scene can be any of a two-dimensional, a 2.5-dimensional, or a three-dimensional virtual scene. Optionally, the virtual scene is also used for a virtual game between at least two virtual characters, and the virtual scene contains virtual resources available to the at least two virtual characters.
[0041] Avatars: Refers to movable and inanimate objects in a virtual scene. Movable objects may be at least one of virtual people, virtual animals, and animated characters. Inanimate objects may be at least one of virtual buildings, virtual plants, and virtual terrain. Optionally, when the virtual scene is a three-dimensional virtual scene, the avatars may be three-dimensional virtual models. Each avatar has its own unique shape and volume within the three-dimensional virtual scene and occupies a portion of the space within the three-dimensional virtual scene. A avatar's activities include, but are not limited to, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Optionally, the avatar is a three-dimensional character constructed based on three-dimensional human skeleton technology, and the avatar adopts different skins to achieve different appearances. In some implementations, the avatar may also be implemented using a 2.5D or 2D model, which is not limited in this embodiment of the present application. For example, based on the different methods of controlling the avatar, avatars can be divided into user-controlled avatars and server-controlled avatars. User-controlled avatars are movable objects in the virtual scene controlled by the client. A server-controlled virtual character is a virtual character controlled by an automatic control algorithm or artificial intelligence program on a client or server. The server-controlled virtual character includes movable objects and inactive objects in a virtual scene. For example, an inactive object can respond to or influence the activities of an active object. For example, an active object can destroy an inactive object, or when an active object enters an inactive object, the active object enters a stealth state. For example, the virtual character in this application is a virtual character controlled by a client.
[0042] Please refer to FIG1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes: a terminal 110 .
[0043] In some embodiments, a target application is installed and running in the terminal 110, wherein the target application is an application capable of switching virtual characters. The target application can be any one of a virtual reality application, a three-dimensional map program, a strategy game, a third-person shooter game (TPS), a first-person shooter game (FPS), a multiplayer online battle arena game (MOBA), a massively multiplayer online role-playing game (MMORPG), a multiplayer gun battle survival game, and a multiplayer survival competitive game, and the embodiments of the present application are not limited to this.
[0044] Among them, the virtual scene is the scene displayed (or provided) when the client of the target application (such as a game application) is running on the terminal device. The virtual scene refers to the environment created for virtual characters to carry out activities (such as game competitions), such as a virtual house, a virtual island, a virtual map, etc. Optionally, the virtual scene is the environment displayed (or provided) when the application is running on the terminal device. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictional three-dimensional world, or a purely fictional three-dimensional world. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene. Optionally, the virtual scene is also used for a virtual scene battle between at least two virtual characters, and the virtual scene has virtual resources that can be used by at least two virtual characters.
[0045] The above-mentioned virtual characters refer to virtual characters, virtual vehicles, virtual items, etc. controlled by the user account in the target application, and this application does not limit this. Taking the target application as a game application as an example, a virtual character refers to a virtual character controlled by the user account in the game application. The virtual character can be in the form of a human, an animal, a cartoon or other forms, and this embodiment of the application does not limit this. The virtual character can be displayed in three-dimensional form or in two-dimensional form, and this embodiment of the application does not limit this. For example, according to different ways of controlling the virtual character, the virtual character can be divided into user-controlled virtual characters and server-controlled virtual characters, wherein the user-controlled virtual character is an object that can move in the virtual scene controlled by the client. The server-controlled virtual character is a virtual character controlled by an automatic control algorithm or artificial intelligence program on the client or server. The server-controlled virtual character includes movable objects and inactive objects in the virtual scene. Exemplarily, the first virtual character and the second virtual character in the present application are both virtual characters controlled by the client. Optionally, when the first virtual character is a virtual character controlled by the client based on user operation, the second virtual character is a virtual character automatically controlled by the client based on artificial intelligence; or, when the second virtual character is a virtual character controlled by the client based on user operation, the first virtual character is a virtual character automatically controlled by the client based on artificial intelligence.
[0046] In some embodiments, the terminal 110 displays a first perspective screen corresponding to the virtual scene, the first perspective screen corresponds to the first perspective of the first virtual character, and the first virtual character is the main virtual character; in response to receiving a role switching operation, a role switching animation is displayed, and the role switching operation is used to switch the main virtual character from the first virtual character to the second virtual character, and the second perspective of the second virtual character corresponds to the second perspective screen, and the role switching animation includes an intermediate perspective screen, and the intermediate perspective screen is a screen corresponding to the intermediate perspective from the first perspective to the second perspective, and the role switching animation includes a conversion process from the first perspective screen to the second perspective screen; in response to the completion of the role switching animation display, the second perspective screen corresponding to the virtual scene is displayed.
[0047] In some embodiments, the implementation environment further includes a server 120 and a communication network 130 .
[0048] The terminal 110 and the server 120 perform data transmission via the communication network 130 , wherein the terminal 110 is used to run a target application, and the server 120 is used to provide background services of the target application to the terminal 110 .
[0049] In some embodiments, a first perspective screen is displayed on the terminal 110. The first perspective screen is a screen of observing a virtual scene through the first perspective of a first virtual character, and the first virtual character is a master virtual character; in response to receiving a role switching operation, the terminal 110 sends a role switching request to the server 120, and the server 120 sends a request feedback to the terminal 110 based on the role switching request. The terminal 110 displays a role switching animation based on the request feedback. The role switching operation is used to switch the master virtual character from the first virtual character to the second virtual character. The role switching animation includes an intermediate perspective screen. The intermediate perspective screen is a screen corresponding to the intermediate perspective from the first perspective to the second perspective. The role switching animation is used to show the conversion process from the first perspective to the second perspective of the second virtual character; in response to the character switching animation being displayed, the second perspective screen is displayed.
[0050] Optionally, the target application may be a cloud gaming application, the server 120 is used to run the target application, and the terminal 110 is used to display a program screen corresponding to the target application.
[0051] In some embodiments, the server 120 logs in to the target application based on the terminal 110, and in response to the main virtual character of the terminal 110 being the first virtual character, renders the first perspective picture corresponding to the virtual scene, obtains the first rendering result and sends it to the terminal 110, and the terminal 110 displays the first perspective picture based on the received first rendering result. In response to receiving the role switching operation, the terminal 110 sends the operation data corresponding to the role switching operation to the server 120, and the server 120 renders the role switching animation based on the operation data, obtains the second rendering result and sends it to the terminal 110, and the terminal 110 displays the role switching animation based on the second rendering result. The server 120 renders the second perspective picture based on the above operation data, obtains the third rendering result and sends it to the terminal 110, and the terminal 110 displays the second perspective picture based on the third rendering result in response to the character switching animation being displayed.
[0052] The above-mentioned terminal is optional. The terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a smart TV, a smart car, and other terminal devices in various forms. The embodiments of the present application are not limited to this.
[0053] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.
[0054] In some embodiments, the above-mentioned server can also be implemented as a node in a blockchain system.
[0055] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the operational data and account information involved in this application are obtained with full authorization.
[0056] To further explain, this application can display a prompt interface, pop-up window or output voice prompt information before collecting relevant user data (for example: account information, operation data, etc. involved in this application) and during the process of collecting relevant user data. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant region.
[0057] Schematically, please refer to FIG2 , which shows a flowchart of a virtual character switching method provided by an exemplary embodiment of the present application. The method can be executed by a client in a terminal, or by a server, or by both the client and the server in the terminal. The embodiment of the present application takes the method executed by a terminal as an example for explanation. As shown in FIG2 , the method includes the following steps:
[0058] Step 210: Display the first-view image.
[0059] The first perspective picture corresponds to the first perspective of the first virtual character, that is, the first perspective picture is a picture of observing the virtual scene through the first perspective of the first virtual character, and the first virtual character is the main virtual character.
[0060] The virtual scene is a scene provided by the target application rendering in the terminal at runtime. The virtual scene includes multiple virtual characters, including a first virtual character among the multiple virtual characters. The first virtual character is the master virtual character. The master virtual character refers to the virtual character controlled by the client logged in by the first account at the current moment.
[0061] Optionally, the role status of the virtual character in the virtual scene includes a controllable state and an uncontrollable state, wherein the controllable state is used to indicate that the virtual character belongs to a candidate virtual character, and the candidate virtual character can be determined as a master virtual character, that is, the candidate virtual character is a virtual character that can be controlled by the terminal; the uncontrollable state is used to indicate that the virtual character does not belong to the candidate virtual character, for example, a virtual character controlled by a server or other terminal.
[0062] In some embodiments, when the virtual character in an uncontrollable state is a virtual character controlled by a server, the virtual character may also be implemented as a character controlled by artificial intelligence (AI) technology.
[0063] The controllable and uncontrollable states of the virtual character in the virtual scene can be pre-configured by the target application or configured by the user.
[0064] In some embodiments, the controllable and uncontrollable states of the virtual characters in the virtual scene are determined based on the camp to which the virtual characters belong. For example, the virtual characters in the camp where the first account is located are in a controllable state, and the virtual characters in other camps are in an uncontrollable state.
[0065] The aforementioned master virtual character can be any one of a plurality of candidate virtual characters. The master virtual character can be preset by the target application based on the plurality of candidate virtual characters, or can be selected by the user from the plurality of candidate virtual characters. The master virtual character is switchable, that is, the master virtual character can be switched from one of the plurality of candidate virtual characters to another candidate virtual character.
[0066] The character states of the candidate virtual characters in the controllable state include a first state and a second state, wherein the first state is used to indicate that the candidate virtual character is determined to be the master virtual character, and the second state is used to indicate that the candidate virtual character is not currently the master virtual character.
[0067] Optionally, the master virtual character may be a virtual character actively controlled by the user based on user operations of the terminal, or may be a virtual character automatically controlled by the terminal based on a preset program such as artificial intelligence.
[0068] Schematically, the virtual scene includes multiple candidate virtual characters, and the multiple candidate virtual characters include a first virtual character and a second virtual character. Assuming that the first virtual character is the main virtual character, the main virtual character can be switched to the second virtual character. When the first virtual character is the main virtual character, the first virtual character is in a first state and is actively controlled by the user, and the second virtual character is in a second state and is automatically controlled by a preset program or AI; when the main virtual character is switched to the second virtual character, the first virtual character is adjusted to the second state and is automatically controlled by a preset program or AI, and the second virtual character is adjusted to the first state and is actively controlled by the user.
[0069] When the first virtual character or the second virtual character in the virtual scene is in the second state, that is, when the virtual character is not a user-controlled character, the preset program or AI takes over the control of the virtual character, which can ensure the smoothness of the game, avoid errors in the game process, and then avoid application errors, thereby improving the stability of the game program.
[0070] In some embodiments, the terminal displays a virtual scene image corresponding to the perspective of the controlling virtual character according to the perspective of the controlling virtual character. When the controlling virtual character is the first virtual character, the first perspective image is displayed.
[0071] Optionally, the first perspective corresponding to the first virtual character can be a first-person view (FPV), a second-person view (2PV), a third-person view (3PV), or any other perspective corresponding to the first virtual character. In the embodiments of the present application, the third-person view is used as an example for description.
[0072] In some embodiments, when the first perspective is a first-person perspective, the head model of the first virtual character is provided with a virtual camera, and the virtual camera is used to capture the first perspective image corresponding to the first perspective, that is, under the first-person perspective, the head of the first virtual character is considered to be the position of the virtual camera, and the direction of the head of the first virtual character is the direction of the virtual camera, so the perspective of the virtual camera is considered to be the first perspective corresponding to the first virtual character.
[0073] In other embodiments, when the first perspective is a third-person perspective, a virtual camera used to capture the first perspective image is connected to a virtual spring arm (not visible in the virtual scene image). That is, a first end of the virtual spring arm is connected to the virtual camera, and a second end is connected to the first virtual character, so that the first perspective image displayed by the virtual camera moves with the movement of the first virtual character. In some embodiments, the extension size of the virtual spring arm is variable. That is, based on a distance setting corresponding to the first perspective, the virtual spring arm controls the position of the virtual camera relative to the first virtual character by an extension size corresponding to the distance setting.
[0074] Step 220: In response to receiving the role switching operation, present a role switching process from the first virtual character to the second virtual character.
[0075] The character switching operation is used to switch the controlling virtual character from the first virtual character to the second virtual character, the second virtual character corresponding to the second perspective, and the second perspective of the second virtual character corresponding to the second perspective image. Optionally, the second perspective can be a first-person perspective, a second-person perspective, a third-person perspective, or any other perspective corresponding to the second virtual character.
[0076] In some embodiments, when the second perspective is a first-person perspective, the head model of the first virtual character is provided with a virtual camera, and the virtual camera is used to capture a second perspective image corresponding to the second perspective, that is, under the first-person perspective, the head of the second virtual character is considered to be the position of the virtual camera, and the direction of the head of the second virtual character is the direction of the virtual camera, so the perspective of the virtual camera is considered to be the second perspective corresponding to the second virtual character.
[0077] In other embodiments, when the second perspective is a third-person perspective, a virtual camera used to capture the first perspective image is connected to a virtual spring arm (not visible in the virtual scene image). That is, a first end of the virtual spring arm is connected to the virtual camera, and a second end is connected to the second virtual character, so that the second perspective image displayed by the virtual camera moves with the movement of the second virtual character. In some embodiments, the extension size of the virtual spring arm is variable. That is, based on a distance setting corresponding to the second perspective, the virtual spring arm controls the position of the virtual camera relative to the second virtual character by an extension size corresponding to the distance setting.
[0078] Schematically, the character switching process includes a display process of an intermediate perspective, and the display process of the intermediate perspective is a process corresponding to the intermediate perspective of transitioning from the first perspective to the second perspective, wherein the intermediate perspective is a transition perspective in the process of switching from the first perspective of the first virtual character to the second perspective of the second virtual character.
[0079] Schematically, the intermediate perspective is the perspective of the virtual camera shooting the virtual scene during the transition process of the virtual camera used to provide the virtual scene image from a first camera position corresponding to the first perspective to a second camera position corresponding to the second perspective.
[0080] Optionally, when the first perspective and the second perspective are both first-person perspectives, the intermediate perspective includes the transition perspective of the first perspective switching from the first-person perspective to the third-person perspective of the first virtual character, the perspective of the virtual camera in the process of moving from the first camera position where the third-person perspective of the first virtual character is located to the second camera position where the third-person perspective of the second virtual character is located, and the perspective of switching from the third-person perspective of the second virtual character to the second perspective of the second virtual character (i.e., the first-person perspective).
[0081] Optionally, when the first perspective and the second perspective are both third-person perspectives, the intermediate perspective includes the perspective of the virtual camera in the process of moving from the first camera position where the third-person perspective of the first virtual character is located to the second camera position where the third-person perspective of the second virtual character is located.
[0082] Optionally, when the first perspective is a first-person perspective and the second perspective is a third-person perspective, the intermediate perspective includes the transition perspective of the first perspective switching from the first-person perspective to the third-person perspective of the first virtual character, and the perspective of the virtual camera moving from the first camera position where the third-person perspective of the first virtual character is located to the second camera position where the third-person perspective of the second virtual character is located.
[0083] Optionally, when the first perspective is a third-person perspective and the second perspective is a first-person perspective, the intermediate perspective includes the perspective of the virtual camera in the process of moving from the first camera position where the third-person perspective of the first virtual character is located to the second camera position where the third-person perspective of the second virtual character is located, and switching from the third-person perspective of the second virtual character to the second perspective of the second virtual character (i.e., the first-person perspective).
[0084] Illustratively, the character switching process is used to indicate a process of transitioning from a first perspective of a first virtual character to a second perspective of a second virtual character, wherein the perspective transition includes a translation and / or rotation of the perspective. Optionally, when the first perspective and the second perspective point in the same direction, the transition process includes a translation of the perspective; when the first perspective and the second perspective point in different directions, the transition process includes both a translation and a rotation of the perspective.
[0085] In some embodiments, presenting the character switching process from a first virtual character to a second virtual character is implemented as follows: in response to receiving a character switching operation, displaying a character switching animation, the character switching animation including an intermediate perspective picture, the intermediate perspective picture being a picture corresponding to an intermediate perspective rotated from a first perspective to a second perspective, the character switching animation including a conversion process from a first perspective picture corresponding to the first perspective to a second perspective picture corresponding to the second perspective, that is, the character switching animation is used to show the conversion process from the first perspective to the second perspective of the second virtual character.
[0086] Optionally, the character switching operation can be an operation that requires a first duration threshold to complete the character switching, such as a long press operation, a continuous click operation, or a continuous shake operation. In the embodiments of this application, a long press operation is used as an example for illustration. When the duration of the character switching operation reaches the first duration threshold, the controlling virtual character switches from the first virtual character to the second virtual character, and the character switch is deemed successful.
[0087] In some embodiments, the character switching animation is displayed synchronously based on the duration of the character switching operation. That is, the duration of the character switching animation is synchronized with the duration of the character switching operation. After the client receives the operation trigger signal of the character switching operation, the client starts playing the character switching animation.
[0088] Optionally, in response to receiving a continuous character switching operation, a color switching animation is continuously displayed in synchronization with the character switching operation; in response to the duration of the character switching operation reaching a first duration threshold, the main virtual character is switched to the second virtual character; or, in response to the duration of the role switching operation being less than the first duration threshold when the role switching operation is terminated, the character switching animation is stopped, and the first perspective screen is restored to be displayed, and the main virtual character is controlled to remain the first virtual character.
[0089] The first duration threshold is used to indicate the duration of the role switching operation to switch the controlling virtual character from the first virtual character to the second virtual character.
[0090] For example, taking the first duration threshold of 5 seconds as an example, when the client detects the operation trigger signal of the role switching operation, the client starts to display the role switching animation. For example, 4 seconds after detecting the operation trigger signal, the client detects that the operation trigger signal is interrupted, then it is determined that the role switching operation is terminated, and the client resumes displaying the first perspective screen. For another example, if the operation trigger signal is detected for 6 seconds, then when the operation trigger signal continues for 5 seconds, the role switching animation ends and the second perspective screen after the main virtual character has switched to the second virtual character is displayed.
[0091] In some embodiments, it is necessary to determine the intermediate perspective image in the character switching animation. Step 220 is implemented as follows:
[0092] In the first step, in response to receiving a role switching operation, a perspective conversion route corresponding to the role switching animation is determined based on the first virtual character and the second virtual character.
[0093] The perspective conversion route is used to determine the intermediate perspective.
[0094] In some embodiments, the perspective conversion route is a line connecting a perspective point corresponding to the first perspective and a perspective point corresponding to the second perspective. Optionally, the line can be a straight line or a curve.
[0095] For example, taking the viewpoint as the center point of the virtual character as an example, if the viewpoint conversion route is implemented as a straight line, the line segment between the first center point corresponding to the first virtual character and the second center point corresponding to the second virtual character is determined as the viewpoint conversion route; if the viewpoint conversion route is implemented as a curve, taking a semicircular arc as an example, the midpoint of the above line segment is taken as the center of the sphere, and half the length of the line segment is taken as the radius, and any semicircular arc line from the first center point to the second center point in the sphere is determined as the viewpoint conversion route.
[0096] It is worth noting that the above-mentioned method of determining the perspective conversion route is only an illustrative example and is not limited in this application.
[0097] In the second step, a plurality of perspective transition points are determined in the perspective conversion route according to the first interval threshold.
[0098] The perspective transition point is used to indicate an intermediate perspective from a first perspective to a second perspective.
[0099] Optionally, the distances between multiple perspective transition points may be the same or different.
[0100] The third step is to display the character switching animation based on multiple perspective transition points.
[0101] The character switching animation includes intermediate perspective images under intermediate perspectives corresponding to multiple perspective transition points.
[0102] For illustration, please refer to Figure 3, which is a schematic diagram of a character switching animation provided by an exemplary embodiment of the present application. As shown in Figure 3, the terminal displays a first perspective screen 310, and in response to receiving a character switching operation, displays a character switching animation, which includes an intermediate perspective screen 321 and an intermediate perspective screen 322. In response to the completion of the character switching animation display, the second perspective screen 330 is displayed.
[0103] In some embodiments, a role switching operation is received when at least one candidate role exists within the viewing angle range corresponding to the first viewing angle. The viewing angle range is used to indicate the shooting range of the virtual camera corresponding to the first viewing angle when shooting the virtual scene. The viewing angle range determines the image content of the first viewing angle image displayed after the virtual camera shoots the virtual scene. In some embodiments, the viewing angle range is determined by the field of view (FOV) corresponding to the virtual camera. The FOV defines the width and height of the virtual camera's field of view. The larger the FOV, the wider the virtual scene displayed in the first viewing angle image.
[0104] Before the actual character switching animation, in response to receiving the character switching operation, a second virtual character that meets the role switching condition in the virtual scene is determined based on the first perspective.
[0105] Optionally, the second virtual character is determined in the following two ways:
[0106] The first one is that when there is only one candidate virtual character within the viewing angle range corresponding to the first viewing angle, the candidate virtual character is determined as the second virtual character.
[0107] The second method is to determine the second virtual character from the plurality of candidate virtual characters based on the role switching condition when there are a plurality of candidate virtual characters within the viewing angle range corresponding to the first viewing angle.
[0108] That is, when there are multiple candidate virtual characters within the viewing angle range corresponding to the first viewing angle, a second virtual character that meets the role switching condition is screened out from the multiple candidate virtual characters.
[0109] In some embodiments, when there are multiple candidate virtual characters within the viewing angle range corresponding to the first viewing angle, the second virtual character is determined based on the distance between the candidate virtual character and the first virtual character.
[0110] Illustratively, a candidate virtual character among multiple candidate virtual characters whose distance from the first virtual character is less than a first distance threshold is determined as the second virtual character; when there are multiple candidate virtual characters whose distance from the first virtual character is less than the first distance threshold, a candidate virtual character among the multiple candidate virtual characters whose indicator data reaches the first data threshold is determined as the second virtual character.
[0111] In some embodiments, before determining the second virtual character based on the indicator data, it is necessary to determine the data type of the indicator data and the corresponding first data threshold. The data type and the first data threshold are determined based on the scene category of the virtual scene.
[0112] Illustratively, the indicator data is data used to indicate the attributes of the candidate virtual character in the virtual scene, such as health, defense, experience, etc. In some embodiments, the data type of the above indicator data is determined based on the scene category of the virtual scene. For example, when the scene category of the virtual scene belongs to a virtual combat scene, the combat power (including attack power, defense, etc.) of the virtual character is determined as the indicator data; when the scene category of the virtual scene belongs to a virtual survival scene, the health value of the virtual character is determined as the indicator data; when the scene category of the virtual scene belongs to a virtual driving scene, the driving experience of the virtual character is determined as the indicator data, etc.
[0113] Step 230: In response to the character switching process being completed, a second perspective image is displayed.
[0114] The second perspective picture is a picture of the virtual scene corresponding to the second perspective of the second virtual character, that is, the second perspective picture is a picture of observing the virtual scene through the second perspective of the second virtual character.
[0115] Optionally, the second perspective can be a first-person perspective, a second-person perspective, a third-person perspective, or any other perspective corresponding to the second virtual character. In the embodiment of the present application, the third-person perspective is used as an example for description.
[0116] In some embodiments, the current controlling virtual character is the second virtual character, and the perspective screen follows the second virtual character, that is, the perspective screen is the second perspective screen.
[0117] In some embodiments, in response to the character switching animation being displayed, the character state of the second virtual character is adjusted to the first state.
[0118] The character state of the candidate virtual character in the virtual scene is determined according to the main virtual character. Optionally, the character state includes a first state and a second state, wherein the first state is used to indicate that the candidate virtual character is determined to be the main virtual character, and the second state is used to indicate that the candidate virtual character currently does not belong to the main virtual character.
[0119] In some embodiments, in response to the character switching animation being displayed, the character state of the second virtual character is determined to be a first state, and the first state is used to indicate that the second virtual character is controlled by the main control operation of the terminal; the character state of the first virtual character is determined to be a second state, and the second state is used to indicate that the first virtual character is stationary, or the first virtual character is automatically controlled by a preset program.
[0120] In summary, the method provided in the embodiments of the present application, during the process of switching a virtual character controlled by a client, triggers the client to present the character switching process to the user through a character switching operation. The character switching process is used to transition between the first perspective image before the perspective switch and the second perspective image after the perspective switch. The character switching process includes an intermediate perspective display process to display an intermediate perspective transitioning from the first perspective of the currently controlled virtual character to the second perspective of the virtual character after the perspective switch. The intermediate perspective is a transitional perspective between the first and second perspectives. That is, the intermediate perspective image is used to enhance the transition process from the first perspective image to the second perspective image. This allows the device display to display the perspective switching process without having to directly switch from the first perspective image to the second perspective image in a short period of time. The display pixel units no longer need to respond to rapid color changes between different perspective images in a short period of time, thereby reducing the hardware pressure on the display and the device graphics card in terms of image response. At the same time, the intermediate perspective image makes the perspective switching process accompanying the character switch smoother, ensuring visual continuity during the perspective switching process.
[0121] The method provided in the embodiment of the present application adjusts the character state of the virtual character in response to the completion of the character switching animation display, adjusts the second virtual character to the first state, and adjusts the first virtual character to the second state, thereby realizing the actual switching of the main virtual character in the background, and by adjusting the first virtual character to the second state, it can be automatically controlled by a preset program, so that the player can switch and control multiple virtual characters during the game, increasing the flexibility of controlling multiple virtual characters in the virtual scene. When the virtual character in the virtual scene is in the second state, that is, not the user's main control, the preset program takes over the control of the virtual character, which can ensure the smoothness of the game, avoid errors in the game process, and then avoid application errors, thereby improving the stability of the game program.
[0122] In some embodiments, step 220 is implemented by displaying a character switching animation based on the duration of the character switching operation in response to receiving the character switching operation. When the character switching animation is displayed synchronously based on the duration of the character switching operation, the terminal determines the current master virtual character based on the duration of the character switching operation. For illustration, please refer to FIG4 , which shows a flow chart of a character switching animation display method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, a server, or both a terminal and a server. The present application embodiment uses the method executed by a terminal as an example for explanation. As shown in FIG4 , the method includes the following steps:
[0123] Step 410: Display the first-view image.
[0124] The first perspective picture corresponds to the first perspective of the first virtual character, that is, the first perspective picture is a picture of observing the virtual scene through the first perspective of the first virtual character, and the first virtual character is the main virtual character.
[0125] In some embodiments, step 410 is implemented as step 210 described above.
[0126] Step 420 : In response to receiving the continuous role switching operation, continuously display the role switching animation in synchronization with the role switching operation.
[0127] In some embodiments, after the duration of the role switching operation reaches a first duration threshold, if the current perspective has not yet transitioned to the second perspective and the user stops the role switching operation, the role switching animation continues to be automatically displayed until the role switching animation is completed.
[0128] In some embodiments, when the duration of the character switching operation is less than the first duration threshold, the character switching fails, and the lens position needs to be restored to the position corresponding to the first perspective and move again following the first perspective of the first virtual character.
[0129] The first duration threshold is used to indicate the duration of the role switching operation to switch the controlling virtual character from the first virtual character to the second virtual character.
[0130] Step 431: In response to the character switching operation being terminated for a duration less than a first duration threshold, the character switching animation is stopped and the first perspective image is restored.
[0131] Illustratively, the client controls the master virtual character to remain the first virtual character.
[0132] The first duration threshold is used to indicate the duration of the role switching operation required to switch the controlling virtual character from the first virtual character to the second virtual character.
[0133] In some embodiments, in response to the role switching operation being terminated for a duration less than a first duration threshold, the role switching fails, and the terminal ends the role switching process by stopping displaying the role switching animation and resuming display of the first perspective screen.
[0134] Optionally, when the terminal stops displaying the character switching animation, the first perspective picture can be restored and displayed by directly resetting the lens position to the position corresponding to the first perspective, or the first perspective picture can be restored and displayed by displaying the character recovery animation, wherein the character recovery animation includes the picture corresponding to the intermediate perspective that transitions from the current perspective back to the first perspective.
[0135] Step 432: In response to the duration of the role switching operation reaching a first duration threshold, display the main virtual character switching to the second virtual character.
[0136] In some embodiments, when the duration of the role switching operation reaches a first duration threshold, the role switching is successful, and the terminal displays the second role identifier corresponding to the second virtual character to indicate that the current master virtual character is the second virtual character.
[0137] Optionally, the role switching operation may be a long press operation, a continuous click operation, a continuous shake operation, etc.
[0138] In the embodiment of the present application, a long press operation is used as an example for explanation. If the duration of the role switching operation is less than the first duration threshold when the role switching operation is terminated, the controlling virtual character remains the first virtual character, and the role switching is deemed to have failed. If the duration of the role switching operation reaches the first duration threshold, the controlling virtual character is switched to the second virtual character, and the role switching is deemed to have succeeded.
[0139] In some embodiments, the user input is detected by a user input detection module. When the user triggers a role switching operation, the user input detection module will continue to detect the role switching operation and trigger the role switching process. When the user input detection module detects that the duration of the role switching operation is less than a first duration threshold, the role switching process is terminated and the master virtual character is maintained as the first virtual character. When the user input detection module detects that the duration of the role switching operation reaches the first duration threshold, the master virtual character is switched to the second virtual character through the role switching module, that is, the first virtual character is adjusted to the second state and the second virtual character is adjusted to the first state through the role switching module.
[0140] The second state is used to indicate that the virtual character is not the current master virtual character, and the first state is used to indicate that the virtual character is the current master virtual character.
[0141] Step 440: In response to the character switching animation being displayed, the second perspective image is displayed.
[0142] The second perspective picture is a picture of the virtual scene corresponding to the second perspective of the second virtual character, that is, the second perspective picture is a picture of observing the virtual scene through the second perspective of the second virtual character.
[0143] In some embodiments, step 440 is implemented as step 230 described above.
[0144] In summary, the method provided in the embodiment of the present application increases the interactivity between the display of the character switching animation and the user operation during the character switching process by synchronously displaying the character switching animation based on the duration of the character switching operation.
[0145] The method provided in the embodiment of the present application determines whether the role switch is successful based on whether the duration of the role switch operation reaches a first duration threshold, and provides two role switch animation display modes. In response to receiving a continuous role switch operation, the role switch animation is continuously displayed in synchronization with the role switch operation. When the duration of the role switch operation reaches the first duration threshold, the main virtual character is switched to the second virtual character, thereby avoiding the situation where the user stops the role switch operation due to erroneous operation, resulting in a failure of the role switch and the inability to display the second perspective screen. In response to receiving a termination of the role switch operation when the duration is less than the first duration threshold, the role switch animation is stopped and the first perspective screen is restored to display, thereby avoiding the user triggering the role switch operation due to erroneous operation and performing role switching when there is no role switching demand, thereby reducing the waste of computing resources. At the same time, the user can give up or continue the role switch operation in real time according to the actual situation, providing more fault tolerance space for the user's erroneous operation of role switching, improving the flexibility of virtual character switching, and thus improving the efficiency of human-computer interaction.
[0146] In some embodiments, a role switching operation is received through a role switching control, and a display process of the role switching control is also included before the above step 220. Please refer to Figure 5, which shows a flow chart of a role switching control display method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both the terminal and the server. The embodiment of the present application takes the method executed by a terminal as an example for explanation. As shown in Figure 5, the following steps are included before the above step 220:
[0147] Step 510: Display a role switching control when there is at least one candidate virtual character within the viewing angle range corresponding to the first viewing angle.
[0148] The role switching control is used to receive a role switching operation.
[0149] Optionally, the role switching control can be displayed fixedly or dynamically according to the situation of the candidate virtual characters. Taking dynamic display as an example, when there is at least one candidate virtual character within the viewing angle corresponding to the first viewing angle, the main virtual character can switch from the first virtual character to other candidate virtual characters. By displaying the role switching control, the user is explicitly reminded that they can perform the role switching operation.
[0150] In some embodiments, the role switching control corresponds to a role identifier of the first virtual character, and the role identifier is used to indicate that the current master virtual character is the first virtual character.
[0151] In some embodiments, the viewing angle range corresponding to the first viewing angle is used to indicate candidate virtual characters whose distance from the first virtual character in the first viewing angle screen is less than a first distance threshold.
[0152] In an illustrative example, the distance between the first virtual character and the other candidate virtual characters is determined by the Euclidean distance. Taking a two-dimensional space as an example, assuming that the position coordinates of the first virtual character are (x1, y1) and the position coordinates of the second virtual character are (x2, y2), the distance between the first virtual character and the second virtual character is determined by the following formula: s = sqrt((x1-x2) 2 +(y1-y2) 2 )
[0153] Among them, s is used to indicate the distance between the first virtual character and the second virtual character, that is, obtain the coordinate values x1 and x2 corresponding to the first position coordinate (x1, y1) of the first virtual character and the second position coordinate (x2, y2) corresponding to the second virtual character on the x-axis, and the coordinate values y1 and y2 corresponding to the y-axis, and determine the Euclidean distance between the first position of the first virtual character and the second position of the second virtual character based on the first coordinate difference (x1-x2) on the x-axis and the second coordinate difference (y1-y2) on the y-axis.
[0154] In some embodiments, when the distance between the virtual character existing in the first perspective image and the first virtual character is less than a first distance threshold, the virtual character is determined as a candidate virtual character.
[0155] In some embodiments, based on the duration of the role switching operation, the role switching control is displayed. After the above step 510, the following two steps are also included:
[0156] In the first step, when the duration of the role switching operation is less than a first duration threshold, a first countdown is displayed based on the first role identifier.
[0157] The first countdown is used to indicate the remaining duration of the role switching operation when the controlling virtual character is switched from the first virtual character to the second virtual character.
[0158] When the duration of the role switching operation is less than the first duration threshold, the master virtual character remains as the first virtual character.
[0159] The moment when the role switching operation is triggered is recorded as the first moment, and the first time threshold moved backward from the first moment is recorded as the second moment. The current moment is between the first moment and the second moment, and the first countdown is used to indicate the time interval between the current moment and the second moment.
[0160] Exemplarily, when the client receives an operation trigger signal for a role switching operation and the duration of the operation trigger signal is less than a first duration threshold, the client maintains the first role identification (e.g., role ID, role avatar) displayed on the role switching control, and displays a first countdown associated with the first role identification, which indicates the remaining time for maintaining the current master virtual character as the first virtual character.
[0161] In the second step, when the duration of the role switching operation reaches a first duration threshold, a second role identifier corresponding to the second virtual character is displayed based on the role switching control; and a second countdown is displayed based on the second role identifier.
[0162] The second countdown is used to indicate the remaining time required for the current perspective image to be converted to the second perspective image.
[0163] When the duration of the role switching operation reaches a first duration threshold, the master virtual character is switched to the second virtual character.
[0164] Only the role switching control corresponding to the second role identifier is used to receive a role switching operation to switch the controlling virtual character from the second virtual character to other candidate virtual characters. The second role identifier is used to indicate that the current controlling virtual character is the second virtual character.
[0165] The moment when the duration of the character switching operation reaches the first duration threshold is recorded as the first moment, and the moment when the character switching animation is displayed is recorded as the second moment. The current moment is between the first moment and the second moment, and the first countdown is used to indicate the duration interval between the current moment and the second moment.
[0166] To sum up, the method provided in the embodiment of the present application displays a character switching control when there is at least one candidate virtual character within the viewing angle corresponding to the first viewing angle, and promptly and explicitly prompts the user to perform the character switching operation in a dynamic display manner, and uses additional prompt elements to implement the prompt function, thereby saving rendering resources, further avoiding erroneous operations on character switching, and improving human-computer interaction efficiency.
[0167] The method provided in the embodiment of the present application prompts the user of the remaining duration required for the role switching operation to switch the main virtual character from the first virtual character to the second virtual character by displaying a first countdown based on the first character identifier when the duration of the role switching operation is less than the first duration threshold, thereby avoiding the situation where the user fails to switch or is unable to give up the switch in time due to not being able to accurately know whether the switch has been successful, further improving the tolerance for erroneous operations, and displaying the second character identifier corresponding to the second virtual character when the duration of the role switching operation reaches the first duration threshold. The identifier information displayed on the interface visually prompts the user that the current main virtual character has switched to the second virtual character, thereby improving the efficiency of human-computer interaction.
[0168] In some embodiments, a character switching animation is displayed by explicitly displaying an intermediate perspective image. It is necessary to determine the intermediate perspective image in the character switching animation. Please refer to FIG6 , which is a flow chart of a character switching animation display method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, a server, or both a terminal and a server. The present embodiment of the application takes the method executed by a terminal as an example for explanation. As shown in FIG6 , the above step 220 includes the following steps:
[0169] Step 221 : In response to receiving a role switching operation, determining a perspective conversion route corresponding to the role switching animation based on the first virtual character and the second virtual character.
[0170] In some embodiments, the perspective conversion route is a line connecting a perspective point corresponding to the first perspective and a perspective point corresponding to the second perspective. Optionally, the line can be a straight line or a curve.
[0171] For example, taking the viewpoint as the center point of the virtual character as an example, if the viewpoint conversion route is implemented as a straight line, the line segment between the first center point corresponding to the first virtual character and the second center point corresponding to the second virtual character is determined as the viewpoint conversion route; if the viewpoint conversion route is implemented as a curve, taking a semicircular arc as an example, the midpoint of the above line segment is taken as the center of the sphere, and half the length of the line segment is taken as the radius, and any semicircular arc line from the first center point to the second center point in the sphere is determined as the viewpoint conversion route.
[0172] It is worth noting that the above-mentioned method of determining the perspective conversion route is only an illustrative example and is not limited in this application.
[0173] Step 222: Determine a plurality of perspective transition points in the perspective conversion route according to a first interval threshold.
[0174] The perspective transition point is used to indicate an intermediate perspective from a first perspective to a second perspective.
[0175] In the embodiment of the present application, the above-mentioned multiple perspective transition points are position points of intermediate perspectives in the transition process from the first perspective to the second perspective located on the perspective conversion route.
[0176] Optionally, when the transition from the first perspective to the second perspective includes translation, the above-mentioned perspective transition point includes the position point through which the intermediate perspective passes during translation on the perspective conversion route; optionally, when the transition from the first perspective to the second perspective includes rotation, the above-mentioned perspective transition point includes the position point through which the intermediate perspective rotates on the perspective conversion route, and the position point through which the intermediate perspective passes during translation on the perspective conversion route.
[0177] In some embodiments, when the transition from the first perspective to the second perspective includes both translation and rotation, the virtual camera prioritizes rotation, or the virtual camera prioritizes translation, which is not limited here.
[0178] Optionally, the method for determining the perspective transition point includes at least the following two methods:
[0179] The first method is to uniformly determine multiple perspective transition points in the perspective conversion route according to a fixed first interval threshold.
[0180] The distances between the multiple perspective transition points are the same.
[0181] The second type is that when the duration of the role switching operation is less than the first duration threshold, multiple first perspective transition points are determined in the perspective conversion route according to the decreasing first interval threshold; when the duration of the role switching operation reaches the first duration threshold, multiple second perspective transition points are determined in the perspective conversion route according to the increasing first interval threshold.
[0182] Among them, the first perspective transition point is used to indicate the intermediate perspective when rotating from the first perspective to the second perspective when the main virtual character remains the first virtual character; the second perspective transition point is used to indicate the intermediate perspective when rotating from the first perspective to the second perspective when the main virtual character switches to the second virtual character.
[0183] In some embodiments, the number of perspective transition points is determined according to the frame rate of the terminal.
[0184] Schematically, in the embodiment of the present application, an interpolation method is used to determine the perspective transition point. The perspective transition point is implemented as the lens position corresponding to the intermediate perspective. Assuming that the first perspective corresponds to lens position A and the second perspective corresponds to lens position B, the perspective transition point corresponding to each frame is determined by linear interpolation. Taking the terminal frame rate of 60 frames per second as an example, the method for determining the perspective transition point corresponding to the nth frame can be referred to the following formula:
[0185] Where C is the lens position indicated by the perspective transition point of the n-th frame, and n is a positive integer. That is, the distance between the first lens position (lens position A) corresponding to the first perspective and the second lens position (lens position B) corresponding to the second perspective is divided according to the frame rate, and the lens position indicated by the perspective transition point of the n-th frame is obtained by adding the distance obtained by the above division to the first lens position.
[0186] Step 223: Display the character switching animation based on multiple perspective transition points.
[0187] The character switching animation includes intermediate perspective images under intermediate perspectives corresponding to multiple perspective transition points.
[0188] 3 , the terminal displays a first perspective screen 310 , and in response to receiving a role switching operation, displays a role switching animation, which includes an intermediate perspective screen 321 and an intermediate perspective screen 322 , and in response to the completion of the role switching animation display, displays a second perspective screen 330 .
[0189] To sum up, the method provided in the embodiment of the present application determines a perspective conversion route, determines multiple perspective transition points in the perspective conversion route according to a first interval threshold, displays the character switching animation based on the multiple perspective transition points, clarifies the display method of the character switching animation, and determines the intermediate perspective picture by using the perspective transition point on the perspective conversion route as the intermediate perspective, thereby adding a transition picture in the virtual character switching process, making the character switching animation smoother and more fluent.
[0190] The method provided in the embodiment of the present application provides a variety of different perspective transition point determination schemes. By uniformly determining multiple perspective transition points in the perspective conversion route according to a fixed first interval threshold, the distances between the perspective transition points are made the same, that is, the lens position is moved at a uniform speed during the display of the perspective switching animation, so that the picture change process is smooth and fluent; when the duration of the character switching operation is less than the first duration threshold, multiple first perspective transition points are determined in the perspective conversion route according to the decreasing first interval threshold; when the duration of the character switching operation reaches the first duration threshold, multiple second perspective transition points are determined in the perspective conversion route according to the increasing first interval threshold. The perspective transition points are determined with different first interval thresholds, so that the user can perceive the character switching situation according to the change in the lens position movement speed, thereby improving interactivity.
[0191] In some embodiments, before the above step 220, it is necessary to determine a second virtual character. Optionally, the second virtual character can be selected by the user or automatically determined by the terminal. In the embodiment of the present application, the second virtual character is automatically determined by the terminal as an example. Please refer to Figure 7, which is a flow chart of a method for determining a second virtual character provided by an exemplary embodiment of the present application. The method can be executed by the terminal, or by the server, or by both the terminal and the server. The embodiment of the present application is described by taking the method executed by the terminal as an example. As shown in Figure 7, before the above step 220, the following steps are also included:
[0192] Step 710: Determine a second virtual character in the virtual scene that meets the character switching condition based on the first perspective.
[0193] Optionally, the character switching condition includes at least one of the following: the second virtual character is within the viewing angle range corresponding to the first viewing angle; the indicator data of the second virtual character reaches a first data threshold; the second virtual character is a virtual character selected based on a character selection operation; and the like.
[0194] In some embodiments, step 710 includes the following two cases:
[0195] The first one is that when there is only one candidate virtual character within the viewing angle range corresponding to the first viewing angle, the candidate virtual character is determined as the second virtual character.
[0196] In some embodiments, the candidate virtual character refers to a virtual character whose character state in the virtual scene is a controllable state.
[0197] The above-mentioned character status includes a controllable state and an uncontrollable state, wherein the controllable state is used to indicate that the virtual character belongs to a candidate virtual character, and the candidate virtual character can be determined as the main virtual character; the uncontrollable state is used to indicate that the virtual character does not belong to the candidate virtual character, for example, a virtual character controlled by a server or other terminal.
[0198] The controllable and uncontrollable states of the virtual character in the virtual scene can be pre-configured by the target application or configured by the user.
[0199] In some embodiments, the controllable and uncontrollable states of the virtual characters in the virtual scene are determined based on the camp to which the virtual characters belong. For example, the virtual characters in the camp where the first account is located are in a controllable state, and the virtual characters in other camps are in an uncontrollable state.
[0200] The second method is to determine the second virtual character from the plurality of candidate virtual characters based on the role switching condition when there are a plurality of candidate virtual characters within the viewing angle range corresponding to the first viewing angle.
[0201] In some embodiments, determining the second virtual character from a plurality of candidate virtual characters includes the following two steps:
[0202] In the first step, a candidate virtual character whose distance from the first virtual character is less than a first distance threshold among the plurality of candidate virtual characters is determined as the second virtual character.
[0203] In some embodiments, the distances between the plurality of candidate virtual characters and the first virtual character are determined respectively, and the candidate virtual character with the smallest distance is determined as the second virtual character.
[0204] In the second step, when the distances between multiple candidate virtual characters and the first virtual character are less than the first distance threshold, the candidate virtual character whose indicator data reaches the first data threshold among the multiple candidate virtual characters is determined as the second virtual character.
[0205] In some embodiments, a virtual character has multiple candidate indicator data. Before determining a second virtual character based on the indicator data, it is necessary to determine the data type and corresponding first data threshold of the indicator data. This data type and first data threshold are determined based on the scene category of the virtual scene. That is, before the second step described above, the scene category of the virtual scene is determined, which indicates the data type of the indicator data. Based on the scene category, the indicator data is determined from the multiple candidate indicator data corresponding to the virtual character; and the first data threshold corresponding to the indicator data is determined.
[0206] Illustratively, when the scene category of the virtual scene belongs to a virtual combat scene, the combat effectiveness (including attack power, defense power, etc.) of the virtual character is determined as the indicator data; when the scene category of the virtual scene belongs to a virtual survival scene, the life value of the virtual character is determined as the indicator data; when the scene category of the virtual scene belongs to a virtual driving scene, the driving experience of the virtual character is determined as the indicator data, etc.
[0207] Please refer to FIG8 , which is a schematic diagram of a method for determining a second virtual character provided by an exemplary embodiment of the present application. As shown in FIG8 , taking the indicator data as life value as an example for explanation, a virtual scene 810 includes a first virtual character 811 , a candidate virtual character 812 and a candidate virtual character 813 , wherein only the candidate virtual character 812 is located in the first virtual character 811 The candidate virtual character 812 is determined as the second virtual character within the viewing angle corresponding to the first viewing angle of the first virtual character 821; the virtual scene 820 includes the first virtual character 821, the candidate virtual character 822 and the candidate virtual character 823, wherein the candidate virtual character 822 and the candidate virtual character 823 are both located within the viewing angle corresponding to the first viewing angle of the first virtual character 821, and the candidate virtual character 822, which is closer to the first virtual character 821, is determined as the second virtual character; the virtual scene 830 includes the first virtual character 831, the candidate virtual character 832 and the candidate virtual character 833, wherein the candidate virtual character 832 and the candidate virtual character 833 are both located within the viewing angle corresponding to the first viewing angle of the first virtual character 831, and the distances between the candidate virtual character 832 and the candidate virtual character 833 and the first virtual character 831 are the same, and the candidate virtual character 833 with a higher health value is determined as the second virtual character.
[0208] For illustration, please refer to Figure 9, which is a schematic diagram of virtual character switching provided by an exemplary embodiment of the present application. As shown in Figure 9, a first perspective screen 901 corresponding to a first virtual character 910 is displayed, and the virtual scene includes the first virtual character 910, a candidate virtual character 920, and a candidate virtual character 930, wherein the candidate virtual character 920 and the candidate virtual character 930 are both located within the perspective range of the first perspective corresponding to the first virtual character 910, and the distances between the candidate virtual character 920 and the candidate virtual character 930 and the first virtual character 910 are the same. Based on the current virtual scene being implemented as a virtual combat scene, combat effectiveness is used as indicator data, and the candidate virtual character 930 whose combat effectiveness reaches the first data threshold is determined as the second virtual character. In response to receiving a role switching operation, a role switching animation 902 is displayed. In response to the completion of the role switching animation 902, a second perspective screen 903 corresponding to the second virtual character (candidate virtual character 930) is displayed.
[0209] To sum up, the method provided in the embodiment of the present application provides a solution for the terminal to automatically determine the second virtual character by determining the second virtual character that meets the role switching conditions in the virtual scene based on the first perspective before displaying the role switching animation, thereby reducing the process of the user manually selecting the second virtual character, improving the automaticity of virtual character switching, and thus improving the efficiency of virtual character switching.
[0210] The method provided in the embodiment of the present application determines the second virtual character by giving priority to candidate virtual characters in the viewing angle range corresponding to the first viewing angle, so that the implementation process of virtual character switching is more consistent with the actual switching situation and more immersive.
[0211] The method provided in the embodiment of the present application determines the second virtual character based on the distance between the candidate virtual character and the first virtual character when there are multiple candidate virtual characters within the viewing angle range corresponding to the first viewing angle, thereby giving priority to selecting the candidate virtual character with a shorter viewing angle conversion path in the process of automatically determining the second virtual character, thereby reducing the computing and rendering resources required for the character switching animation and improving the rationality of the second virtual character; when there are multiple candidate virtual characters and the distance between them is less than a first distance threshold, the candidate virtual character whose indicator data reaches the first data threshold among the multiple candidate virtual characters is determined as the second virtual character, further clarifying the method for determining the second virtual character and improving the automation of the second virtual character determination process.
[0212] The method provided in the embodiment of the present application determines the scene category of the virtual scene, and determines indicator data from multiple candidate indicator data corresponding to the virtual character based on the scene category; determines a first data threshold corresponding to the indicator data, so that the second virtual character determined based on the indicator data is more in line with the actual needs of the user, thereby improving the determination quality of the second virtual character.
[0213] In some embodiments, the virtual character switching method provided in the embodiments of the present application can be executed by a terminal, or by a server, or by both the terminal and the server. The embodiments of the present application are illustrated by taking the method executed by the terminal as an example. The terminal jointly executes the virtual character switching method through a user input detection module, a role screening module, a perspective conversion module, a role switching module, a user interaction module and a role switching completion module, wherein the user input detection module is used to detect user input, and when the user triggers the role switching operation, the role switching process is triggered; the role screening module is used to determine the second virtual character; the perspective conversion module is used to display the perspective switching animation; the role switching module is used to switch the master virtual character; the user interaction module is used to continuously detect user input during the role switching process and determine the duration of the role switching operation; the role switching completion module is used to determine the master virtual character after the role switching is completed.
[0214] Schematically, please refer to Figure 10, which is a flow chart of a method for determining a user-switchable role provided by an exemplary embodiment of the present application. As shown in Figure 10, the terminal executes step 1010 in sequence to determine whether there is a candidate virtual character within the viewing angle corresponding to the first viewing angle, and executes step 1020 in response to the existence of a candidate virtual character; step 1020, displays the role switching control; step 1030, determines whether the user triggers the role switching control, and executes step 1040 in response to the user triggering the role switching control; step 1040, triggers the role screening module, that is, determines the second virtual character.
[0215] Schematically, please refer to Figure 11, which is a flow chart of a role screening module provided by an exemplary embodiment of the present application. As shown in Figure 11, the terminal executes step 1110 in sequence to determine whether there are multiple candidate virtual characters within the viewing angle range corresponding to the first viewing angle, and executes step 1120 in response to the existence of multiple candidate virtual characters, otherwise the candidate virtual character within the viewing angle range corresponding to the first viewing angle is directly determined as the second virtual character and step 1130 is executed; in step 1120, the indicator data is read, and the candidate virtual character whose indicator data reaches the first data threshold is determined as the second virtual character; in step 1130, the perspective conversion module and the role switching module are executed.
[0216] Schematically, please refer to Figure 12, which is a role switching flow chart provided by an exemplary embodiment of the present application. As shown in Figure 12, the terminal executes step 1210 in sequence to determine the second virtual character; step 1220, based on the role switching control, displays the role identifiers corresponding to the first virtual character and the second virtual character, as well as the countdown for successful role switching; step 1231, determines whether the duration of the role switching operation reaches the first duration threshold, and if so, executes step 1240; executes step 1232 in parallel with step 1231, calls the perspective conversion module to display the role switching animation; step 1240, determines whether the role switching animation has been played, and executes step 1250 in response to the completion of the role switching animation; step 1250, adjusts the first virtual character to the second state, and adjusts the second virtual character to the first state, wherein a preset program is enabled for the virtual character in the second state to automatically control the virtual character.
[0217] The virtual character switching method provided in the embodiment of the present application can achieve a smooth and natural character switching effect, and enhance the interactivity and immersion in the virtual character switching process. When the user performs a character switching operation, the game will automatically select the candidate virtual character within the viewing range of the first perspective, the closest distance and / or the highest health value to switch, and the perspective will smoothly switch from the first virtual character to the second virtual character, so that the user can better control and experience the multi-character game. At the same time, it provides more fault tolerance for user misoperation. If the duration of the character switching operation has not reached the first duration threshold, if the user stops clicking during the perspective switching process, the character switching process will be stopped immediately, and the current character and perspective will be maintained, providing a more flexible operation method.
[0218] FIG13 is a block diagram of a virtual character switching device provided by an exemplary embodiment of the present application. As shown in FIG13 , the device includes the following parts:
[0219] The display module 1310 is configured to display a first-perspective image, where the first-perspective image is an image of a virtual scene observed from a first perspective of a first virtual character, where the first virtual character is a master virtual character;
[0220] a switching module 1320 configured to present a role switching process from the first virtual character to the second virtual character in response to receiving a role switching operation, wherein the role switching operation is configured to switch the controlling virtual character from the first virtual character to the second virtual character, and wherein the role switching process includes a display process of an intermediate perspective, wherein the display process of the intermediate perspective corresponds to a process of transitioning from the first perspective to the second perspective;
[0221] The display module 1310 is further configured to display the second perspective image in response to the completion of the character switching process, where the second perspective image is an image of the virtual scene observed from the second perspective of the second virtual character.
[0222] Please refer to FIG14 , which is a structural block diagram of a virtual character switching device module provided by an exemplary embodiment of the present application. As shown in FIG14 , in some embodiments, the switching module 1320 includes:
[0223] The animation display unit 1321 is configured to, in response to receiving the role switching operation, synchronously display the role switching animation based on the duration of the role switching operation.
[0224] In some embodiments, the animation display unit 1321 is used to:
[0225] In response to receiving the continued role switching operation, synchronizing the role switching operation to continuously display the role switching animation;
[0226] In response to the duration of the role switching operation reaching a first duration threshold, the main virtual character is displayed as switching to the second virtual character; or, in response to the duration of the role switching operation being less than the first duration threshold when it is terminated, the role switching animation is stopped, and the first perspective screen is restored to be displayed, and the main virtual character is controlled to remain the first virtual character.
[0227] In some embodiments, the display module 1310 is further configured to display a role switching control when there is at least one candidate virtual character within the viewing angle range corresponding to the first viewing angle, wherein the role switching control is configured to receive the role switching operation.
[0228] In some embodiments, the role switching control corresponds to a first role identifier of a first virtual role; the display module 1310 is further configured to:
[0229] When the duration of the role switching operation is less than a first duration threshold, displaying a first countdown based on the first role identifier, the first countdown being used to indicate the remaining duration of the role switching operation when the controlling virtual character is switched from the first virtual character to the second virtual character;
[0230] When the duration of the character switching operation reaches a first duration threshold, a second character identifier corresponding to the second virtual character is displayed based on the character switching control; and a second countdown is displayed based on the second character identifier, wherein the second countdown is used to indicate the remaining time required for the current perspective screen to be converted to the second perspective screen.
[0231] In some embodiments, the animation display unit 1321 includes:
[0232] a route determination subunit 1301 for determining, in response to receiving the character switching operation, a perspective conversion route corresponding to the character switching animation based on a positional relationship between the first virtual character and the second virtual character;
[0233] a transition point determination subunit 1302, configured to determine a plurality of perspective transition points in the perspective conversion route according to a first interval threshold, wherein the perspective transition points are used to indicate intermediate perspectives for transitioning from the first perspective to the second perspective;
[0234] The animation display subunit 1303 is configured to display the character switching animation based on the multiple perspective transition points, wherein the character switching animation includes intermediate perspective images under intermediate perspectives corresponding to the multiple perspective transition points.
[0235] In some embodiments, the transition point determination subunit 1302 is configured to:
[0236] The plurality of perspective transition points are uniformly determined in the perspective conversion route according to a fixed first interval threshold, and the distances between the plurality of perspective transition points are the same; or
[0237] When the duration of the role switching operation is less than the first duration threshold, the multiple first perspective transition points are respectively determined in the perspective conversion route according to the decreasing first interval threshold, and the first perspective transition point is used to indicate the intermediate perspective of transitioning from the first perspective to the second perspective when the main virtual character remains the first virtual character; when the duration of the role switching operation reaches the first duration threshold, the multiple second perspective transition points are respectively determined in the perspective conversion route according to the increasing first interval threshold, and the second perspective transition point is used to indicate the intermediate perspective of transitioning from the first perspective to the second perspective when the main virtual character switches to the second virtual character.
[0238] In some embodiments, the apparatus further includes a role determination module 1330 configured to determine, based on the first perspective, the second virtual character in the virtual scene that meets a role switching condition.
[0239] In some embodiments, the role determination module 1330 includes:
[0240] A first determining unit 1331 is configured to determine the candidate virtual character as the second virtual character when there is only one candidate virtual character within the viewing angle range corresponding to the first viewing angle;
[0241] The second determining unit 1332 is configured to determine the second virtual character from among multiple candidate virtual characters based on the role switching condition when there are multiple candidate virtual characters within the viewing angle range corresponding to the first viewing angle.
[0242] In some embodiments, the second determining unit 1332 is configured to:
[0243] Determine, as the second virtual character, a candidate virtual character from the plurality of candidate virtual characters whose distance to the first virtual character is less than a first distance threshold;
[0244] When there are multiple candidate virtual characters whose distance from the first virtual character is less than the first distance threshold, the candidate virtual character whose indicator data reaches the first data threshold among the multiple candidate virtual characters is determined as the second virtual character, and the indicator data is data used to indicate the attributes of the candidate virtual character in the virtual scene.
[0245] In some embodiments, the role determination module 1330 further includes a category determination unit 1333 configured to:
[0246] Determining a scene category of the virtual scene, where the scene category is used to indicate a data type of the indicator data;
[0247] The indicator data is determined from a plurality of candidate indicator data corresponding to the virtual character based on the scene category; and a first data threshold corresponding to the indicator data is determined.
[0248] In some embodiments, the switching module 1320 is further configured to:
[0249] In response to the completion of the display of the perspective switching animation, determining the character state of the second virtual character to be a first state, the first state being used to indicate that the second virtual character is controlled by a main control operation of the terminal;
[0250] The character state of the first virtual character is determined to be a second state, where the second state is used to indicate that the first virtual character is stationary, or that the first virtual character is automatically controlled by a preset program.
[0251] It should be noted that the virtual character switching device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0252] Figure 15 shows a block diagram of a terminal 1500 according to an exemplary embodiment of the present application. Terminal 1500 may be a smartphone, tablet computer, MP3 player, MP4 player, laptop computer, or desktop computer. Terminal 1500 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other similar names.
[0253] Typically, the terminal 1500 includes a processor 1501 and a memory 1502 .
[0254] The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1501 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1501 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0255] Memory 1502 may include one or more computer-readable storage media, which may be non-transitory. In some embodiments, the non-transitory computer-readable storage medium in memory 1502 is used to store at least one instruction, which is executed by processor 1501 to implement the virtual character switching method provided in the method embodiment of the present application.
[0256] In some embodiments, the terminal 1500 also includes other components 1503. Those skilled in the art will understand that the structure shown in Figure 15 does not constitute a limitation on the terminal 1500, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0257] An embodiment of the present application further provides a computer device, which can be implemented as a terminal or server as shown in Figure 1. The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the virtual character switching method provided in each of the above method embodiments.
[0258] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the virtual character switching method provided by the above-mentioned method embodiments.
[0259] Embodiments of the present application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual character switching method provided in each of the above method embodiments.
[0260] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0261] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A virtual character switching method, executed by a computer device, comprising: Displaying a first perspective picture, wherein the first perspective picture is a picture of a virtual scene observed from a first perspective of a first virtual character, wherein the first virtual character is a master virtual character; In response to receiving a role switching operation, presenting a role switching process from the first virtual character to the second virtual character, wherein the role switching operation is used to switch the master virtual character from the first virtual character to the second virtual character, and the role switching process includes a display process of an intermediate perspective, wherein the display process of the intermediate perspective is a process corresponding to a transition from the first perspective to the second perspective; In response to the character switching process being completed, a second perspective picture is displayed, where the second perspective picture is a picture of observing the virtual scene through the second perspective of the second virtual character.
2. The method according to claim 1, wherein: In response to receiving the role switching operation, presenting a role switching process from the first virtual character to the second virtual character, comprising: In response to receiving the role switching operation, a role switching animation is displayed, wherein the role switching animation is used to show the role switching process, and the role switching animation includes an intermediate perspective picture, which is a picture corresponding to the intermediate perspective transitioning from the first perspective to the second perspective.
3. The method according to claim 1 or 2, wherein: In response to receiving the role switching operation, displaying the role switching animation comprises: In response to receiving the role switching operation, the role switching animation is synchronously displayed based on the duration of the role switching operation.
4. The method according to any one of claims 1 to 3, wherein: In response to receiving the role switching operation, synchronously displaying the role switching animation based on the duration of the role switching operation includes: In response to receiving the continuous role switching operation, continuously displaying the role switching animation in synchronization with the role switching operation; In response to the duration of the role switching operation reaching a first duration threshold, the main virtual character is displayed as switching to the second virtual character; or, in response to the duration of the role switching operation being less than the first duration threshold when it is terminated, the role switching animation is stopped, and the first perspective screen is restored to be displayed, and the main virtual character is controlled to remain the first virtual character.
5. The method according to any one of claims 1 to 4, wherein: In response to receiving the role switching operation, before displaying the role switching animation, the method further includes: In the case where there is at least one candidate virtual character within the viewing angle range corresponding to the first viewing angle, a role switching control is displayed, where the role switching control is used to receive the role switching operation.
6. The method according to any one of claims 1 to 5, wherein: The role switching control corresponds to a first role identifier of a first virtual role; the method further includes: When the duration of the role switching operation is less than a first duration threshold, displaying a first countdown based on the first role identifier, the first countdown being used to indicate the remaining duration of the role switching operation when the master virtual character is switched from the first virtual character to the second virtual character; When the duration of the character switching operation reaches a first duration threshold, a second character identifier corresponding to the second virtual character is displayed based on the character switching control; and a second countdown is displayed based on the second character identifier, wherein the second countdown is used to indicate the remaining time required for the current perspective screen to be converted to the second perspective screen.
7. The method according to any one of claims 1 to 6, wherein: In response to receiving the role switching operation, displaying the role switching animation comprises: In response to receiving the character switching operation, determining a perspective conversion route corresponding to the character switching animation based on a positional relationship between the first virtual character and the second virtual character; According to the first interval threshold, a plurality of perspective transition points are determined in the perspective conversion route, and the perspective transition points are used to indicate showing an intermediate perspective transitioning from the first perspective to the second perspective; The character switching animation is displayed based on the multiple perspective transition points, and the character switching animation includes an intermediate perspective picture under the intermediate perspectives corresponding to the multiple perspective transition points.
8. The method according to any one of claims 1 to 7, wherein: The step of determining a plurality of perspective transition points in the perspective conversion route according to the first interval threshold comprises: The plurality of perspective transition points are uniformly determined in the perspective conversion route according to a fixed first interval threshold, and the distances between the plurality of perspective transition points are the same; or When the duration of the role switching operation is less than a first duration threshold, the multiple first perspective transition points are respectively determined in the perspective conversion route according to a decreasing first interval threshold, and the first perspective transition point is used to indicate an intermediate perspective from the first perspective to the second perspective when the master virtual character remains the first virtual character; when the duration of the role switching operation reaches the first duration threshold, the multiple second perspective transition points are respectively determined in the perspective conversion route according to an increasing first interval threshold, and the second perspective transition point is used to indicate an intermediate perspective from the first perspective to the second perspective when the master virtual character switches to the second virtual character.
9. The method according to any one of claims 1 to 8, wherein: In response to receiving the role switching operation, before displaying the role switching animation, the method further includes: The second virtual character that meets the role switching condition in the virtual scene is determined based on the first viewing angle.
10. The method according to any one of claims 1 to 9, wherein: The determining, based on the first viewing angle, the second virtual character in the virtual scene that meets the role switching condition comprises: When there is only one candidate virtual character within the viewing angle range corresponding to the first viewing angle, the candidate virtual character is determined as the second virtual character; or, When there are a plurality of candidate virtual characters within the viewing angle range corresponding to the first viewing angle, the second virtual character is determined from the plurality of candidate virtual characters based on the role switching condition.
11. The method according to any one of claims 1 to 10, wherein: When there are a plurality of candidate virtual characters within the viewing angle range corresponding to the first viewing angle, determining the second virtual character from the plurality of candidate virtual characters based on the role switching condition comprises: Determine, as the second virtual character, a candidate virtual character whose distance from the first virtual character is less than a first distance threshold among the plurality of candidate virtual characters; When there are multiple candidate virtual characters whose distances from the first virtual character are less than the first distance threshold, the candidate virtual character whose indicator data reaches the first data threshold among the multiple candidate virtual characters is determined as the second virtual character, and the indicator data is data used to indicate the attributes of the candidate virtual character in the virtual scene.
12. The method according to any one of claims 1 to 11, wherein: Before determining the candidate virtual character whose indicator data reaches the first data threshold among the plurality of candidate virtual characters as the second virtual character, the method further includes: Determining a scene category of the virtual scene, wherein the scene category is used to indicate a data type of the indicator data; Determining the indicator data from a plurality of candidate indicator data corresponding to the virtual character based on the scene category; Determine a first data threshold corresponding to the indicator data.
13. The method according to any one of claims 1 to 12, wherein: The method further comprises: In response to the view switching animation being displayed, determining the character state of the second virtual character to be a first state, where the first state is used to indicate that the second virtual character is controlled by a main control operation of the terminal; The character state of the first virtual character is determined to be a second state, where the second state is used to indicate that the first virtual character is stationary, or that the first virtual character is automatically controlled by a preset program.
14. A virtual character switching device, the device comprising: A display module, configured to display a first perspective picture, wherein the first perspective picture is a picture of a virtual scene observed from a first perspective of a first virtual character, and the first virtual character is a master virtual character; A switching module is used for presenting a change from the first virtual character to the second virtual character in response to receiving a role switching operation. The role switching process is used to switch the master virtual character from the first virtual character to the second virtual character, and the role switching process includes a display process of an intermediate perspective, and the display process of the intermediate perspective is a process corresponding to the intermediate perspective transitioning from the first perspective to the second perspective; The display module is further configured to display a second perspective picture in response to completion of the character switching process, where the second perspective picture is a picture of observing the virtual scene through a second perspective of the second virtual character.
15. A computer device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the virtual character switching method according to any one of claims 1 to 13.
16. A computer-readable storage medium, wherein at least one computer program is stored in the storage medium, and the at least one computer program is loaded and executed by a processor to implement the virtual character switching method according to any one of claims 1 to 13.
17. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for switching virtual characters according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Multi-viewing-angle picture operating method and system and mobile terminal
CN106445380A
Picture display method and device, storage medium, computer program and electronic equipment
CN113730908A
Game picture display terminal device and method
CN115501584A
Virtual character control method and device, equipment, storage medium and program product
CN116943213A
Image processing apparatus, image processing system, image capturing system, image processing method
US20190295216A1