Virtual character switching method and device, equipment, storage medium and program product
By displaying the character switching animation during the virtual role switching process, including the transition from the first viewing angle screen to the second viewing angle screen, the problem of stiffness and low fault tolerance in the prior art is solved, and smoother interaction and higher efficiency are achieved.
Patent Information
- Application Number
- CN202311548128.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-20
AI Technical Summary
In the prior art, the virtual character switching process is relatively stiff, lacks coherence, and has low fault tolerance for player error touch switching operations, and has low human-computer interaction efficiency.
By displaying the character switching animation, the animation includes a conversion process of switching from the first viewing angle screen to the second viewing angle screen, and using the intermediate viewing angle screen to rotate from the first viewing angle to the second viewing angle, adding a transition process to make the character switching smoother.
It improves the smoothness of virtual role switching and human-computer interaction efficiency, and enhances the fault tolerance of wrong role switching operations.
Smart Images

Figure CN120019839A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of virtual scenarios, and particularly relates to a virtual character switching method, device, equipment, storage medium, and program product. Background Art
[0002] In some virtual games, when there are multiple virtual characters in the virtual game that can provide perspective views, the user can select a target virtual character through a switching operation, so as to display the perspective view corresponding to the target virtual character.
[0003] In the related art, character switching is usually achieved through simple key operations. When the user presses a specified key, the game character will immediately switch, and the perspective view will be simultaneously switched to the target character. 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 to switch the current game character to another character.
[0004] However, this process is usually completed instantaneously. The perspective switching process accompanying the character switching is relatively rigid, lacking coherence, and has a low tolerance for accidental touches of the switching operation by the player, resulting in low human-computer interaction efficiency. Summary of the Invention
[0005] Embodiments of this application provide a virtual character switching method, device, equipment, storage medium, and program product, which can improve the smoothness of virtual character switching and improve the human-computer interaction efficiency. The technical solutions are as follows.
[0006] On the one hand, a virtual character switching method is provided, and the method includes:
[0007] Display a first perspective view corresponding to a virtual scene, where the first perspective view corresponds to a first perspective of a first virtual character, and the first virtual character is the terminal master virtual character;
[0008] In response to receiving a character switching operation, display a character switching animation, where the character switching operation is used to switch the terminal master virtual character from the first virtual character to a second virtual character, the second perspective of the second virtual character corresponds to a second perspective view, the character switching animation includes an intermediate perspective view, the intermediate perspective view is the view corresponding to the intermediate perspective rotated from the first perspective to the second perspective, and the character switching animation includes a conversion process from the first perspective view to the second perspective view;
[0009] In response to the completion of the display of the character switching animation, display the second perspective view corresponding to the virtual scene.
[0010] On the other hand, a virtual character switching device is provided, and the device includes:
[0011] A display module for displaying a first perspective view corresponding to a virtual scene, the first perspective view corresponding to the first perspective of a first virtual character, and the first virtual character being the terminal master virtual character;
[0012] A switching module for, in response to receiving a character switching operation, displaying a character switching animation, the character switching operation being used to switch the terminal master virtual character from the first virtual character to a second virtual character, a second perspective of the second virtual character corresponding to a second perspective view, the character switching animation including an intermediate perspective view which is a view corresponding to an intermediate perspective rotated from the first perspective to the second perspective, and the character switching animation including a conversion process of switching from the first perspective view to the second perspective view;
[0013] The display module is further configured to, in response to the completion of the display of the character switching animation, display the second perspective view corresponding to the virtual scene.
[0014] On the other hand, a computer device is provided, the computer device including a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set being stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the virtual character switching method as described in any one of the embodiments of the present application above.
[0015] On the other hand, a computer-readable storage medium is provided, at least one instruction, at least one program, a code set or an instruction set being stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by a processor to implement the virtual character switching method as described in any one of the embodiments of the present application above.
[0016] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, and the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the virtual character switching method as described in any one of the above embodiments.
[0017] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:
[0018] By responding to the received character switching operation, a character switching animation is displayed, which includes a conversion process from the first perspective screen to the second perspective screen. In response to the completion of the display of the character switching animation, the second perspective screen corresponding to the virtual scene is displayed. During the switching process of the virtual character, based on the character switching operation, as the terminal master virtual character switches from the first virtual character to the second virtual character, an intermediate perspective screen corresponding to the intermediate perspective rotated from the first perspective to the second perspective is displayed, so as to increase the transition process from the first perspective screen to the second perspective screen, make the perspective switching process accompanied by the character switching smoother, improve the fault tolerance for incorrect character switching operations, and improve the human-computer interaction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0021] Figure 2 is a flowchart of a virtual character switching method provided by an exemplary embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a character switching animation provided by an exemplary embodiment of the present application;
[0023] Figure 4 is a flowchart of a character switching animation display method provided by an exemplary embodiment of the present application;
[0024] Figure 5 is a flowchart of a character switching control display method provided by an exemplary embodiment of the present application;
[0025] Figure 6 is a flowchart of a character switching animation display method provided by an exemplary embodiment of the present application;
[0026] Figure 7 is a flowchart of a second virtual character determination method provided by an exemplary embodiment of the present application;
[0027] Figure 8 is a schematic diagram of a second virtual character determination method provided by an exemplary embodiment of the present application;
[0028] Figure 9 is a schematic diagram of virtual character switching provided by an exemplary embodiment of the present application;
[0029] Figure 10 is a flowchart of a user - switchable role determination method provided by an exemplary embodiment of the present application;
[0030] Figure 11 is a flowchart of a role screening module provided by an exemplary embodiment of the present application;
[0031] Figure 12 is a flowchart of a role switch provided by an exemplary embodiment of the present application;
[0032] Figure 13 is a structural block diagram of a virtual - role switching device provided by an exemplary embodiment of the present application;
[0033] Figure 14 is a structural block diagram of a module of a virtual - role switching device provided by an exemplary embodiment of the present application;
[0034] Figure 15 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. Detailed implementation manners
[0035] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0036] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0037] In some virtual games, when there are multiple virtual characters that can provide perspective views in the virtual game, the user can select a target virtual character through a switching operation, so as to display the perspective view corresponding to the target virtual character. In the related art, role switching is usually achieved through simple key operations. When the user presses a specified key, the game character will immediately switch, and the perspective view will simultaneously switch to the target character. This role 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 role - switching function to switch the current game character to another character. However, this process is usually completed instantaneously. The perspective - switching process accompanying the role switching is relatively rigid, lacks coherence, has a low tolerance for the user's accidental touch of the switching operation, and has a low human - machine interaction efficiency.
[0038] In the embodiment of the present application, the virtual character switching method provides that, in response to receiving a character switching operation, a character switching animation is displayed. The character switching animation includes a conversion process from a first perspective view to a second perspective view. In response to the completion of the display of the character switching animation, the second perspective view corresponding to the virtual scene is displayed. During the switching process of the virtual character, based on the character switching operation, as the terminal master controls the virtual character to switch from the first virtual character to the second virtual character, an intermediate perspective view corresponding to the intermediate perspective rotated from the first perspective to the second perspective is displayed, so as to increase the transition process from the first perspective view to the second perspective view, make the perspective switching process accompanied by the character switching smoother, improve the fault tolerance for incorrect character switching operations, and improve the human-computer interaction efficiency.
[0039] First, a brief introduction is made to the nouns involved in the embodiment of the present application:
[0040] Virtual scene: It is a virtual scene displayed (or provided) when the application program runs on the terminal. The virtual scene can be a simulation world 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.5D virtual scene, and a three-dimensional virtual scene. Optionally, the virtual scene is also used for virtual games between at least two virtual characters, and there are virtual resources available for at least two virtual characters in the virtual scene.
[0041] Virtual Character: It refers to movable and immovable objects in a virtual scene. The movable object can be at least one of a virtual human, a virtual animal, and an anime character. The immovable object can be at least one of a virtual building, a virtual plant, and a virtual terrain. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual character can be a three-dimensional virtual model, and each virtual character has its own shape and volume in the three-dimensional virtual scene, occupying a part of the space in the three-dimensional virtual scene. The activities of the virtual character include, but are not limited to, at least one of adjusting body posture, crawling, walking, running, cycling, flying, jumping, driving, picking up, shooting, attacking, and throwing. Optionally, the virtual character is a three-dimensional character constructed based on three-dimensional human skeleton technology, and the virtual character realizes different external images by wearing different skins. In some implementation manners, the virtual character can also be implemented using a 2.5D or 2D model, and the embodiments of the present application do not limit this. Exemplarily, according to different ways of controlling the virtual character, the virtual character can be divided into a user-controlled virtual character and a server-controlled virtual character. Among them, the user-controlled virtual character is an object that can be active in the virtual scene controlled by the client. The server-controlled virtual character is a virtual character controlled by an automatic control algorithm or an artificial intelligence program on the client or the server. The server-controlled virtual character includes movable and immovable objects in the virtual scene. Exemplarily, the immovable object can respond to or affect the activities of the movable object. For example, the movable object can destroy the immovable object, or when the movable object enters the immovable object, the movable object enters an invisible state. Exemplarily, the virtual character in the present application is a virtual character controlled by the client.
[0042] Virtual Element: It refers to various elements that appear in the virtual world and are used to constitute the entire virtual world. Virtual elements include plots, lakes, skies, various virtual animals, various virtual plants, various virtual buildings, various virtual props, etc. The virtual character controlled by the player also belongs to one of the virtual elements.
[0043] Please refer to Figure 1 , 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.
[0044] In some embodiments, a target application is installed and run on the terminal 110, where the target application is an application capable of virtual character switching. The target application may be any one of a virtual reality application, a three-dimensional map program, a strategy game, a Third-Person Shooting game (TPS), a First-Person Shooting game (FPS), a Multiplayer Online Battle Arena Games (MOBA), a Multiplayer Online Role-Playing Game (MMORPG), a multiplayer gunfight survival game, and a multiplayer survival competition game. The embodiments of the present application do not limit this.
[0045] Among them, the virtual scene is the scene displayed (or provided) when the client of the target application (such as a game application) runs 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 virtual houses, virtual islands, virtual maps, etc. Optionally, the virtual scene is the environment displayed (or provided) when the application runs on the terminal device. The virtual scene may be a simulated world of the real world, a semi-simulated and semi-fictional three-dimensional world, or a purely fictional three-dimensional world. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5D virtual scene, and a three-dimensional virtual scene. Optionally, the virtual scene is also used for virtual scene battles between at least two virtual characters, and there are virtual resources available for at least two virtual characters in the virtual scene.
[0046] The above virtual characters refer to virtual characters, virtual vehicles, virtual items, etc. controlled by a user account in a target application, which are not limited in this application. Taking the target application as a game application as an example, the virtual character refers to the 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, which are not limited in the embodiments of this application. The virtual character can be displayed in a three-dimensional form or a two-dimensional form, which are not limited in the embodiments of this application. Exemplarily, according to different ways of controlling the virtual character, the virtual character can be divided into a virtual character controlled by the user and a virtual character controlled by the server. Among them, the virtual character controlled by the user is an object that can move in the virtual scene controlled by the client. The virtual character controlled by the server is a virtual character controlled by an automatic control algorithm or an artificial intelligence program on the client or the server. The virtual characters controlled by the server include movable objects and immovable objects in the virtual scene. Exemplarily, the first virtual character and the second virtual character in this 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 a 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 a user operation, the first virtual character is a virtual character automatically controlled by the client based on artificial intelligence.
[0047] In some embodiments, the terminal 110 displays a first perspective view corresponding to the virtual scene. The first perspective view corresponds to the first perspective of the first virtual character, and the first virtual character is the virtual character master-controlled by the terminal; in response to receiving a character switching operation, a character switching animation is displayed. The character switching operation is used to switch the virtual character master-controlled by the terminal from the first virtual character to the second virtual character. The second perspective of the second virtual character corresponds to the second perspective view. The character switching animation includes an intermediate perspective view, which is the view corresponding to the intermediate perspective rotated from the first perspective to the second perspective. The character switching animation includes the conversion process of switching from the first perspective view to the second perspective view; in response to the completion of the display of the character switching animation, the second perspective view corresponding to the virtual scene is displayed.
[0048] In some embodiments, the implementation environment further includes a server 120 and a communication network 130.
[0049] The terminal 110 and the server 120 perform data transmission through the communication network 130. Among them, the terminal 110 is used to run the target application, and the server 120 is used to provide the background service of the target application to the terminal 110.
[0050] In some embodiments, the terminal 110 displays a first perspective view corresponding to a virtual scene, where the first perspective view corresponds to the first perspective of a first virtual character, and the first virtual character is the master virtual character of the terminal. In response to receiving a character switching operation, the terminal 110 sends a character switching request to the server 120. The server 120 sends a request feedback to the terminal 110 based on the character switching request. The terminal 110 displays a character switching animation based on the request feedback. The character switching operation is used to switch the master virtual character of the terminal from the first virtual character to a second virtual character. The second perspective of the second virtual character corresponds to a second perspective view. The character switching animation includes an intermediate perspective view, which is the view corresponding to the intermediate perspective rotated from the first perspective to the second perspective. The character switching animation includes the conversion process of switching from the first perspective view to the second perspective view. In response to the completion of the display of the character switching animation, the terminal 110 displays the second perspective view corresponding to the virtual scene.
[0051] Optionally, the target application can be a cloud game application. The server 120 is used to run the target application, and the terminal 110 is used to display the program screen corresponding to the target application.
[0052] In some embodiments, the server 120 logs in to the target application based on the terminal 110. In response to the master virtual character of the terminal 110 being the first virtual character, the server 120 renders the first perspective view corresponding to the virtual scene, obtains a first rendering result, and sends it to the terminal 110. The terminal 110 displays the first perspective view based on the received first rendering result. In response to receiving a character switching operation, the terminal 110 sends the operation data corresponding to the character switching operation to the server 120. The server 120 renders a character switching animation based on the operation data, obtains a second rendering result, and sends it to the terminal 110. The terminal 110 displays the character switching animation based on the second rendering result. The server 120 renders the second perspective view based on the above operation data, obtains a third rendering result, and sends it to the terminal 110. In response to the completion of the display of the character switching animation, the terminal 110 displays the second perspective view based on the third rendering result.
[0053] The above terminal is optional. The terminal can be various forms of terminal devices such as 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 vehicle, etc. The embodiments of the present application do not limit this.
[0054] It should be noted that the above server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0055] Among them, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.
[0056] In some embodiments, the above server can also be implemented as a node in a blockchain system.
[0057] 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 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 need to comply with the relevant laws, regulations, and standards in the relevant region. For example, the operation data and account information involved in this application are obtained under full authorization.
[0058] For further explanation, before and during the collection of the user's relevant data (for example: the account information, operation data, etc. involved in this application), a prompt interface, pop-up window, or voice prompt message can be displayed. The prompt interface, pop-up window, or voice prompt message is used to prompt the user that their relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant 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 the user's relevant data are ended, that is, the user's relevant data is not obtained. In other words, all user data collected in this application is 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 in the relevant region.
[0059] Schematically, please refer to Figure 2 , which shows a flowchart of a virtual character switching method provided by an exemplary embodiment of this application. This method can be executed by a terminal, or by a server, or jointly by a terminal and a server. In this application embodiment, it is described by taking this method being executed by a terminal as an example, as Figure 2As shown, the method includes the following steps:
[0060] Step 210, display the first - perspective view corresponding to the virtual scene.
[0061] Among them, the first - perspective view corresponds to the first perspective of the first virtual character, and the first virtual character is the terminal - master virtual character.
[0062] The virtual scene is a scene provided by the target application in the terminal during rendering at runtime. The virtual scene includes multiple virtual characters, and among the multiple virtual characters, there is a first virtual character, which is the terminal - master virtual character. The terminal - master virtual character refers to the virtual character controlled by the first account corresponding to the terminal.
[0063] Optionally, the role states of the virtual characters in the virtual scene include a controllable state and an uncontrollable state. Among them, the controllable state is used to indicate that the virtual character belongs to the candidate virtual characters, and the candidate virtual characters can be determined as the terminal - master virtual character; the uncontrollable state is used to indicate that the virtual character does not belong to the candidate virtual characters, for example, the virtual characters controlled by the server or other terminals.
[0064] The controllable state and the uncontrollable state of the virtual characters in the virtual scene can be pre - configured by the target application or configured by the user.
[0065] In some embodiments, the controllable state and the uncontrollable state 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 belong to the controllable state, and the virtual characters in other camps belong to the uncontrollable state.
[0066] The above - mentioned terminal - master virtual character can be any one of multiple candidate virtual characters. The terminal - master virtual character can be preset by the target application based on multiple candidate virtual characters or selected by the user from multiple candidate virtual characters. The terminal - master virtual character is switchable, that is, the terminal - master virtual character can be switched from one of the multiple candidate virtual characters to another candidate virtual character.
[0067] For the candidate virtual characters belonging to the controllable state, the role states include an active state and an inactive state. Among them, the active state is used to indicate that the candidate virtual character is determined as the terminal - master virtual character, and the inactive state is used to indicate that the candidate virtual character currently does not belong to the terminal - master virtual character.
[0068] Optionally, the terminal - master virtual character can be a virtual character actively controlled by the user based on the user's operation by the terminal, or a virtual character automatically controlled by the terminal based on a preset program such as artificial intelligence, etc.
[0069] Schematically, a virtual scene includes multiple candidate virtual characters, among which there are a first virtual character and a second virtual character. Assuming the first virtual character is the terminal master virtual character, the terminal master virtual character can be switched to the second virtual character. When the first virtual character is the terminal master virtual character, the first virtual character is in an active state and is actively controlled by the user, while the second virtual character is in an inactive state and is automatically controlled by a preset program; when the terminal master virtual character is switched to the second virtual character, the first virtual character is adjusted to an inactive state and is automatically controlled by a preset program, and the second virtual character is adjusted to an active state and is actively controlled by the user.
[0070] In some embodiments, the terminal displays the virtual scene picture corresponding to the perspective of the master virtual character. When the terminal master virtual character is the first virtual character, the first perspective picture is displayed.
[0071] Optionally, the first perspective corresponding to the first virtual character can be a first-person perspective (First-person Perspective, FPV), a second-person perspective (Second-person Perspective, 2PV), a third-person perspective (Third-person Perspective, 3PV), or any other perspective corresponding to the first virtual character. In the embodiments of the present application, the third-person perspective is taken as an example for illustration.
[0072] Step 220, in response to receiving a character switching operation, display a character switching animation.
[0073] Among them, the character switching operation is used to switch the terminal master virtual character from the first virtual character to the second virtual character. The second perspective of the second virtual character corresponds to the second perspective picture. The character switching animation includes an intermediate perspective picture, which is the picture corresponding to the intermediate perspective rotated from the first perspective to the second perspective. The character switching animation includes the conversion process from the first perspective picture to the second perspective picture.
[0074] Optionally, the character switching operation can be a long-press operation, a continuous click operation, a continuous shaking operation, etc., which require consuming a preset duration threshold to complete the character switching. In the embodiments of the present application, the long-press operation is taken as an example for illustration. When the duration of the character switching operation reaches the preset duration threshold, the terminal master virtual character is switched from the first virtual character to the second virtual character, and the character switching is considered successful.
[0075] In some embodiments, the character switching animation is synchronously displayed based on the duration of the character switching operation.
[0076] Optionally, in response to receiving a continuous role switching operation, continuously display a color switching animation synchronously with the role switching operation; when the duration of the role switching operation reaches a preset duration threshold, display that the terminal master virtual role switches to the second virtual role; or, in response to the duration of the role switching operation being less than the preset duration threshold when it terminates, stop displaying the role switching animation and resume displaying the first perspective view, and the terminal master virtual role remains the first virtual role.
[0077] Wherein, the preset duration threshold is used to indicate the duration required for the role switching operation to switch the master virtual role from the first virtual role to the second virtual role.
[0078] In some embodiments, it is necessary to determine the intermediate perspective view in the role switching animation, and step 220 is implemented as the following three steps:
[0079] First step, in response to receiving a role switching operation, determine the perspective conversion route corresponding to the role switching animation based on the first virtual role and the second virtual role.
[0080] Wherein, the perspective conversion route is used to determine the intermediate perspective.
[0081] In some embodiments, the perspective conversion route is the connection line between the perspective point corresponding to the first perspective and the perspective point corresponding to the second perspective. Optionally, the connection line can be a straight line or a curve.
[0082] Illustratively, taking the perspective point being implemented as the center point of the virtual role as an example, if the perspective conversion route is implemented as a straight line, determine the line segment between the first center point corresponding to the first virtual role and the second center point corresponding to the second virtual role as the perspective conversion route; if the perspective conversion route is implemented as a curve, taking a semi-circular arc line as an example, take the midpoint of the above line segment as the center of the sphere and half of the length of the line segment as the radius, and determine any semi-circular arc line from the first center point to the second center point in the sphere as the perspective conversion route.
[0083] It should be noted that the above determination method of the perspective conversion route is only an exemplary example, and the present application does not limit this.
[0084] Second step, determine multiple perspective transition points in the perspective conversion route according to a preset interval threshold.
[0085] Wherein, the perspective transition point is used to indicate the intermediate perspective for rotating from the first perspective to the second perspective.
[0086] Optionally, the distances between multiple perspective transition points can be the same or different.
[0087] Third step, display the role switching animation based on multiple perspective transition points.
[0088] Among them, the character switching animation includes intermediate perspective images in the intermediate perspectives corresponding to multiple perspective transition points.
[0089] Schematically, please refer to Figure 3 , Figure 3 which is a schematic diagram of a character switching animation provided by an exemplary embodiment of the present application. As Figure 3 shown, the terminal displays a first perspective image 310. In response to receiving a character switching operation, it displays a character switching animation, which includes an intermediate perspective image 321 and an intermediate perspective image 322. In response to the completion of the display of the character switching animation, it displays a second perspective image 330.
[0090] In some embodiments, when there is at least one candidate character within the perspective range corresponding to the first perspective, a character switching operation is received.
[0091] Before playing the character switching animation, in response to receiving the character switching operation, a second virtual character that meets the character switching conditions in the virtual scene is determined based on the first perspective.
[0092] Optionally, the determination method of the second virtual character includes the following two cases:
[0093] First, when there is only one candidate virtual character within the perspective range corresponding to the first perspective, the candidate virtual character is determined as the second virtual character.
[0094] Second, when there are multiple candidate virtual characters within the perspective range corresponding to the first perspective, the second virtual character is determined from the multiple candidate virtual characters based on the character switching conditions.
[0095] In some embodiments, when there are multiple candidate virtual characters within the perspective range corresponding to the first perspective, the second virtual character is determined based on the distance between the candidate virtual character and the first virtual character.
[0096] Schematically, the candidate virtual character whose distance from the first virtual character among the multiple candidate virtual characters is less than a preset distance threshold is determined as the second virtual character; when there are multiple candidate virtual characters whose distances from the first virtual character are less than the preset distance threshold, the candidate virtual character whose index data reaches the preset data threshold among the multiple candidate virtual characters is determined as the second virtual character.
[0097] In some embodiments, before determining the second virtual character based on the index data, it is necessary to determine the data type of the index data and the corresponding preset data threshold, and the data type and the preset data threshold are determined based on the scene category of the virtual scene.
[0098] Schematically, when the scene category of the virtual scene belongs to a virtual combat scene, the combat power (including attack power, defense power, etc.) of the virtual character is determined as the index 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 index 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 index data, etc.
[0099] Step 230, in response to the completion of the display of the character switching animation, display the second perspective view corresponding to the virtual scene.
[0100] The second perspective view is the virtual scene view corresponding to the second perspective of the second virtual character.
[0101] 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 embodiments of the present application, the third-person perspective is taken as an example for illustration.
[0102] In some embodiments, the current master virtual character is the second virtual character, and the perspective view follows the second virtual character, that is, the perspective view is the second perspective view.
[0103] In some embodiments, in response to the completion of the display of the character switching animation, the character state of the second virtual character is adjusted to the active state.
[0104] Determine the character state of the candidate virtual character in the virtual scene according to the terminal master virtual character. Optionally, the character state includes an active state and an inactive state, where the active state is used to indicate that the candidate virtual character is determined as the terminal master virtual character, and the inactive state is used to indicate that the candidate virtual character does not currently belong to the terminal master virtual character.
[0105] In some embodiments, in response to the completion of the display of the character switching animation, the character state of the second virtual character is determined as the active state, and the active state is used to indicate that the second virtual character is controlled by the master operation of the terminal; the character state of the first virtual character is determined as the inactive state, and the inactive state is used to indicate that the first virtual character is stationary, or the first virtual character is automatically controlled by a preset program.
[0106] In summary, the method provided by the embodiments of the present application displays a character switching animation in response to receiving a character switching operation. The character switching animation includes a conversion process from a first perspective view to a second perspective view. In response to the completion of the display of the character switching animation, the second perspective view corresponding to the virtual scene is displayed. During the switching process of the virtual character, based on the character switching operation, as the terminal master virtual character switches from the first virtual character to the second virtual character, the intermediate perspective view corresponding to the intermediate perspective rotated from the first perspective to the second perspective is displayed, so as to increase the transition process from the first perspective view to the second perspective view, make the perspective switching process accompanied by the character switching smoother, improve the fault tolerance for incorrect character switching operations, and improve the human-computer interaction efficiency.
[0107] The method provided by the embodiments of the present application adjusts the character state of the virtual character in response to the completion of the display of the character switching animation, adjusts the second virtual character to the active state, and adjusts the first virtual character to the inactive state, realizing the actual switching of the terminal master virtual character in the background. And by adjusting the first virtual character to the inactive state, it can be automatically controlled by a preset program, increasing the flexibility of controlling multiple virtual characters in the virtual scene.
[0108] In some embodiments, step 220 is implemented as follows: in response to receiving a character switching operation, a character switching animation is displayed based on the duration of the character switching operation. When the character switching animation is synchronously displayed based on the duration of the character switching operation, the terminal determines the current terminal master virtual character according to the duration of the character switching operation. Schematically, please refer to Figure 4 , which shows a flowchart of a method for displaying a character switching animation provided by an exemplary embodiment of the present application. This method can be executed by the terminal, or by the server, or jointly executed by the terminal and the server at the same time. In the embodiments of the present application, this method is described by taking the execution by the terminal as an example. As Figure 4 shown, this method includes the following steps:
[0109] Step 410, display the first perspective view corresponding to the virtual scene.
[0110] Among them, the first perspective view corresponds to the first perspective of the first virtual character, and the first virtual character is the terminal master virtual character.
[0111] In some embodiments, step 410 is implemented as step 210 above.
[0112] Step 420, in response to receiving a continuous character switching operation, continuously display a character switching animation in synchronization with the character switching operation.
[0113] In some embodiments, after the duration of the role switching operation reaches a preset duration threshold, if the current perspective has not rotated to the second perspective and the user stops the role switching operation, the role switching animation will continue to be automatically displayed until the role switching animation is displayed completely.
[0114] In some embodiments, when the duration at the termination of the role switching operation is less than the preset duration threshold, the role switching fails, and the camera position needs to be restored to the position corresponding to the first perspective and move again following the movement of the first perspective of the first virtual character.
[0115] The above preset duration threshold is used to indicate the duration required for the role switching operation of switching the master virtual character from the first virtual character to the second virtual character.
[0116] Step 431, in response to the duration at the termination of the role switching operation being less than the preset duration threshold, stop displaying the role switching animation and resume displaying the first perspective screen.
[0117] Among them, the terminal master virtual character remains the first virtual character.
[0118] The preset duration threshold is used to indicate the duration required for the role switching operation of switching the master virtual character from the first virtual character to the second virtual character.
[0119] In some embodiments, in response to the duration at the termination of the role switching operation being less than the preset duration threshold, the role switching fails, and the terminal ends the current role switching process by stopping displaying the role switching animation and resuming displaying the first perspective screen.
[0120] Optionally, when the terminal stops displaying the role switching animation, the first perspective screen can be restored by directly resetting the camera position to the position corresponding to the first perspective, or the first perspective screen can be restored by displaying a role restoration animation, where the role restoration animation includes the screen corresponding to the intermediate perspective rotated back from the current perspective to the first perspective.
[0121] Step 432, when the duration of the role switching operation reaches the preset duration threshold, display that the terminal master virtual character is switched to the second virtual character.
[0122] In some embodiments, when the duration of the role switching operation reaches the preset duration threshold, the role switching is successful, and the terminal displays that the terminal master virtual character is switched to the second virtual character by displaying the second character identifier corresponding to the second virtual character, and this second character identifier is used to indicate that the current terminal master virtual character is the second virtual character.
[0123] Optionally, the role switching operation can be a long - press operation, a continuous click operation, a continuous shaking operation, etc.
[0124] In the embodiments of the present application, the long - press operation is taken as an example for illustration. When the duration of the role - switching operation is less than the preset duration threshold at the end of the role - switching operation, the terminal main - controlled virtual role remains the first virtual role, and the role - switching is regarded as failed. When the duration of the role - switching operation reaches the preset duration threshold, the terminal main - controlled virtual role is switched to the second virtual role, and the role - switching is regarded as successful.
[0125] In some embodiments, through the user input detection module, the input of the user is detected. When the user triggers a role - switching operation, the user input detection module continuously detects the role - switching operation and triggers the role - switching process. When the user input detection module detects that the duration of the role - switching operation is less than the preset duration threshold, the role - switching process is terminated, and the terminal main - controlled virtual role remains the first virtual role. When the user input detection module detects that the duration of the role - switching operation reaches the preset duration threshold, the terminal main - controlled virtual role is switched to the second virtual role through the role - switching module, that is, the first virtual role is adjusted to the inactive state and the second virtual role is adjusted to the active state through the role - switching module.
[0126] Among them, the inactive state is used to indicate that the virtual role is not the current terminal main - controlled virtual role, and the active state is used to indicate that the virtual role is the current terminal main - controlled virtual role.
[0127] Step 440, in response to the completion of the display of the role - switching animation, display the second - perspective view of the virtual scene.
[0128] The second - perspective view is the virtual scene view corresponding to the second perspective of the second virtual role.
[0129] In some embodiments, step 440 is implemented as the above - mentioned step 230.
[0130] In summary, the method provided by the embodiments of the present application synchronizes the display of the role - switching animation based on the duration of the role - switching operation, increasing the interactivity between the display of the role - switching animation and the user operation during the role - switching process.
[0131] The method provided by the embodiments of the present application determines whether the role switching is successful according to whether the duration of the role switching operation reaches a preset duration threshold, and provides two ways to display the role switching animation. By responding to the received continuous role switching operation, the role switching animation is continuously displayed synchronously with the role switching operation. When the duration of the role switching operation reaches the preset duration threshold, it is displayed that the terminal master virtual role switches to the second virtual role, avoiding the situation that the user stops the role switching operation due to misoperation and causes the role switching to fail and the second perspective screen cannot be displayed. By responding to the received duration of the role switching operation being less than the preset duration threshold when the role switching operation terminates, the display of the role switching animation is stopped and the display of the first perspective screen is restored, avoiding the situation that the user triggers the role switching operation due to misoperation and performs role switching without the need for role switching, wasting computing resources. At the same time, the user can give up or continue the role switching operation in real time according to the actual situation, providing more fault tolerance space for the user's misoperation of role switching, improving the flexibility of virtual role switching, and thus improving the human-computer interaction efficiency.
[0132] In some embodiments, the role switching operation is received through a role switching control. Before the above step 220, the display process of the role switching control is further included. Please refer to Figure 5 , which shows the flowchart of the method for displaying the role switching control provided by an exemplary embodiment of the present application. This method can be executed by the terminal, or by the server, or jointly executed by the terminal and the server at the same time. In the embodiments of the present application, this method is described by taking the example that it is executed by the terminal. As Figure 5 shown, before the above step 220, the following steps are included:
[0133] Step 510, when there is at least one candidate virtual role within the perspective range corresponding to the first perspective, display the role switching control.
[0134] Among them, the role switching control is used to receive the role switching operation.
[0135] Optionally, the role switching control can be fixedly displayed or dynamically displayed according to the situation of the candidate virtual roles. Taking the dynamic display as an example, when there is at least one candidate virtual role within the perspective range corresponding to the first perspective, the terminal master virtual role can switch from the first virtual role to other candidate virtual roles. By displaying the role switching control, the user is explicitly reminded that the role switching operation can be performed.
[0136] In some embodiments, the role switching control corresponds to the role identifier of the first virtual role, and this role identifier is used to indicate that the current terminal master virtual role is the first virtual role.
[0137] In some embodiments, the viewing range corresponding to the first viewing angle is used to indicate candidate virtual characters in the first-viewing-angle screen whose distance from the first virtual character is less than a preset distance threshold.
[0138] Schematically, the Euclidean distance is used to determine the distance between the first virtual character and other candidate virtual characters. Taking a two-dimensional space as an example, assume that the position coordinates corresponding to the first virtual character are (x 1 , y 1 ), and the position coordinates of the second virtual character are (x 2 , y 2 ). Then, the method for determining the distance between the first virtual character and the second virtual character can be referred to the following formula:
[0139] s = sqrt((x 1 - x 2 ) 2 + (y 1 - y 2 ) 2 ),
[0140] where s is used to indicate the distance between the first virtual character and the second virtual character.
[0141] In some embodiments, when the distance between a virtual character and the first virtual character in the first-viewing-angle screen is less than the preset distance threshold, the virtual character is determined as a candidate virtual character.
[0142] In some embodiments, based on the duration of the role-switching operation, a role-switching control is displayed. After the above step 510, the following two steps are further included:
[0143] First step, when the duration of the role-switching operation is less than a preset duration threshold, a first countdown is displayed based on the first role identifier.
[0144] Wherein, the first countdown is used to indicate the remaining duration required for the role-switching operation when switching the terminal main control virtual character from the first virtual character to the second virtual character.
[0145] When the duration of the role-switching operation is less than the preset duration threshold, the terminal main control virtual character remains the first virtual character.
[0146] Denote the moment when the role-switching operation is triggered as the first moment, and denote the moment obtained by pushing the first moment backward by the preset duration threshold as the second moment. If the current moment is between the first moment and the second moment, the first countdown is used to indicate the time interval between the current moment and the second moment.
[0147] Second step, when the duration of the role switching operation reaches a preset duration threshold, based on the role switching control, display the second role identifier corresponding to the second virtual role and display a second countdown based on the second role identifier.
[0148] Wherein, the second countdown is used to indicate the remaining duration required for the current perspective screen to switch to the second perspective screen.
[0149] When the duration of the role switching operation reaches a preset duration threshold, the terminal master virtual role switches to the second virtual role.
[0150] Only the role switching control corresponding to the second role identifier is used to receive the role switching operation for switching the terminal master virtual role from the second virtual role to other candidate virtual roles, and the second role identifier is used to indicate that the current terminal master virtual role is the second virtual role.
[0151] Denote the moment when the duration of the role switching operation reaches the preset duration threshold as the first moment, and the moment when the role switching animation is displayed completely as the second moment. If the current moment is between the first moment and the second moment, then the first countdown is used to indicate the time interval between the current moment and the second moment.
[0152] In summary, in the method provided by the embodiments of the present application, when there is at least one candidate virtual role within the perspective range corresponding to the first perspective, a role switching control is displayed, and in a dynamic display manner, the user can be timely and explicitly prompted that a role switching operation can be performed, and an additional prompt element is used to implement the prompt function, saving rendering resources, further avoiding misoperations for role switching, and improving the human-computer interaction efficiency.
[0153] In the method provided by the embodiments of the present application, when the duration of the role switching operation is less than the preset duration threshold, a first countdown is displayed based on the first role identifier to prompt the remaining duration required for the role switching operation when the user switches the terminal master virtual role from the first virtual role to the second virtual role, avoiding the situation where the user fails to switch or cannot give up the switch in time due to being unable to accurately know whether the switch is successful, further improving the fault tolerance rate for misoperations, and when the duration of the role switching operation reaches the preset duration threshold, the second role identifier corresponding to the second virtual role is displayed, explicitly prompting the user that the current master virtual role has been switched to the second virtual role, improving the human-computer interaction efficiency.
[0154] In some embodiments, to display the role switching animation through an explicit intermediate perspective screen, it is necessary to determine the intermediate perspective screen in the role switching animation. Please refer to Figure 6 , Figure 6The flowchart of the role switching animation display method provided by an exemplary embodiment of the present application. This method can be executed by a terminal, or by a server, or jointly by a terminal and a server. In the embodiments of the present application, it is described by taking the execution of this method by the terminal as an example. As Figure 6 shown, step 220 above includes the following steps:
[0155] Step 221, in response to receiving a role switching operation, determine a perspective conversion route corresponding to the role switching animation based on the first virtual role and the second virtual role.
[0156] In some embodiments, the perspective conversion route is a connection line between the perspective point corresponding to the first perspective and the perspective point corresponding to the second perspective. Optionally, the connection line can be a straight line or a curve.
[0157] Schematically, taking the perspective point being implemented as the center point of the virtual role as an example, if the perspective conversion route is implemented as a straight line, determine the line segment between the first center point corresponding to the first virtual role and the second center point corresponding to the second virtual role as the perspective conversion route; if the perspective conversion route is implemented as a curve, taking a semi-circular arc line as an example, take the midpoint of the above line segment as the center of the sphere and half of the length of the line segment as the radius, and determine any semi-circular arc line from the first center point to the second center point in the sphere as the perspective conversion route.
[0158] It should be noted that the above determination method of the perspective conversion route is only an exemplary example, and the present application does not limit this.
[0159] Step 222, determine multiple perspective transition points in the perspective conversion route according to a preset interval threshold.
[0160] Among them, the perspective transition point is used to indicate the intermediate perspective when rotating from the first perspective to the second perspective.
[0161] Optionally, the determination method of the perspective transition point includes at least the following two methods:
[0162] The first one is to evenly determine multiple perspective transition points in the perspective conversion route according to a fixed preset interval threshold.
[0163] Among them, the distances between multiple perspective transition points are the same.
[0164] The second one is that when the duration of the role switching operation is less than the preset duration threshold, determine multiple first perspective transition points in the perspective conversion route according to a decreasing preset interval threshold; when the duration of the role switching operation reaches the preset duration threshold, determine multiple second perspective transition points in the perspective conversion route according to an increasing preset interval threshold.
[0165] Among them, the first - perspective transition point is used to indicate the intermediate perspective when rotating from the first perspective to the second perspective while the master 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 while the master virtual character switches to the second virtual character.
[0166] In some embodiments, the number of perspective transition points is determined according to the frame rate of the terminal.
[0167] Illustratively, in the embodiments of the present application, the interpolation method is used to determine the perspective transition points, and the perspective transition points are implemented as the lens positions corresponding to the intermediate perspectives. Assume that the first perspective corresponds to the lens position A and the second perspective corresponds to the lens position B. The perspective transition points corresponding to each frame are determined by linear interpolation. Taking the frame rate of the terminal as 60 frames per second as an example, the determination method of the perspective transition point corresponding to the nth frame is as follows:
[0168]
[0169] Among them, C is the lens position indicated by the perspective transition point of the nth frame, and n is a positive integer.
[0170] Step 223, display the character - switching animation based on multiple perspective transition points.
[0171] Among them, the character - switching animation includes the intermediate - perspective pictures in the intermediate perspectives corresponding to multiple perspective transition points.
[0172] Illustratively, as Figure 3 shown, the terminal displays the first - perspective picture 310. In response to receiving the character - switching operation, it displays the character - switching animation, which includes the intermediate - perspective picture 321 and the intermediate - perspective picture 322. In response to the completion of the display of the character - switching animation, it displays the second - perspective picture 330.
[0173] In summary, the method provided by the embodiments of the present application determines the perspective - conversion route, determines multiple perspective transition points in the perspective - conversion route according to the preset interval threshold, and displays the character - switching animation based on multiple perspective transition points, clarifying the display method of the character - switching animation. By using the perspective transition points on the perspective - conversion route as the intermediate perspectives to determine the intermediate - perspective pictures, the transition pictures during the virtual - character switching process are increased, making the character - switching animation smoother and more fluent.
[0174] The method provided by the embodiments of the present application provides various schemes for determining perspective transition points. By uniformly determining multiple perspective transition points in the perspective conversion route according to a fixed preset interval threshold, the distances between the perspective transition points are the same, that is, the camera position is moved at a uniform speed during the display of the perspective switching animation, making the change process of the picture smooth and fluent; when the duration of the character switching operation is less than the preset duration threshold, multiple first perspective transition points are respectively determined in the perspective conversion route according to a decreasing preset interval threshold; when the duration of the character switching operation reaches the preset duration threshold, multiple second perspective transition points are respectively determined in the perspective conversion route according to an increasing preset interval threshold. By determining perspective transition points with different preset interval thresholds, the user can perceive the character switching situation according to the change of the camera position moving speed, improving the interactivity.
[0175] In some embodiments, before step 220 above, it is also necessary to determine a second virtual character. Optionally, the second virtual character can be selected by the user independently or determined automatically by the terminal. In the embodiments of the present application, the case where the terminal automatically determines the second virtual character is taken as an example for illustration. Please refer to Figure 7 , Figure 7 is a flowchart of a method for determining a second virtual character provided by an exemplary embodiment of the present application. This method can be executed by the terminal, or by the server, or jointly executed by the terminal and the server at the same time. In the embodiments of the present application, the case where this method is executed by the terminal is taken as an example for illustration. As Figure 7 shown, before step 220 above, the following steps are also included:
[0176] Step 710, based on the first perspective, determine a second virtual character in the virtual scene that meets the character switching conditions.
[0177] Optionally, the character switching conditions include at least one of the second virtual character being located within the perspective range corresponding to the first perspective, the index data of the second virtual character reaching the preset data threshold, and the second virtual character being a virtual character selected based on a character selection operation.
[0178] In some embodiments, step 710 includes the following two situations:
[0179] The first type , when there is only one candidate virtual character within the perspective range corresponding to the first perspective, determine the candidate virtual character as the second virtual character.
[0180] In some embodiments, the candidate virtual character refers to a virtual character in the virtual scene whose character state belongs to the controllable state.
[0181] The above character states include a controllable state and an uncontrollable state. Among them, 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 terminal master virtual character; the uncontrollable state is used to indicate that the virtual character does not belong to the candidate virtual character. For example, it is a virtual character controlled by a server or other terminal.
[0182] The controllable state and the uncontrollable state of the virtual character in the virtual scene can be pre-configured by the target application program or configured by the user.
[0183] In some embodiments, the controllable state and the uncontrollable state of the virtual character in the virtual scene are determined based on the camp to which the virtual character belongs. For example, the virtual characters in the camp where the first account is located belong to the controllable state, and the virtual characters in other camps belong to the uncontrollable state.
[0184] The second type , when there are multiple candidate virtual characters within the viewing range corresponding to the first perspective, determine the second virtual character from the multiple candidate virtual characters based on the role switching condition.
[0185] In some embodiments, determining the second virtual character from the multiple candidate virtual characters includes the following two steps:
[0186] The first step is to determine the candidate virtual characters whose distance from the first virtual character among the multiple candidate virtual characters is less than the preset distance threshold as the second virtual character.
[0187] In some embodiments, respectively determine the distances between the multiple candidate virtual characters and the first virtual character, and determine the candidate virtual character with the smallest distance as the second virtual character.
[0188] The second step is that when there are multiple candidate virtual characters whose distances from the first virtual character are less than the preset distance threshold, determine the candidate virtual characters among the multiple candidate virtual characters whose index data reaches the preset data threshold as the second virtual character.
[0189] In some embodiments, the virtual character corresponds to multiple candidate index data. Before determining the second virtual character based on the index data, it is necessary to determine the data type of the index data and the corresponding preset data threshold, and the data type and the preset data threshold are determined based on the scene category of the virtual scene. That is, before the above second step, determine the scene category of the virtual scene, which is used to indicate the data type of the index data, determine the index data from the multiple candidate index data corresponding to the virtual character based on the scene category, and determine the preset data threshold corresponding to the index data.
[0190] Schematically, when the scene category of the virtual scene belongs to a virtual combat scene, the combat power of the virtual character (including attack power, defense power, etc.) is determined as the index 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 index 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 index data, etc.
[0191] Please refer to Figure 8 , Figure 8 which is a schematic diagram of a second virtual character determination method provided by an exemplary embodiment of the present application. As Figure 8 shown, taking the implementation of the index data as the health value as an example, the virtual scene 810 includes a first virtual character 811, a candidate virtual character 812, and a candidate virtual character 813. Among them, only the candidate virtual character 812 is within the viewing range corresponding to the first perspective of the first virtual character 811, and the candidate virtual character 812 is determined as the second virtual character; the virtual scene 820 includes a first virtual character 821, a candidate virtual character 822, and a candidate virtual character 823. Among them, both the candidate virtual character 822 and the candidate virtual character 823 are within the viewing range corresponding to the first perspective of the first virtual character 821, and the candidate virtual character 822 closer to the first virtual character 821 is determined as the second virtual character; the virtual scene 830 includes a first virtual character 831, a candidate virtual character 832, and a candidate virtual character 833. Among them, both the candidate virtual character 832 and the candidate virtual character 833 are within the viewing range corresponding to the first perspective 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. The candidate virtual character 833 with a higher health value is determined as the second virtual character.
[0192] Schematically, please refer to Figure 9 , Figure 9 which is a schematic diagram of virtual character switching provided by an exemplary embodiment of the present application. As Figure 9As shown, the first perspective view 901 corresponding to the first virtual character 910 is displayed. The virtual scene includes the first virtual character 910, the candidate virtual character 920, and the candidate virtual character 930. Among them, both the candidate virtual character 920 and the candidate virtual character 930 are 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 implemented as a virtual battle scene, taking combat power as the index data, the candidate virtual character 930 whose combat power reaches the preset data threshold is determined as the second virtual character. In response to receiving a character switching operation, the character switching animation 902 is displayed. In response to the completion of the display of the character switching animation 902, the second perspective view 903 corresponding to the second virtual character (candidate virtual character 930) is displayed.
[0193] In summary, the method provided by the embodiment of the present application determines the second virtual character that meets the character switching conditions in the virtual scene based on the first perspective before displaying the character switching animation, providing a solution for the terminal to automatically determine the second virtual character, thereby reducing the process of the user manually selecting the second virtual character, improving the automation of virtual character switching, and thus improving the virtual character switching efficiency.
[0194] The method provided by the embodiment of the present application makes the implementation process of virtual character switching more in line with the actual switching situation and more immersive by preferentially determining the second virtual character according to the candidate virtual characters in the perspective range corresponding to the first perspective.
[0195] The method provided by the embodiment of the present application preferentially determines the second virtual character according to the distance between the candidate virtual character and the first virtual character when there are multiple candidate virtual characters in the perspective range corresponding to the first perspective, so as to preferentially select the candidate virtual character with a shorter perspective conversion path during the process of automatically determining the second virtual character, thereby reducing the computing and rendering resources consumed by the character switching animation and improving the rationality of the second virtual character; when the distances between multiple candidate virtual characters and the first virtual character are less than the preset distance threshold, the candidate virtual character whose index data reaches the preset data threshold among the multiple candidate virtual characters is determined as the second virtual character, further clarifying the determination method of the second virtual character and improving the automation of the second virtual character determination process.
[0196] The method provided by the embodiment of the present application determines the scene category of the virtual scene, determines the index data from multiple candidate index data corresponding to the virtual character based on the scene category, and determines the preset data threshold corresponding to the index data, so that the second virtual character determined based on the index data better meets the actual needs of the user and improves the determination quality of the second virtual character.
[0197] 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 jointly by a terminal and a server. In the embodiments of the present application, it is taken as an example that the method is executed by a terminal. 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. Among them, the user input detection module is used to detect user input, and when the user triggers a role switching operation, it triggers the role switching process; the role screening module is used to determine a second virtual character; the perspective conversion module is used to display a perspective switching animation; the role switching module is used to switch the terminal's master virtual character; the user interaction module is used to continuously detect user input during the role switching process to determine the duration of the role switching operation; the role switching completion module is used to determine the terminal's master virtual character after the role switching is completed.
[0198] Schematically, please refer to Figure 10 , Figure 10 which is a flowchart of a method for determining a user-switchable character provided by an exemplary embodiment of the present application. As Figure 10 shown, the terminal sequentially executes step 1010 to determine whether there is a candidate virtual character within the perspective range corresponding to the first perspective. In response to the existence of a candidate virtual character, step 1020 is executed; step 1020 is to display a role switching control; step 1030 is to determine whether the user triggers the role switching control. In response to the user triggering the role switching control, step 1040 is executed; step 1040 is to trigger the role screening module, that is, to determine a second virtual character.
[0199] Schematically, please refer to Figure 11 , Figure 11 which is a flowchart of the role screening module provided by an exemplary embodiment of the present application. As Figure 11 shown, the terminal sequentially executes step 1110 to determine whether there are multiple candidate virtual characters within the perspective range corresponding to the first perspective. In response to the existence of multiple candidate virtual characters, step 1120 is executed, otherwise the candidate virtual character within the perspective range corresponding to the first perspective is directly determined as the second virtual character and step 1130 is executed; step 1120 is to read index data and determine the candidate virtual character whose index data reaches a preset data threshold as the second virtual character; step 1130 is to execute the perspective conversion module and the role switching module.
[0200] Schematically, please refer to Figure 12 , Figure 12 which is a flowchart of role switching provided by an exemplary embodiment of the present application. As Figure 12As shown in the figure, the terminal sequentially executes step 1210 to determine the second virtual character; step 1220 to display the character identifiers corresponding to the first virtual character and the second virtual character respectively, and the countdown for successful character switching based on the character switching control; step 1231 to determine whether the duration of the character switching operation reaches a preset duration threshold, and if it reaches the preset duration threshold, execute step 1240; in parallel with step 1231, execute step 1232 to call the perspective conversion module to display the character switching animation; step 1240 to determine whether the character switching animation has finished playing, and in response to the character switching animation finishing playing, execute step 1250; step 1250 to adjust the first virtual character to an inactive state and adjust the second virtual character to an active state, where a preset program is enabled for the virtual character in the inactive state to automatically control the virtual character.
[0201] Based on the virtual character switching method provided in the embodiments of the present application, a smooth and natural character switching effect can be achieved, improving the interactivity and immersion during the virtual character switching process. When the user performs a character switching operation, the game will automatically select the candidate virtual character that is within the first perspective range, closest in distance, and / or has the highest health value for switching. The perspective will smoothly switch from the first virtual character to the second virtual character, enabling the user to better control and experience the multi-character game. At the same time, more tolerance space is provided for the user's misoperation. In the case where the duration of the character switching operation has not reached the preset duration threshold, if the user stops clicking during the perspective turning process, the character switching process will be immediately stopped, maintaining the current character and perspective, providing a more flexible operation method.
[0202] Figure 13 is a structural block diagram of a virtual character switching device provided by an exemplary embodiment of the present application. As Figure 13 shown, the device includes the following parts:
[0203] A display module 1310 for displaying a first perspective view corresponding to the virtual scene, the first perspective view corresponding to the first perspective of the first virtual character, and the first virtual character being the terminal's master control virtual character;
[0204] A switching module 1320 for, in response to receiving a character switching operation, displaying a character switching animation, the character switching operation being used to switch the terminal's master control virtual character from the first virtual character to the second virtual character, the second perspective of the second virtual character corresponding to a second perspective view, the character switching animation including an intermediate perspective view which is the view corresponding to the intermediate perspective rotated from the first perspective to the second perspective, and the character switching animation including the conversion process from the first perspective view to the second perspective view;
[0205] The display module 1310 is further configured to display the second perspective view corresponding to the virtual scene in response to the completion of the display of the character switching animation.
[0206] Please refer to Figure 14 , Figure 14 which is a structural block diagram of a virtual character switching device module provided by an exemplary embodiment of the present application. As Figure 14 shown, in some embodiments, the switching module 1320 includes:
[0207] An animation display unit 1321, configured to synchronously display the character switching animation based on the duration of the character switching operation in response to receiving the character switching operation.
[0208] In some embodiments, the animation display unit 1321 is configured to:
[0209] In response to receiving the continuous character switching operation, synchronize the character switching operation and continuously display the character switching animation;
[0210] When the duration of the character switching operation reaches a preset duration threshold, display that the terminal master virtual character is switched to the second virtual character; or, in response to the duration of the character switching operation being less than the preset duration threshold when the operation terminates, stop displaying the character switching animation and resume displaying the first perspective view, and the terminal master virtual character remains the first virtual character.
[0211] In some embodiments, the display module 1310 is further configured to display a character switching control when there is at least one candidate virtual character within the perspective range corresponding to the first perspective, and the character switching control is used to receive the character switching operation.
[0212] In some embodiments, the character switching control corresponds to a first character identifier of the first virtual character; the display module 1310 is further configured to:
[0213] When the duration of the character switching operation is less than the preset duration threshold, display a first countdown based on the first character identifier, and the first countdown is used to indicate the remaining duration required for the character switching operation when switching the terminal master virtual character from the first virtual character to the second virtual character;
[0214] When the duration of the character switching operation reaches the preset duration threshold, display the second character identifier corresponding to the second virtual character based on the character switching control and display a second countdown based on the second character identifier, and the second countdown is used to indicate the remaining duration required for the current perspective view to be switched to the second perspective view.
[0215] In some embodiments, the animation display unit 1321 includes:
[0216] A route determination subunit 1301, configured to, in response to receiving the character switching operation, determine a perspective conversion route corresponding to the character switching animation based on the first virtual character and the second virtual character;
[0217] A transition point determination subunit 1302, configured to determine a plurality of perspective transition points in the perspective conversion route at a preset interval threshold, where the perspective transition points are used to indicate intermediate perspectives for rotating from the first perspective to the second perspective;
[0218] An animation display subunit 1303, configured to display the character switching animation based on the plurality of perspective transition points, where the character switching animation includes intermediate perspective images at the intermediate perspectives corresponding to the plurality of perspective transition points.
[0219] In some embodiments, the transition point determination subunit 1302 is configured to:
[0220] Uniformly determine the plurality of perspective transition points in the perspective conversion route at a fixed preset interval threshold, where the distances between the plurality of perspective transition points are the same; or,
[0221] When the duration of the character switching operation is less than the preset duration threshold, respectively determine the plurality of first perspective transition points in the perspective conversion route at a decreasing preset interval threshold, where the first perspective transition points are used to indicate intermediate perspectives for rotating from the first perspective to the second perspective when the master virtual character remains the first virtual character; when the duration of the character switching operation reaches the preset duration threshold, respectively determine the plurality of second perspective transition points in the perspective conversion route at an increasing preset interval threshold, where the second perspective transition points are used to indicate intermediate perspectives for rotating from the first perspective to the second perspective when the master virtual character switches to the second virtual character.
[0222] In some embodiments, the apparatus further includes a character determination module 1330, configured to determine the second virtual character that meets the character switching conditions in the virtual scene based on the first perspective.
[0223] In some embodiments, the character determination module 1330 includes:
[0224] A first determination unit 1331, configured to, when there is only one candidate virtual character within the perspective range corresponding to the first perspective, determine the candidate virtual character as the second virtual character;
[0225] A second determination unit 1332, configured to determine the second virtual character from the multiple candidate virtual characters based on the character switching condition when there are multiple candidate virtual characters within the viewing range corresponding to the first viewing angle.
[0226] In some embodiments, the second determination unit 1332 is configured to:
[0227] Determine, as the second virtual character, the candidate virtual character among the multiple candidate virtual characters whose distance from the first virtual character is less than a preset distance threshold;
[0228] When there are multiple candidate virtual characters whose distances from the first virtual character are less than the preset distance threshold, determine, as the second virtual character, the candidate virtual character among the multiple candidate virtual characters whose index data reaches a preset data threshold.
[0229] In some embodiments, the character determination module 1330 further includes a category determination unit 1333, configured to:
[0230] Determine the scene category of the virtual scene, where the scene category is used to indicate the data type of the index data;
[0231] Determine the index data from the multiple candidate index data corresponding to the virtual character based on the scene category, and determine the preset data threshold corresponding to the index data.
[0232] In some embodiments, the switching module 1320 is further configured to:
[0233] In response to the completion of the display of the viewing angle switching animation, determine the character state of the second virtual character as the active state, where the active state is used to indicate that the second virtual character is controlled by the main control operation of the terminal;
[0234] Determine the character state of the first virtual character as the inactive state, where the inactive state is used to indicate that the first virtual character is stationary, or the first virtual character is automatically controlled by a preset program.
[0235] In summary, the device provided by the embodiment of the present application displays a character switching animation in response to receiving a character switching operation. The character switching animation includes a conversion process from a first perspective view to a second perspective view. In response to the completion of the display of the character switching animation, the second perspective view corresponding to the virtual scene is displayed. During the switching process of the virtual character, based on the character switching operation, as the terminal master controls the virtual character to switch from the first virtual character to the second virtual character, the intermediate perspective view corresponding to the intermediate perspective rotated from the first perspective to the second perspective is displayed, so as to increase the transition process from the first perspective view to the second perspective view, make the perspective switching process accompanied by the character switching smoother, improve the fault tolerance of mis-character switching operations, and improve the human-computer interaction efficiency.
[0236] It should be noted that: for the virtual character switching device provided in the above embodiment, only the above-mentioned division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0237] Figure 15 The block diagram of the terminal 1500 provided by an exemplary embodiment of the present application is shown. The terminal 1500 may be: a smart phone, a tablet computer, an MP3 player, an MP4 player, a notebook computer or a desktop computer. The terminal 1500 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
[0238] Generally, the terminal 1500 includes: a processor 1501 and a memory 1502.
[0239] The processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-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), or 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 wake state, also known as the 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), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0240] The memory 1502 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1502 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 is used to store at least one instruction, and the at least one instruction is to be executed by the processor 1501 to implement the virtual role switching method provided in the method embodiments of the present application.
[0241] In some embodiments, the terminal 1500 further includes other components, and those skilled in the art can understand that Figure 15 the structure shown does not limit the terminal 1500, and it may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
[0242] Embodiments of the present application further provide a computer device, which may be implemented as a Figure 1 terminal or a server as shown. The computer device includes a processor and a memory, and at least one instruction, at least one program, a code set, or an instruction set is stored in the memory. The at least one instruction, at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the virtual role switching method provided in the above method embodiments.
[0243] Embodiments of the present application also provide a computer-readable storage medium, on which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, 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 provided in the above method embodiments.
[0244] Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the virtual character switching method provided in the above method embodiments.
[0245] Optionally, the computer-readable storage medium may include: Read Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD), or optical discs, etc. Among them, the random access memory may include Resistance Random Access Memory (ReRAM) and Dynamic Random Access Memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0246] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0247] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A virtual character switching method, characterized in that: The method comprises: Displaying a first perspective picture corresponding to a virtual scene, wherein the first perspective picture corresponds to a first perspective of a first virtual character, and the first virtual character is a terminal main control virtual character; In response to receiving a role switching operation, displaying a role switching animation, wherein the role switching operation is used to switch the terminal master virtual character from the first virtual character to the second virtual character, the second perspective of the second virtual character corresponds to a second perspective picture, the role switching animation includes an intermediate perspective picture, the intermediate perspective picture is a picture corresponding to an intermediate perspective rotated from the first perspective to the second perspective, and the role switching animation includes a conversion process of switching from the first perspective picture to the second perspective picture; In response to the character switching animation being displayed, the second perspective picture corresponding to the virtual scene is displayed.
2. The method according to claim 1, characterized in that 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.
3. The method according to claim 2, characterized in that 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; When the duration of the role switching operation reaches a preset duration threshold, the terminal master virtual character is displayed as switching to the second virtual character; or, in response to the role switching operation being terminated for a duration less than the preset duration threshold, the role switching animation is stopped and the first perspective screen is restored, and the terminal master virtual character remains the first virtual character.
4. The method according to any one of claims 1 to 3, characterized in that: 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.
5. The method according to claim 4, characterized in that 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 preset 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 terminal 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 preset 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.
6. The method according to any one of claims 1 to 3, characterized in that: In response to receiving the role switching operation, displaying the role switching animation comprises: In response to receiving the 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; Determining a plurality of perspective transition points in the perspective conversion route according to a preset interval threshold, wherein the perspective transition points are used to indicate an intermediate perspective 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.
7. The method according to claim 6, characterized in that The step of determining a plurality of perspective transition points in the perspective conversion route according to a preset interval threshold comprises: The plurality of perspective transition points are uniformly determined in the perspective conversion route according to a fixed preset 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 the preset duration threshold, the multiple first perspective transition points are respectively determined in the perspective conversion route according to the decreasing preset interval threshold, and the first perspective transition point is used to indicate the intermediate perspective 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 preset duration threshold, the multiple second perspective transition points are respectively determined in the perspective conversion route according to the increasing preset interval threshold, and the second perspective transition point is used to indicate the intermediate perspective from the first perspective to the second perspective when the main virtual character switches to the second virtual character.
8. The method according to any one of claims 1 to 3, characterized in that: 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 perspective.
9. The method according to claim 8, characterized in that 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.
10. The method according to claim 9, characterized in that 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 preset 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 preset distance threshold, the candidate virtual character whose indicator data reaches the preset data threshold among the multiple candidate virtual characters is determined as the second virtual character.
11. The method according to claim 10, characterized in that Before determining the candidate virtual character whose indicator data reaches a preset 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; The indicator data is determined from a plurality of candidate indicator data corresponding to the virtual character based on the scene category, and a preset data threshold corresponding to the indicator data is determined.
12. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to the viewing angle switching animation being displayed, determining the character state of the second virtual character as an active state, wherein the active 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 an inactive state, where the inactive 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.
13. A virtual character switching device, characterized in that: The device comprises: A display module, configured to display a first perspective picture corresponding to a virtual scene, wherein the first perspective picture corresponds to a first perspective of a first virtual character, and the first virtual character is a terminal master virtual character; a switching module, configured to display a role switching animation in response to receiving a role switching operation, wherein the role switching operation is used to switch the terminal master virtual character from the first virtual character to the second virtual character, the second perspective of the second virtual character corresponds to a second perspective picture, the role switching animation includes an intermediate perspective picture, the intermediate perspective picture is a picture corresponding to an intermediate perspective rotated from the first perspective to the second perspective, and the role switching animation includes a conversion process of switching from the first perspective picture to the second perspective picture; The display module is further configured to display the second viewing angle picture corresponding to the virtual scene in response to completion of the character switching animation display.
14. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the virtual character switching method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer program, 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 12.
16. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the virtual character switching method according to any one of claims 1 to 12.