Virtual-object control method and apparatus, and device, storage medium and program product
By displaying vehicle controls and connection elements in a virtual scene, the virtual object is automatically controlled to enter the target vehicle, which solves the problem of low vehicle entry efficiency in the game, improves accuracy and human-computer interaction efficiency, and optimizes hardware resource utilization.
Patent Information
- Application Number
- PCT/CN2024/134140
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-02
- Filing Date
- 2024-11-25
- Publication Date
- 2025-07-10
AI Technical Summary
In the game, players have low efficiency and accuracy when entering the vehicle, and also have low human-computer interaction efficiency and hardware processing resource utilization.
The virtual vehicle and vehicle control are displayed in the virtual scene, and the association relationship between the vehicle control and the virtual vehicle is indicated by the connecting element, and the virtual object is automatically controlled to enter the target vehicle in response to the trigger operation.
It improves the efficiency and accuracy of virtual objects entering the vehicle, enhances human-computer interaction efficiency and hardware resource utilization, and simplifies the vehicle selection process.
Smart Images

Figure CN2024134140_10072025_PF_FP_ABST
Abstract
Description
Virtual object control method, device, equipment, storage medium and program product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The embodiments of this application are based on and claim the priority of Chinese patent application with application number 202410008103.6 and application date January 2, 2024. The entire contents of the Chinese patent application are hereby introduced into the embodiments of this application as a reference. Technical Field
[0003] The present application relates to the field of Internet technology, and in particular to a method, device, electronic device, computer-readable storage medium, and computer program product for controlling a virtual object. Background Art
[0004] In games using the related art, when a player wants to enter one of at least one vehicle, they must manually move the virtual object they control to the corresponding vehicle before entering it. Furthermore, if the vehicle is too close to another vehicle, the player may not be able to accurately select the desired vehicle when they move to it, and will instead enter a random vehicle. As a result, the efficiency and accuracy of the virtual object entering the vehicle in the related art are low, as are the human-computer interaction efficiency and hardware processing resource utilization. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for controlling a virtual object, which can improve the efficiency and accuracy of a virtual object entering a vehicle, reduce the efficiency of human-computer interaction, and improve the utilization of hardware processing resources.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] The present invention provides a method for controlling a virtual object, including:
[0008] In a virtual scene, displaying virtual objects, at least one virtual vehicle, and vehicle controls;
[0009] In the virtual scene, display at least one virtual vehicle and vehicle controls;
[0010] There is a connection element between the vehicle control and a first virtual vehicle in at least one virtual vehicle, and the connection element is used to indicate the virtual vehicle associated with the vehicle control;
[0011] In response to a trigger operation on the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control.
[0012] An embodiment of the present application provides a device for controlling a virtual object, including:
[0013] A display module configured to display at least one virtual vehicle and a vehicle control in a virtual scene; wherein a connection element is provided between the vehicle control and a first virtual vehicle among the at least one virtual vehicle, the connection element being used to indicate the virtual vehicle associated with the vehicle control;
[0014] The control module is configured to control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control.
[0015] An embodiment of the present application provides an electronic device, including:
[0016] a memory configured to store computer-executable instructions or a computer program;
[0017] The processor is configured to implement the virtual object control method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.
[0018] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions are executed by a processor, the virtual object control method provided in the embodiment of the present application is implemented.
[0019] The present invention provides a computer program product including computer-executable instructions or a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions or the computer program from the computer-readable storage medium and executes the computer-executable instructions or the computer program, causing the electronic device to perform the virtual object control method provided in the present invention.
[0020] The embodiments of the present application have the following beneficial effects:
[0021] When a virtual vehicle is displayed in a virtual scene, a vehicle control and a connection element for indicating the association between the vehicle control and a first virtual vehicle are also displayed. Based on the connection element, in response to a trigger operation on the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. In this way, when a user triggers the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. Compared with the solution of manually moving the virtual object to the corresponding vehicle and then entering the vehicle, the efficiency of the virtual object entering the vehicle is improved. At the same time, based on the connection element for indicating the association between the vehicle control and the first virtual vehicle, the virtual vehicle that can be entered based on the vehicle control is clarified, that is, the virtual vehicle that the virtual object will enter is clarified. This not only improves the accuracy of the virtual object entering the vehicle, but also further improves the efficiency of the virtual object entering the vehicle. It also improves the efficiency of human-computer interaction and the hardware resource utilization of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is a schematic diagram of the architecture of a control system for a virtual object provided in an embodiment of the present application;
[0023] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0024] FIG3 is a flow chart of a method for controlling a virtual object according to an embodiment of the present application;
[0025] FIG4 is a schematic diagram of a connection element provided in an embodiment of the present application;
[0026] FIG5 is a schematic diagram of a process of switching vehicles based on vehicle controls according to an embodiment of the present application;
[0027] FIG6 is a schematic diagram of a process of switching a vehicle control from a fixed state to a draggable state according to an embodiment of the present application;
[0028] FIG7 is a schematic diagram showing attribute information of a first virtual vehicle provided by an embodiment of the present application;
[0029] FIG8 is a schematic diagram of a process of controlling a virtual object to automatically enter a first virtual vehicle associated with a vehicle control according to an embodiment of the present application;
[0030] FIG9 is a schematic diagram of a distance progress bar provided in an embodiment of the present application;
[0031] FIG10 is a schematic diagram of a countdown provided in an embodiment of the present application;
[0032] FIG11 is a flow chart of an operation scheme for accurate selection of boarding vehicles when multiple vehicles are provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting the embodiments of the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0034] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0035] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0037] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0038] 1) Client: Also known as the user end, it refers to the program that provides local services to users corresponding to the server. Except for some applications that can only run locally, it is generally installed on an ordinary client and needs to cooperate with the server to run. That is, there must be corresponding servers and service programs on the network to provide corresponding services. Therefore, a specific communication connection needs to be established between the client and server to ensure the normal operation of the application, such as the autonomous driving client (such as the map navigation client).
[0039] 2) Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0040] 3) Virtual scene: This is the virtual scene displayed (or provided) when the application is running on the terminal. This virtual scene can be a simulation of the real world, a virtual environment that is partially simulated and partially fictional, or a purely fictional virtual environment. The virtual scene can be any of two-dimensional, two-and-a-half-dimensional, or three-dimensional.
[0041] For example, a virtual scene may include the sky, land, ocean, etc., where the land may include environmental elements such as deserts and cities. Users may control virtual objects to perform activities in the virtual scene, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. The virtual scene may be displayed from a first-person perspective (e.g., the user plays the role of a virtual object in the game from their own perspective); from a third-person perspective (e.g., the user chases the virtual object in the game); or from a bird's-eye view perspective. The aforementioned perspectives may be switched arbitrarily.
[0042] 4) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed can be real-time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0043] 5) Virtual objects: These are images of various people and objects that can interact in a virtual scene, or movable objects within the virtual scene. These movable objects can be virtual people, virtual animals, cartoon characters, etc., for example, people, animals, plants, oil drums, walls, rocks, vehicles, etc. displayed within the virtual scene. A virtual object can be a virtual avatar that represents the user within the virtual scene. A virtual scene can include multiple virtual objects, each with its own unique shape and volume, occupying a portion of the space within the virtual scene.
[0044] For example, the virtual object can be a user character controlled by operations on the client, an artificial intelligence (AI) trained to play in a virtual scene, or a non-player character (NPC) used in virtual scene interactions. The number of virtual objects participating in the virtual scene interaction can be pre-set or dynamically determined based on the number of clients participating in the interaction.
[0045] 6) Third-person perspective: the in-game camera is positioned a certain distance behind the player character, and the player can see the character and all combat elements in the surrounding environment.
[0046] 7) First-person perspective: The in-game camera is at the player character's eye position, and the player can see the character's body parts and all combat elements in the surrounding environment.
[0047] Refer to Figure 1, which is a schematic diagram of the architecture of the control system of the virtual object provided in an embodiment of the present application. A virtual object control client 401 is set on the terminal (terminal 400 is shown as an example), and is displayed on the display interface (image interface 401-1 is shown as an example). The terminal 400 is connected to the server 200 through the network 300, wherein the network 300 can be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using wireless or wired links.
[0048] The server 200 is configured to send scene data corresponding to a virtual scene including at least one virtual vehicle and vehicle controls to the terminal 400;
[0049] The terminal 400 is also used to receive scene data corresponding to a virtual scene including at least one virtual vehicle and a vehicle control sent by the server 200, and display the virtual scene based on the scene data; display at least one virtual vehicle and a vehicle control in the virtual scene; wherein, there is a connection element between the vehicle control and the first virtual vehicle in the at least one virtual vehicle, and the connection element is used to indicate the virtual vehicle associated with the vehicle control; in response to a trigger operation on the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control.
[0050] In some embodiments, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal 400 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, an intelligent voice interaction device, a smart home appliance, a virtual reality device, a vehicle-mounted terminal, an aircraft, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device, an intelligent speaker, and a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0051] Next, an electronic device for implementing the control method of the virtual object provided by the embodiment of the present application is described. Referring to Figure 2, Figure 2 is a structural diagram of an electronic device provided by an embodiment of the present application. The electronic device can be a server or a terminal. Taking the electronic device as the terminal shown in Figure 1 as an example, the electronic device shown in Figure 2 includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together through a bus system 440. It can be understood that the bus system 440 is configured to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 440 in Figure 3.
[0052] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0053] The user interface 430 includes one or more output devices 431 that enable display of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0054] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0055] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0056] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0057] Operating system 451, including system programs configured to handle various basic system services and perform hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0058] A network communication module 452 is configured to reach other electronic devices via one or more (wired or wireless) network interfaces 420 , exemplary network interfaces 420 including Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB);
[0059] a presentation module 453 configured to enable display of information via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripheral devices and displaying content and information);
[0060] The input processing module 454 is configured to detect user input or interaction from one or more input devices 432 and to translate the detected input or interaction.
[0061] In some embodiments, the apparatus provided by the embodiments of the present application can be implemented using software. FIG2 shows a virtual object control device 455 stored in memory 450. This device can be software in the form of a program or plug-in, and includes the following software modules: a display module 4551 and a control module 4552. These modules are logical and can be arbitrarily combined or further separated according to the functions implemented. The functions of each module will be described below.
[0062] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the control device of the virtual object provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the control method of the virtual object provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs) or other electronic components.
[0063] In some embodiments, the terminal or server can implement the control method of the virtual object provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP or a web browser APP; it can also be a small program, that is, a program that can be run only by downloading it into a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in.
[0064] Based on the above description of the control system and electronic device of the virtual object provided by the embodiment of the present application, the control method of the virtual object provided by the embodiment of the present application is described below. In actual implementation, the control method of the virtual object provided by the embodiment of the present application can be implemented separately by the terminal or the server, or by the terminal and the server in collaboration. The control method of the virtual object provided by the embodiment of the present invention is described by taking the terminal 400 in Figure 1 as an example of executing the control method of the virtual object provided by the embodiment of the present invention separately. Referring to Figure 3, Figure 3 is a flow chart of the control method of the virtual object provided by the embodiment of the present application, which will be described in conjunction with the steps shown in Figure 3.
[0065] In step 101, the terminal displays at least one virtual vehicle and a vehicle control in a virtual scene; wherein a connection element is provided between the vehicle control and a first virtual vehicle among the at least one virtual vehicle, and the connection element is used to indicate the virtual vehicle associated with the vehicle control.
[0066] In actual implementation, an application supporting virtual scenes is installed on the terminal, which can be any of a first-person shooter game, a third-person shooter game, a multiplayer online tactical competitive game, a virtual reality application, a three-dimensional map program, or a multiplayer gunfight survival game.
[0067] When a user opens an application on a terminal and the terminal runs the application, the terminal presents a picture of a virtual scene. Here, the picture of the virtual scene is obtained by observing the virtual scene from a first-person object perspective, or by observing the virtual scene from a third-person perspective. The picture of the virtual scene contains at least one virtual vehicle and vehicle control. The virtual vehicle can assist the player character in moving in the virtual scene. Common virtual vehicles include virtual cars, virtual ships, virtual airplanes, etc. The virtual scene can also include virtual objects. The virtual object can be a player character controlled by the user account currently logged into the application. The user can use the terminal to operate the virtual object in the virtual scene to carry out activities. For example, the virtual object can be a player character controlled by a user entering a driving game or a simulated virtual scene; or it can be a virtual vehicle carrying a player character controlled by the user account currently logged into the application. In addition, the virtual scene can also include other virtual objects or interactive objects, which can be controlled by other users or by a robot program. This embodiment of the application does not limit this.
[0068] It should be noted that the style of the connecting element can be pre-set, such as a connecting line, connecting special effects, etc. For example, refer to Figure 4, which is a schematic diagram of the connecting element provided in an embodiment of the present application. Based on Figure 4, the connecting element here can be in the form of a connecting line, 401 indicates a vehicle control, and 402 indicates a connecting element in the form of a connecting line.
[0069] It should be noted that the connection elements and vehicle controls can be displayed at the same time. When the virtual object is far away from the virtual vehicle, the vehicle controls and the connection elements will not be displayed. When the virtual object is close to the virtual vehicle, the vehicle controls and the connection elements will be displayed. In the virtual scene, while displaying at least one virtual vehicle and vehicle controls, it is also possible to display a virtual object in the virtual scene. The virtual object is outside the at least one virtual vehicle, and the at least one virtual vehicle can be in a stationary state or in a moving state; wherein the virtual object is outside the sensing range of the at least one virtual vehicle; in response to the movement instruction for the virtual object, the control virtual object moves toward the at least one virtual vehicle; thus, the process of displaying the virtual vehicle in the virtual scene can be that the vehicle controls are displayed when the virtual object moves into the sensing range of the at least one virtual vehicle.
[0070] It should be noted that the distance between each virtual vehicle in at least one virtual vehicle is less than a first distance threshold, which is pre-set. At the same time, the process of determining whether a virtual object is within the sensing range of at least one virtual vehicle may be to obtain the distance between each virtual vehicle and the virtual object, select the minimum distance from each distance, and compare the minimum distance with the second distance threshold. When the minimum distance is less than or equal to the second distance threshold, it is determined that the virtual object is within the sensing range of at least one virtual vehicle; when the minimum distance is greater than the second distance threshold, it is determined that the virtual object is outside the sensing range of at least one virtual vehicle.
[0071] By applying the above embodiment, the virtual object will move towards the virtual vehicle only when the virtual object wants to enter the virtual vehicle, so that the vehicle controls will be displayed only when the virtual object moves into the sensing range of the virtual vehicle. In this way, the situation where the vehicle controls are displayed when the user does not want to enter the virtual vehicle is avoided, which not only reduces the waste of display resources but also improves the user experience.
[0072] In actual implementation, when a virtual object moves into the sensing range of at least one virtual vehicle, the vehicle control is displayed. At the same time, the first virtual vehicle among the at least one virtual vehicle is determined, so that the first virtual vehicle and the vehicle control are connected with a connecting element, that is, a connecting element is displayed between the first virtual vehicle and the vehicle control.
[0073] It should be noted that there are various processes for determining the first virtual vehicle in at least one virtual vehicle. For example, the process can be based on the distance between each virtual vehicle and a virtual object, or based on attribute parameters of each virtual vehicle such as performance level, maximum movement speed, rarity, and control difficulty, or based on user selection, or based on historical user behavior data, such as frequently used virtual vehicles. The following describes the processes for determining the first virtual vehicle in at least one virtual vehicle.
[0074] In some embodiments, the first virtual vehicle is determined by the distance from the virtual object. In response to a trigger operation on the vehicle control, before the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control, it is also possible to, in response to the distance between the virtual object and a second virtual vehicle in at least one virtual vehicle meeting the distance condition, determine the second virtual vehicle as the first virtual vehicle, and control the connecting element to connect the vehicle control and the second virtual vehicle.
[0075] It should be noted that the distance condition can be pre-set, for example, it can be the shortest distance. Here, the distance between the virtual object and the second virtual vehicle in at least one virtual vehicle meets the distance condition, that is, the distance between the virtual object and the second virtual vehicle is the shortest, that is, the second virtual vehicle in at least one virtual vehicle is closest to the virtual object. At this time, the virtual object is outside the at least one virtual vehicle.
[0076] In actual implementation, before responding to the distance between the virtual object and the first virtual vehicle in at least one virtual vehicle satisfying the distance condition, in response to the control operation on the virtual object, the virtual object is controlled to move around the at least one virtual vehicle. During the movement of the virtual object, the distance between each virtual vehicle and the virtual object is obtained in real time. When the distance between the virtual object and the second virtual vehicle in at least one virtual vehicle satisfies the distance condition, that is, based on each distance, it is determined that the second virtual vehicle is closest to the virtual object, it is determined that the distance between the virtual object and the second virtual vehicle in at least one virtual vehicle satisfies the distance condition, thereby determining the second virtual vehicle as the first virtual vehicle, and controlling the connection element to connect the vehicle control and the second virtual vehicle.
[0077] In actual applications, only when the distance between the virtual vehicle and the virtual object meets the distance condition, such as when the virtual vehicle is closest to the virtual object, will the connection element be used to connect the vehicle control and the corresponding virtual vehicle. This makes it easier for subsequent virtual objects to enter the corresponding virtual vehicle based on the vehicle control, thereby improving the entry efficiency of the virtual vehicle and the efficiency of human-computer interaction.
[0078] In actual implementation, when the number of virtual vehicles is at least two, the first virtual vehicle connected to the connecting element can also be switched. Here, there are multiple processes for switching the first virtual vehicle. Next, the process of switching the first virtual vehicle is explained based on different methods.
[0079] In some embodiments, the process of switching the first virtual vehicle may be, in response to a movement instruction for the virtual object, controlling the virtual object to move; during the movement of the virtual object, in response to a virtual vehicle among at least two virtual vehicles that meets the distance condition being switched from the second virtual vehicle to the third virtual vehicle, determining the third virtual vehicle as the first virtual vehicle, and switching the connecting element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the third virtual vehicle.
[0080] It should be noted that, as mentioned above, the distance condition can be pre-set, for example, it can be the shortest distance. During the movement of the virtual object, the distance between each virtual vehicle and the virtual object is obtained in real time, and the minimum distance is determined from at least two distances. When the virtual vehicle corresponding to the minimum distance changes from the second virtual vehicle to the third virtual vehicle, it is determined that the virtual vehicle that meets the distance condition among at least two virtual vehicles is switched from the second virtual vehicle to the third virtual vehicle, thereby determining the third virtual vehicle as the first virtual vehicle, and switching the connecting element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the third virtual vehicle.
[0081] By applying the above embodiment, the virtual vehicle connected to the connection element can be switched by moving the virtual object. That is, by moving the virtual object, the virtual vehicle to be automatically entered can be selected. This not only gives the user the right to choose the vehicle, improving the user's immersion and gaming experience, but also improves the efficiency of human-computer interaction and the hardware resource utilization of electronic devices.
[0082] In other embodiments, the process of switching the first virtual vehicle may be, in response to a vehicle switching instruction triggered based on a vehicle control, switching the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction, and switching the connecting element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the fourth virtual vehicle.
[0083] In actual applications, the virtual vehicle that the virtual object will automatically enter is switched through the vehicle switching instruction. This gives the user the right to choose the vehicle, which not only improves the efficiency of human-computer interaction and the hardware resource utilization of electronic equipment, but also improves the user's gaming experience.
[0084] It should be noted that the vehicle switching instruction is triggered by a vehicle control in a draggable state, and the draggable state can be a suspended state. At this time, the vehicle switching instruction can be triggered by a dragging operation on the vehicle control in the draggable state, and the draggable area corresponding to the vehicle control in the draggable state is displayed; in response to the dragging operation on the vehicle control performed in the draggable area, when the dragging angle of the dragging operation reaches the dragging angle threshold, the vehicle switching instruction triggered based on the vehicle control is received.
[0085] In actual implementation, the draggable area can be a circular area, and the vehicle control is dragged in the draggable area. During the process of dragging the vehicle control, the angle between the line connecting the current position of the vehicle control and the position before the vehicle control is dragged and the vertical line passing through the center of the draggable area is obtained, that is, the drag angle, and then the drag angle is compared with the drag angle threshold. When the drag angle reaches the drag angle threshold, a vehicle switching instruction triggered by the vehicle control is received.
[0086] For example, refer to Figure 5, which is a schematic diagram of the process of switching vehicles based on the vehicle control provided in an embodiment of the present application. Based on Figure 5, as shown in Figure 5a, the connecting element connects the vehicle control indicated by 501 and the second virtual vehicle indicated by 502, and then displays the draggable area corresponding to the vehicle control in the draggable state as indicated by the dotted box 503 in Figure 5b. In response to the dragging operation of the vehicle control in the draggable area, when the dragging angle of the dragging operation reaches the dragging angle threshold, a vehicle switching instruction triggered by the vehicle control is received, indicating that the first virtual vehicle is switched from the second virtual vehicle to the fourth virtual vehicle indicated by 504 indicated by the vehicle switching instruction.
[0087] By applying the above embodiment, the vehicle switching instruction will be triggered only when the dragging angle of the drag operation reaches the dragging angle threshold. This avoids accidental touch by the user and improves the triggering accuracy of the vehicle switching instruction.
[0088] In actual implementation, when the number of virtual vehicles available for switching is at least two, after receiving the vehicle switching instruction triggered by the vehicle control, it is also necessary to determine the virtual vehicle to be switched indicated by the vehicle switching instruction, and analyze the vehicle switching instruction, wherein the vehicle switching instruction carries the drag angle of the drag operation, which is used to indicate the corresponding virtual vehicle to be switched to; at the same time, when the number of virtual vehicles available for switching is at least two, there are also at least two drag angle thresholds, and when the drag angle reaches the drag angle threshold, the vehicle switching instruction triggered by the vehicle control is received, that is, when the drag angle reaches the minimum drag angle threshold, the vehicle switching instruction triggered by the vehicle control is received.
[0089] It should be noted that when the number of virtual vehicles available for switching is at least two, there are also at least two drag angle thresholds. When the line connecting the current position of the vehicle control and the position of the vehicle control before being dragged is to the left of the vertical line passing through the center of the draggable area, the drag angle is negative. When the line connecting the current position of the vehicle control and the position of the vehicle control before being dragged is to the right of the vertical line passing through the center of the draggable area, the drag angle is positive. Thus, the at least two drag angle thresholds also include positive and negative values. Here, the at least two drag angle thresholds form at least two drag angle threshold intervals. Each virtual vehicle available for switching has a corresponding drag angle threshold interval. After the drag angle corresponding to the drag operation is determined based on the vehicle switching instruction, the drag angle threshold interval to which the drag angle corresponding to the drag operation belongs is determined, and then the virtual vehicle available for switching corresponding to the corresponding drag angle threshold interval is obtained, thereby switching to the corresponding virtual vehicle. The vehicle switching instruction instructs switching to the corresponding virtual vehicle.
[0090] In actual implementation, the vehicle control is initially in a fixed state, and is used to control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a subsequent trigger operation on the vehicle control. In the above process, the vehicle control is in a draggable state. Based on this, before displaying the draggable area corresponding to the vehicle control in the draggable state, the state of the vehicle control needs to be switched. Before displaying the draggable area corresponding to the vehicle control in the draggable state, the vehicle control in a fixed state can also be displayed; in response to the state switching instruction for the vehicle control in the fixed state, the vehicle control is switched from a fixed state to a draggable state.
[0091] It should be noted that the state switching instruction can be triggered by a control or by other operations.
[0092] In some embodiments, the state switching instruction is triggered by a control, and a switching control is displayed, and the switching control is used to switch the state of the vehicle control; in response to the triggering operation on the switching control, a state switching instruction for the vehicle control is received.
[0093] In other embodiments, the state switching instruction is triggered by a pressing operation, and in response to the pressing operation on the vehicle control, the pressing duration of the pressing operation is displayed; when the pressing duration exceeds the target pressing duration, the state switching instruction for the vehicle control is received.
[0094] It should be noted that the target press duration is pre-set. When a press operation is received for a vehicle control, the press duration of the press operation is obtained in real time, and the press duration is detected. When the detection result indicates that the press duration exceeds the target press duration, a state switching instruction for the vehicle control is received.
[0095] For example, refer to Figure 6, which is a schematic diagram of the process of switching the vehicle control from a fixed state to a draggable state provided in an embodiment of the present application. Based on Figure 6, as shown in Figure 6a, the vehicle control in a fixed state as indicated by 601 is displayed, and then when a pressing operation is received for the vehicle control, the pressing duration of the pressing operation is obtained in real time, and the pressing duration is detected. When the detection result indicates that the pressing duration exceeds the target pressing duration, a state switching instruction for the vehicle control is received, and thus in response to the state switching instruction for the vehicle control in the fixed state, the vehicle control is switched from the fixed state to the draggable state as indicated by the dotted box 602 in Figure 6b.
[0096] By applying the above embodiment, the state of the vehicle control in a fixed state is switched, thereby switching the vehicle control from a fixed state to a draggable state, and then the vehicle switching instruction is triggered by dragging the vehicle control in the draggable state. In this way, the vehicle switching instruction can be triggered through the vehicle control only after the state of the vehicle control is switched. This not only avoids accidental touch by the user and improves the triggering accuracy of the vehicle switching instruction; it also improves the human-computer interaction efficiency and the hardware resource utilization of the electronic device.
[0097] In some embodiments, the first virtual vehicle is determined by the attribute parameters of each virtual vehicle, where the attribute parameters may be the level of the first virtual vehicle, the movable speed, i.e., the maximum movable speed, the battery life, the control difficulty, and the price, etc., or the attribute parameters are determined based on the level of the first virtual vehicle, the movable speed, the battery life, the control difficulty, and the price, etc.; wherein, taking the attribute parameter of movable speed as an example, in response to the movable speed of the fifth virtual vehicle in at least one virtual vehicle reaching the moving speed threshold, the fifth virtual vehicle is determined as the first virtual vehicle, and the connection element is controlled to connect the vehicle control with the fifth virtual vehicle.
[0098] It should be noted that the moving speed threshold can be determined based on the movable speed of each virtual vehicle, such as the virtual vehicle with the highest movable speed among all virtual vehicles. Here, the movable speed of the fifth virtual vehicle in at least one virtual vehicle reaches the moving speed threshold, that is, the movable speed of the fifth virtual vehicle in at least one virtual vehicle is the highest. At this time, the virtual object is outside at least one virtual vehicle, and at least one virtual vehicle can be in a stationary state or in a moving state. This embodiment of the present application does not limit this.
[0099] In actual applications, the first virtual vehicle is determined by the attribute parameters of each virtual vehicle, that is, the virtual vehicle with the best attribute parameters is selected from at least two virtual vehicles as the first virtual vehicle. This not only improves the player experience and human-computer interaction efficiency, but also improves the utilization of hardware resources.
[0100] In some embodiments, when the number of virtual vehicles is at least two, the first virtual vehicle connected to the connecting element can also be switched. Here, the process of switching the first virtual vehicle is as described above. For example, in response to a vehicle switching instruction triggered based on a vehicle control, the first virtual vehicle is switched from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction, and the connecting element is switched from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle; wherein, in response to the vehicle switching instruction triggered based on the vehicle control, the first virtual vehicle is switched from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction. The process of switching the virtual vehicle from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction, and switching the connection element from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle, is similar to the process described above, in response to the vehicle switching instruction triggered based on the vehicle control, switching the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction, and switching the connection element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the fourth virtual vehicle. This will not be elaborated in the embodiments of the present application.
[0101] In other embodiments, the first virtual vehicle may be determined by the user, and in response to a pressing operation on the vehicle control, when the pressing operation satisfies the pressing condition, at least one virtual vehicle is controlled to be in an optional state; in response to a selection operation on the first virtual vehicle among at least one virtual vehicle, the seventh virtual vehicle is controlled to be in a selected state; in response to a determination instruction for the seventh virtual vehicle in the selected state, the seventh virtual vehicle is determined as the first virtual vehicle, and the connecting element is controlled to connect the vehicle control and the seventh virtual vehicle.
[0102] It should be noted that the pressing condition can be pre-set, for example, the duration of the pressing operation reaches the target pressing duration, or the pressing pressure of the pressing operation reaches the target pressing pressure, to determine that the pressing operation meets the pressing condition; at the same time, the confirmation instruction for the seventh virtual vehicle in the selected state can be triggered by the confirmation control, such as displaying the confirmation control, and in response to the triggering operation of the confirmation control, the confirmation instruction for the seventh virtual vehicle in the selected state is received.
[0103] By applying the above embodiment, based on the vehicle control, at least one virtual vehicle is controlled to be in an optional state, and then the seventh virtual vehicle is selected as the first virtual vehicle from the at least one virtual vehicle in the optional state. In this way, not only is the user given the right to select the vehicle, it is also convenient for the user to directly select the vehicle, thereby improving the user's immersion and gaming experience, but also improving the efficiency of human-computer interaction and the hardware resource utilization of the electronic device.
[0104] In actual implementation, when the number of virtual vehicles is at least two, the first virtual vehicle connected to the connecting element can also be switched. Here, the process of switching the first virtual vehicle is as described above. For example, in response to a vehicle switching instruction triggered based on a vehicle control, the first virtual vehicle is switched from the seventh virtual vehicle to other virtual vehicles indicated by the vehicle switching instruction, and the connecting element is switched from connecting the vehicle control and the seventh virtual vehicle to connecting the vehicle control and other virtual vehicles; wherein, in response to the vehicle switching instruction triggered based on the vehicle control, the first virtual vehicle is switched from the seventh virtual vehicle to the other virtual vehicles indicated by the vehicle switching instruction. The process of switching the virtual vehicle from the seventh virtual vehicle to other virtual vehicles indicated by the vehicle switching instruction, and switching the connection element from connecting the vehicle control and the seventh virtual vehicle to connecting the vehicle control and other virtual vehicles is similar to the process described above, in response to the vehicle switching instruction triggered based on the vehicle control, switching the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction, and switching the connection element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the fourth virtual vehicle. This will not be elaborated in the embodiments of the present application.
[0105] In actual implementation, the process of determining the first virtual vehicle by the user can also be realized after determining the first virtual vehicle by the distance from the virtual object and by the attribute parameters of each virtual vehicle as described above, that is, the process of determining the first virtual vehicle by the user, that is, the process of switching the first virtual vehicle, so that the vehicle switching instruction described above is also a determination instruction for the virtual vehicle in the selected state, such as the seventh virtual vehicle. In response to the vehicle switching instruction triggered based on the vehicle control, the process of switching the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction, that is, in response to the pressing operation on the vehicle control, when the pressing operation meets the pressing condition, controlling at least one virtual vehicle to be in an optional state; in response to the selection operation on the fourth virtual vehicle among the at least one virtual vehicle, controlling the fourth virtual vehicle to be in a selected state; in response to the determination instruction for the fourth virtual vehicle in the selected state, switching the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction;
[0106] Accordingly, in response to the vehicle switching instruction triggered based on the vehicle control, the first virtual vehicle is switched from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction, and the connection element is switched from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle. That is, in response to the pressing operation on the vehicle control, when the pressing operation meets the pressing condition, at least one virtual vehicle is controlled to be in an optional state; in response to the selection operation on the sixth virtual vehicle among the at least one virtual vehicle, the sixth virtual vehicle is controlled to be in a selected state; in response to the determination instruction for the sixth virtual vehicle in the selected state, the first virtual vehicle is switched from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction.
[0107] In some embodiments, no matter how the first virtual vehicle is determined, the attribute information of the first virtual vehicle can also be displayed at the associated position of the vehicle control; wherein the attribute information includes at least one of the following: the level of the first virtual vehicle, the vehicle name, the movable speed, the endurance time, the control difficulty and the price. Here, the level of the first virtual vehicle is determined based on the attribute parameters described above, and the movable speed is the maximum movable speed of the virtual vehicle, the endurance time is the current endurance time of the virtual vehicle, the control difficulty is the difficulty of the driving operation of the virtual vehicle, and the price is the price at which the virtual vehicle can be purchased and used. The associated position of the virtual vehicle can be one of the upper position, the lower position, the left position and the right position of the virtual vehicle.
[0108] For example, refer to Figure 7, which is a schematic diagram of displaying the attribute information of the first virtual vehicle provided in an embodiment of the present application. Based on Figure 7, the attribute information of the first virtual vehicle as indicated by 702 is displayed in the right area of the vehicle control as indicated by 701, wherein the attribute information includes the level of the first virtual vehicle, the vehicle name, the movable speed, the control difficulty and the price.
[0109] In actual implementation, when the attribute information of the first virtual vehicle is displayed at the associated position of the vehicle control, if the number of virtual vehicles is at least two, when the first virtual vehicle is not switched, the displayed attribute information remains unchanged even if the virtual object moves. When the first virtual vehicle is switched, the displayed attribute information will also be switched. Taking the first virtual vehicle as determined by the attribute parameters of each virtual vehicle as an example, the attribute information of the fifth virtual vehicle is displayed at the associated position of the vehicle control; in response to the vehicle switching instruction triggered based on the vehicle control, the first virtual vehicle is switched from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction; at the associated position of the vehicle control, the attribute information of the fifth virtual vehicle will be displayed, switched to displaying the attribute information of the sixth virtual vehicle, and the connecting element will be switched from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle.
[0110] It should be noted that when the first virtual vehicle is determined by the distance from the virtual object and when the first virtual vehicle is determined by the user himself, the process of switching and displaying the attribute information is similar to when the first virtual vehicle is determined by the attribute parameters of each virtual vehicle. This application will not go into details.
[0111] In actual applications, the attribute information of the first virtual vehicle is displayed at the associated position of the first virtual vehicle, so that the user can easily determine the virtual vehicle to enter. This not only improves the efficiency of human-computer interaction and the hardware resource utilization of the electronic device, but also improves the user's gaming experience.
[0112] Step 102 : In response to a trigger operation on a vehicle control, control the virtual object to automatically enter a first virtual vehicle associated with the vehicle control.
[0113] In actual implementation, once the first virtual vehicle is determined, the virtual object can be controlled to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control. Here, the trigger operation can be a click operation such as a single click operation or a double click operation, or other operations.
[0114] In some embodiments, the trigger operation is a click operation such as a single-click operation or a double-click operation, so that in response to the trigger operation on the vehicle control, the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control can be, in response to the trigger operation on the vehicle control, the process of displaying the virtual object moving toward the first virtual vehicle; when the virtual object moves into the sensing area of the first virtual vehicle, the virtual object is controlled to enter the first virtual vehicle.
[0115] It should be noted that the sensing area is a circular area with the first virtual vehicle as the center and the target distance as the radius. In the process of determining whether the virtual object moves into the sensing area of the first virtual vehicle, the position of the first virtual vehicle is obtained, and the position of the virtual object is obtained in real time; based on the position of the first virtual vehicle and the position of the virtual object, the real-time distance between the virtual object and the first virtual vehicle is determined. When the real-time distance is less than or equal to the target distance, it is determined that the virtual object has moved into the sensing area of the first virtual vehicle; wherein, the target distance is pre-set.
[0116] At the same time, if the number of virtual vehicles is at least two, when the triggering operation is a click operation such as a single-click operation or a double-click operation, after switching the first virtual vehicle and the vehicle switching instruction is triggered by a drag operation on the vehicle control, first release the drag operation on the vehicle control, and then click the vehicle control to display the process of the virtual object moving toward the first virtual vehicle.
[0117] For example, refer to Figure 8, which is a schematic diagram of the process of controlling a virtual object to automatically enter the first virtual vehicle associated with the vehicle control provided in an embodiment of the present application. Based on Figure 8, in response to a click operation on the vehicle control as indicated by 801, the process of the virtual object moving toward the first virtual vehicle is displayed; when the virtual object moves to the first virtual vehicle, the virtual object is controlled to enter the first virtual vehicle.
[0118] By applying the above embodiment, the user can automatically move the virtual object to the sensing area of the first virtual vehicle by clicking the vehicle control, and then directly enter the first virtual vehicle. In this way, there is no need to manually move the virtual object to the corresponding virtual vehicle and then enter the virtual vehicle, which improves the efficiency of the virtual object entering the virtual vehicle, the human-computer interaction efficiency and the hardware resource utilization of the electronic device.
[0119] In other embodiments, the number of virtual vehicles is at least two, the trigger operation includes a drag operation on the vehicle control and a release operation on the drag operation, the first virtual vehicle is the eighth virtual vehicle among the at least two virtual vehicles, and the connecting element connects the vehicle control and the eighth virtual vehicle; thus, in response to the trigger operation on the vehicle control, the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control may be that, in response to the drag operation on the vehicle control, when the vehicle control is dragged to the ninth virtual vehicle, the ninth virtual vehicle is determined as the first virtual vehicle, and the connecting element is switched from connecting the vehicle control and the first virtual vehicle to connecting the vehicle control and the ninth virtual vehicle; in response to the release operation on the drag operation, the virtual object is controlled to automatically enter the ninth virtual vehicle associated with the vehicle control.
[0120] It should be noted that when the triggering operation includes a dragging operation on the vehicle control and a releasing operation on the dragging operation, after switching the first virtual vehicle and the vehicle switching instruction is triggered by the dragging operation on the vehicle control, the dragging operation on the vehicle control is released, and then the process of the virtual object moving toward the first virtual vehicle is displayed. That is, there is no need to click the vehicle control again. When the dragging operation on the vehicle control is released, the virtual object is directly controlled to move toward the first virtual vehicle.
[0121] In actual applications, the switching of the first virtual vehicle is achieved by dragging the vehicle control. This not only gives the user the right to choose the vehicle, but also facilitates the user to directly select the vehicle, thereby improving the user's immersion and gaming experience, human-computer interaction efficiency, and hardware resource utilization of electronic equipment, but also simplifies the switching process of the first virtual vehicle and improves the vehicle switching efficiency.
[0122] It should be noted that, for the process of displaying the virtual object moving toward the first virtual vehicle, the movement here means that the virtual object approaches the first virtual vehicle. There may be multiple movement methods based on the type of the first virtual vehicle. For example, the first virtual vehicle includes at least one of a land vehicle, a ship-type vehicle, and a flying vehicle. Based on different types of first virtual vehicles, in response to a trigger operation on the vehicle control, the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control is also different.
[0123] As an example, when the first virtual vehicle includes a boat-type vehicle, the first virtual vehicle is located in the water, and thus in response to a trigger operation on the vehicle control, the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control may be, in response to a trigger operation on the vehicle control, controlling the virtual object to enter the water and swim from the current position to the location of the first virtual vehicle; when the virtual object swims to the location of the first virtual vehicle, controlling the virtual object to leave the water and enter the first virtual vehicle.
[0124] Alternatively, when the first virtual vehicle includes a flying vehicle, the first virtual vehicle is located in the air, and the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control may be to control the virtual object to jump from the current position on the ground in the virtual scene to the position of the first virtual vehicle in the air and enter the interior of the first virtual vehicle in response to a trigger operation on the vehicle control.
[0125] It should be noted that at least one virtual vehicle may include multiple types of virtual vehicles. Accordingly, when the first virtual vehicle includes a land vehicle, such as a virtual car, in response to a trigger operation on the vehicle control, the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control may be to directly teleport the virtual object into the first virtual vehicle, or to control the virtual object to jump into the first virtual vehicle, or to control the virtual object to fly into the first virtual vehicle, or to control the virtual object to crawl or walk into the first virtual vehicle. The embodiments of the present application do not limit this.
[0126] By applying the above embodiments, different types of virtual vehicles have different ways of virtual objects entering them, which enriches the process of virtual objects entering virtual vehicles, not only improving the user's immersion and gaming experience, but also improving the efficiency of human-computer interaction and the utilization of hardware resources of electronic devices.
[0127] In some embodiments, during the process of the virtual object moving toward the first virtual vehicle, a distance progress bar can also be displayed in the associated area of the vehicle control; wherein, the progress displayed by the distance progress bar increases as the distance between the virtual object and the first virtual vehicle decreases, and the distance progress bar is used to indicate the proportion of the distance moved by the virtual object to the total distance between the virtual object and the first virtual vehicle.
[0128] It should be noted that the associated area can be one of the upper area, lower area, left area, right area of the vehicle control and the area where the vehicle control is located. The style of the distance progress bar can be pre-set, such as a long strip or a circle, etc. The user can clearly know the distance required to move to the first virtual vehicle based on the distance progress bar. For example, referring to Figure 9, Figure 9 is a schematic diagram of the distance progress bar provided in an embodiment of the present application. Based on Figure 9, a distance progress bar as indicated by 901 is displayed in the area where the vehicle control is located. In this way, it is avoided that in the process of automatic path finding and boarding the vehicle, due to the inability to perceive the progress, the player needs to make a subjective judgment based on the distance from the vehicle, and when the player mistakenly thinks that he has arrived next to the virtual vehicle, he performs the character displacement operation and interrupts the process of boarding the virtual vehicle. Through the distance progress bar, the user will clearly perceive the current mobile path finding process, reducing the behavior of interrupting the virtual vehicle by accidental touch operations.
[0129] In some embodiments, during the process of the virtual object moving toward the first virtual vehicle, a countdown may be displayed in the associated area of the vehicle control; wherein the countdown is used to indicate the time required for the virtual object to move to the first virtual vehicle.
[0130] It should be noted that the associated area can be one of the upper area, lower area, left area and right area of the vehicle control. For example, referring to Figure 10, Figure 10 is a schematic diagram of the countdown provided in an embodiment of the present application. Based on Figure 10, a countdown as indicated by 1001 is displayed in the lower area of the vehicle control. In this way, it is avoided that in the process of automatic path finding and boarding the vehicle, due to the inability to perceive the progress, the player needs to make a subjective judgment based on the distance from the vehicle, and when the player mistakenly thinks that he has arrived next to the virtual vehicle, he performs the character displacement operation and interrupts the process of boarding the virtual vehicle. Through the countdown, the user will clearly perceive the current mobile path finding process, reducing the behavior of interrupting the boarding of the virtual vehicle by accidental touch operations; in addition, the countdown can also enable the player to clearly perceive the exact time of boarding the virtual vehicle, thereby facilitating the player to perform the next operation.
[0131] In some embodiments, when the number of virtual vehicles is at least two, after controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control, the virtual vehicle entered by the virtual object can also be switched, and in response to a vehicle switching instruction triggered based on the vehicle control, the virtual object is controlled to leave the first virtual vehicle and automatically enter a tenth virtual vehicle among at least one other virtual vehicle; wherein the other virtual vehicles are virtual vehicles other than the first virtual vehicle among the at least two virtual vehicles, and the tenth virtual vehicle is the virtual vehicle to be switched as instructed by the vehicle switching instruction.
[0132] In actual implementation, as described above, the first virtual vehicle can be determined by the distance from the virtual object, or by the attribute parameters of each virtual vehicle, or by the user. Based on this, the tenth virtual vehicle can be the virtual vehicle closest to the virtual object among the other virtual vehicles, or the virtual vehicle with the highest attribute parameter value among the other virtual vehicles, or can be determined by the user himself. When the tenth virtual vehicle is the virtual vehicle closest to the virtual object among the other virtual vehicles, or the virtual vehicle with the highest attribute parameter value among the other virtual vehicles, the vehicle switching instruction triggered by the vehicle control can be triggered by a click operation on the vehicle control, that is, in response to the click operation on the vehicle control, the virtual object is controlled to leave the first virtual vehicle and automatically enter the tenth virtual vehicle among at least one other virtual vehicle;
[0133] When the tenth virtual vehicle is determined by the user, the vehicle switching instruction triggered by the vehicle control can be triggered by a pressing operation on the vehicle control and a selection operation on the tenth virtual vehicle, that is, in response to the pressing operation on the vehicle control, at least one other virtual vehicle for selection is displayed, and in response to the selection operation on the tenth virtual vehicle among the at least one other virtual vehicle, the virtual object is controlled to leave the first virtual vehicle and automatically enter the tenth virtual vehicle among the at least one other virtual vehicle.
[0134] By applying the above embodiment, after the virtual object enters the virtual vehicle, the virtual vehicle can be switched based on the vehicle control. This not only improves the player's gaming experience and the utilization rate of the vehicle control, but also improves the human-computer interaction efficiency and the hardware resource utilization rate of the electronic device. At the same time, compared with the solution that requires manual control of the virtual object to leave the virtual vehicle and then enter other virtual vehicles, the switching efficiency of the virtual vehicle is also improved.
[0135] In some embodiments, only users with certain permissions can use vehicle controls. In a virtual scene, the process of displaying at least one virtual vehicle and a vehicle control may be, in the virtual scene, displaying at least one virtual vehicle and an inactivated vehicle control; wherein the inactivated state is used to indicate that the virtual object does not have permission to use the vehicle control; thus, after displaying at least one virtual vehicle and a vehicle control in the virtual scene, the vehicle control may be controlled to switch from an inactivated state to an activated state in response to the virtual object having permission to use the vehicle control; and the process of controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control may be, in response to a trigger operation on the vehicle control in an activated state, controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control.
[0136] It should be noted that the permission to use vehicle controls can be determined based on the object level of the virtual object, the level of the account that controls the virtual object, the game data of the virtual object, etc. Before displaying at least one virtual vehicle and vehicle controls, the object information of the virtual object is obtained, wherein the object information includes the object level of the virtual object, the level of the account that controls the virtual object, the game data of the virtual object, etc.; based on the object information of the virtual object, a permission check is performed on the virtual object to obtain a test result indicating whether the virtual object has the permission to use the vehicle controls; thereby, when the test result indicates that the virtual object has the permission to use the vehicle controls, at least one virtual vehicle and an activated vehicle control are displayed; when the test result indicates that the virtual object does not have the permission to use the vehicle controls, at least one virtual vehicle and an inactivated vehicle control are displayed.
[0137] In actual applications, by determining whether the virtual object has the permission to use the vehicle controls, it is determined whether to display the vehicle controls that can be used by the user. In this way, the diversity of interactions based on vehicle controls in virtual scenes is improved, and the efficiency of human-computer interaction and the utilization of hardware resources of electronic devices are improved.
[0138] In actual implementation, the virtual object can obtain the right to use the vehicle control by performing interactive tasks. In response to the virtual object having the right to use the vehicle control, the vehicle control is controlled to switch from an inactivated state to an activated state. The interactive task and task guidance information can also be displayed, and the task guidance information is used to guide the virtual object to perform the interactive task; in response to the task execution operation for the interactive task triggered based on the task guidance information, the process of the virtual object performing the interactive task is displayed; when the virtual object completes the interactive task, the virtual object is controlled to have the right to use the vehicle control.
[0139] It should be noted that the task guidance information can be in text form, image form or video form, which is not limited in the embodiments of the present application; and the interactive task can be watching a promotional video related to the application corresponding to the virtual scene, or sharing promotional information related to the application corresponding to the virtual scene, or completing a small game related to the application corresponding to the virtual scene, etc.; when the interactive task is to watch a promotional video related to the application corresponding to the virtual scene, if the virtual object does not have the permission to use the vehicle control, when receiving a trigger operation for the vehicle control in an inactivated state, the promotional video is played and the viewing time of the promotional video is displayed; when the viewing time reaches the target viewing time, it is determined that the interactive task is completed; when the interactive task is completed When sharing promotional information related to the application corresponding to the virtual scene, if the virtual object does not have permission to use the vehicle control, when receiving a trigger operation for the vehicle control in an inactive state, the sharing control for sharing the promotional information is displayed; when receiving a sharing operation triggered by the sharing control, it is determined that the interactive task is completed; when the interactive task is to complete a mini-game related to the application corresponding to the virtual scene, if the virtual object does not have permission to use the vehicle control, when receiving a trigger operation for the vehicle control in an inactive state, the game interface is displayed, and in response to the game execution operation, the execution result of the game execution operation is displayed in the game interface; when the execution result indicates that the game is completed, it is determined that the interactive task is completed. Based on this, when the interactive task is completed, the virtual object is controlled to have permission to use the vehicle control.
[0140] After the virtual object has permission to use the vehicle controls, a prompt message can be displayed, indicating that the virtual object has permission to use the vehicle controls. This allows the virtual object to be controlled based on the set interactive tasks, thus increasing the diversity of interaction methods during virtual object interaction and improving human-computer interaction efficiency and hardware resource utilization.
[0141] By applying the above-mentioned embodiment of the present application, while displaying a virtual vehicle in a virtual scene, a vehicle control and a connection element for indicating the association between the vehicle control and the first virtual vehicle are also displayed. Thus, based on the connection element, in response to a trigger operation on the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. In this way, when a user triggers the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. Compared with the solution of manually moving the virtual object to the corresponding vehicle and then entering the vehicle, the efficiency of the virtual object entering the vehicle is improved. At the same time, based on the connection element for indicating the association between the vehicle control and the first virtual vehicle, the virtual vehicle that can be entered based on the vehicle control is clarified, that is, the virtual vehicle that the virtual object will enter is clarified. This not only improves the accuracy of the virtual object entering the vehicle, but also further improves the efficiency of the virtual object entering the vehicle. It also improves the efficiency of human-computer interaction and the hardware resource utilization of the electronic device.
[0142] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0143] In games using the related art, when a player wants to enter one of at least one vehicle, they must manually move the virtual object they control to the corresponding vehicle before entering it. Furthermore, if the vehicle is too close to another vehicle, the player may not be able to accurately select the desired vehicle when they move to it, and will instead enter a random vehicle. Consequently, the efficiency and accuracy of the virtual object entering a vehicle in the related art are low.
[0144] Based on this, the embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for controlling virtual objects. To address the problems that players cannot intuitively judge and select the vehicle to be boarded when multiple vehicles exist at the same time, as well as the low efficiency of boarding operations, intuitive connection guides are added to the vehicle buttons, so that players can intuitively judge which vehicle will be triggered after clicking the board button; at the same time, when at least one vehicle is in the viewing frame at the same time, the player can long press and drag the board button, and the button will become a joystick. By dragging the joystick, the vehicle to be boarded can be switched, and the corresponding lines will also connect different vehicles in the viewing frame according to the direction of the joystick shaking, so that the player can accurately select the vehicle to be boarded when multiple vehicles exist at the same time; in addition, after the board button is triggered, the player character image will automatically search for the vehicle, and the button will display the countdown progress from automatic vehicle search to boarding, so that the player can clearly perceive the progress of automatic vehicle search and boarding, reducing the behavior of interrupting boarding due to accidental touch operations.
[0145] Next, the technical solution of this application is explained from the product side.
[0146] In actual implementation, as shown in FIG4 , when a vehicle is displayed in the game scene (virtual scene), a boarding button (vehicle control) is displayed, wherein the button is connected to the nearest boardable vehicle among the displayed vehicles in the game scene by a line (connecting element). When there are at least two vehicles at the same time, it is convenient to select the vehicle to be boarded. When the player clicks on the boarding button, as shown in FIG9 , a countdown progress bar is displayed on the button, indicating that the character is automatically searching for and heading towards the vehicle. At the same time, the game character (virtual object) is controlled to automatically move to the vehicle position. The player does not need to perform additional operations. When the game character arrives at the vehicle position, it automatically boards the vehicle.
[0147] In some embodiments, players can also select other vehicles. As shown in Figures 5 and 6, when a player presses and holds the boarding button, the button switches to a joystick (which switches the vehicle control from a fixed state to a draggable state). In response to a shake (drag) of the joystick, the player switches to a different vehicle. Corresponding lines connect to different vehicles within the viewing frame based on the direction the joystick is shaken. Then, when the player releases the joystick, the character automatically searches for and heads for the selected vehicle, and automatically boards the vehicle upon reaching the vehicle's location.
[0148] Next, the technical solution of this application is explained from a technical perspective.
[0149] In actual implementation, the technical solution of this application is completed through four implementation processes, namely the visual connection line of sight process, the automatic vehicle search implementation process, the countdown progress bar implementation process and the vehicle switching implementation process.
[0150] To implement visual connections, a visual connection line module needs to be added to the game's rendering engine. Its main task is to draw a visual connection line between the vehicle boarding button and the nearest available vehicle within the viewing frame. To achieve this, during each frame rendering, the position information of all vehicles within the viewing frame is first traversed. The closest vehicle is then found by calculating the distance between each vehicle and the character. Next, a new line object is created, with its starting point set to the location of the boarding button and its end point set to the location of the nearest vehicle. This line object is then added to the rendering queue.
[0151] To implement automatic vehicle search, in the game's character control system, when the player clicks the boarding button, the character automatically moves toward the vehicle connected by the visual connection line. To achieve this, the character's position and the nearest vehicle's position are retrieved during each frame update. A path planning algorithm is then used to calculate the shortest path from the character's current position to the vehicle's location. Based on this path and the character's movement speed, the character's desired distance and direction are calculated for each frame, and the character's position is then updated.
[0152] To implement the countdown progress bar, after the player clicks the boarding button, a countdown progress bar is displayed on the button. To implement this functionality, we first need to obtain the character's current position and the position of the nearest vehicle during each frame update, and then calculate the total distance between the character and the vehicle. Next, we need to calculate the total time required for the character to reach the vehicle based on the character's movement speed. Finally, we need to calculate the progress of the countdown progress bar based on the elapsed time and the total time, and then update the progress bar display.
[0153] To implement vehicle switching, in the game's input processing system, players can switch between vehicles connected by a visual connection line by long-pressing and dragging the boarding button. To implement this functionality, the player's input information is first obtained during each frame update, and the input direction is calculated based on this information. Based on this direction, the position information of all vehicles within the viewing frame is then traversed to find the closest vehicle in this direction. The endpoint of the visual connection line is then updated to the position of this vehicle.
[0154] In actual implementation, refer to FIG11, which is a flow chart of the operation scheme for accurately selecting a vehicle when multiple vehicles are provided in an embodiment of the present application. Based on FIG11, the operation scheme for accurately selecting a vehicle when multiple vehicles are provided in an embodiment of the present application is implemented through steps 1101 to 1109. First, a connecting line is displayed, connecting the vehicle button and the vehicle closest to the character. When the user determines to enter the vehicle connected by the connecting line, clicks the vehicle button. In response to the click operation on the vehicle button, the character is controlled to automatically search for the vehicle. When the user does not enter the vehicle connected by the connecting line, long presses the vehicle button. In response to the long press operation on the vehicle button, the vehicle button is controlled to switch to a joystick. Then, the user switches the connected vehicle by dragging the joystick. When the user determines to enter the currently connected vehicle, releases the joystick. In response to the release operation on the joystick, the character is controlled to automatically search for the vehicle. Then, during the automatic vehicle search process, a vehicle boarding progress bar is displayed. When the progress bar is completed, the character walks to the corresponding vehicle, thereby controlling the character to enter the vehicle.
[0155] In some embodiments, when a player long-presses, drags, and switches vehicles, a linked corresponding vehicle's basic attribute panel will also be displayed, including the name and basic values, to assist the player in making an instant selection. This way, the player can quickly view the basic values and rarity of the vehicle without having to enter the details interface. As shown in Figure 7, a connecting line is displayed, and the connecting line defaults to the vehicle with the highest attribute value and rarity. When the configuration values and rarity are the same, the default connection is the closest. When the player long-presses the boarding button, the boarding button is controlled to switch to the joystick. Then, in response to the player's dragging operation on the joystick, the vehicle attribute panel of the vehicle currently connected by the connecting line is displayed. This assists the player in selecting a vehicle and determining whether to switch to a different vehicle. Finally, based on the vehicle attribute panel, when the player releases the joystick, the controlled character automatically moves to the vehicle corresponding to the vehicle attribute panel and enters the vehicle.
[0156] Thus, this application introduces visual line guidance to make the player more clear about the currently selected vehicle. It not only provides players with a quick way to trigger the vehicle, but also allows players to freely choose how to switch vehicles. This not only improves the player's operating efficiency and adds an automatic vehicle search function, but also reduces the player's operating costs.
[0157] By applying the above-mentioned embodiment of the present application, while displaying a virtual vehicle in a virtual scene, a vehicle control and a connection element for indicating the association between the vehicle control and the first virtual vehicle are also displayed. Thus, based on the connection element, in response to a trigger operation on the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. In this way, when a user triggers the vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. Compared with the solution of manually moving the virtual object to the corresponding vehicle and then entering the vehicle, the efficiency of the virtual object entering the vehicle is improved. At the same time, based on the connection element for indicating the association between the vehicle control and the first virtual vehicle, the virtual vehicle that can be entered based on the vehicle control is clarified, that is, the virtual vehicle that the virtual object will enter is clarified. This not only improves the accuracy of the virtual object entering the vehicle, but also further improves the efficiency of the virtual object entering the vehicle. It also improves the efficiency of human-computer interaction and the hardware resource utilization of the electronic device.
[0158] The following further describes an exemplary structure of a virtual object control device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, as shown in FIG2 , the software module stored in the virtual object control device 455 in the memory 450 may include:
[0159] Display module 4551 is configured to display at least one virtual vehicle and a vehicle control in a virtual scene; wherein a connection element is provided between the vehicle control and a first virtual vehicle of the at least one virtual vehicle, the connection element being used to indicate the virtual vehicle associated with the vehicle control;
[0160] The control module 4552 is configured to control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control.
[0161] In some embodiments, the control module 4552 is further configured to display the process of the virtual object moving toward the first virtual vehicle in response to a trigger operation on the vehicle control; and when the virtual object moves into the sensing area of the first virtual vehicle, control the virtual object to enter the first virtual vehicle.
[0162] In some embodiments, the device also includes a second display module, which is configured to display a distance progress bar in the associated area of the vehicle control during the process of the virtual object moving toward the first virtual vehicle; wherein the progress displayed by the distance progress bar increases as the distance between the virtual object and the first virtual vehicle decreases, and the distance progress bar is used to indicate the proportion of the distance moved by the virtual object to the total distance between the virtual object and the first virtual vehicle.
[0163] In some embodiments, the device also includes a third display module, and the third display module is further configured to display a countdown in the associated area of the vehicle control during the process of the virtual object moving toward the first virtual vehicle; wherein, the countdown is used to indicate the time required for the virtual object to move to the first virtual vehicle.
[0164] In some embodiments, the device also includes a second control module, which is configured to determine the second virtual vehicle as the first virtual vehicle in response to the distance between the virtual object and the second virtual vehicle in the at least one virtual vehicle satisfying a distance condition, and control the connecting element to connect the vehicle control and the second virtual vehicle.
[0165] In some embodiments, the number of the virtual vehicles is at least two, and the device further includes a first switching module, which is configured to control the movement of the virtual object in response to a movement instruction for the virtual object; during the movement of the virtual object, in response to a virtual vehicle among at least two of the virtual vehicles that meets the distance condition being switched from the second virtual vehicle to the third virtual vehicle, the third virtual vehicle is determined as the first virtual vehicle, and the connecting element is switched from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the third virtual vehicle.
[0166] In some embodiments, the number of virtual vehicles is at least two, and the device further includes a second switching module, which is configured to switch the first virtual vehicle from the second virtual vehicle to the fourth virtual vehicle indicated by the vehicle switching instruction in response to a vehicle switching instruction triggered based on the vehicle control, and switch the connection element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the fourth virtual vehicle.
[0167] In some embodiments, the vehicle control is in a draggable state, and the device also includes a fourth display module, which is configured to display a draggable area corresponding to the vehicle control in the draggable state; in response to a drag operation performed on the vehicle control in the draggable area, when the drag angle of the drag operation reaches a drag angle threshold, a vehicle switching instruction triggered based on the vehicle control is received.
[0168] In some embodiments, the device also includes a state switching module, which is configured to display the vehicle control in a fixed state; and in response to a state switching instruction for the vehicle control in a fixed state, switch the vehicle control from the fixed state to the draggable state.
[0169] In some embodiments, the device also includes a third control module, which is configured to determine the fifth virtual vehicle as the first virtual vehicle in response to the movable speed of the fifth virtual vehicle in the at least one virtual vehicle reaching a moving speed threshold, and control the connecting element to connect the vehicle control with the fifth virtual vehicle.
[0170] In some embodiments, the number of virtual vehicles is at least two, and the device also includes a third switching module, which is configured to display the attribute information of the fifth virtual vehicle at the associated position of the vehicle control; in response to a vehicle switching instruction triggered based on the vehicle control, switch the first virtual vehicle from the fifth virtual vehicle to the sixth virtual vehicle indicated by the vehicle switching instruction; at the associated position of the vehicle control, display the attribute information of the fifth virtual vehicle, and switch to display the attribute information of the sixth virtual vehicle, and switch the connection element from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle.
[0171] In some embodiments, the device also includes a fourth control module, which is configured to respond to a pressing operation on the vehicle control, and when the pressing operation satisfies a pressing condition, control the at least one virtual vehicle to be in an optional state; respond to a selection operation on a seventh virtual vehicle among the at least one virtual vehicle, control the seventh virtual vehicle to be in a selected state; respond to a determination instruction on the seventh virtual vehicle in the selected state, determine the seventh virtual vehicle as the first virtual vehicle, and control the connecting element to connect the vehicle control with the seventh virtual vehicle.
[0172] In some embodiments, the number of virtual vehicles is at least two, the trigger operation includes a drag operation on the vehicle control and a release operation on the drag operation, the first virtual vehicle is the eighth virtual vehicle among the at least two virtual vehicles, and the connecting element connects the vehicle control and the eighth virtual vehicle; the control module 4552 is also configured to respond to the drag operation on the vehicle control, when the vehicle control is dragged to the ninth virtual vehicle, determine the ninth virtual vehicle as the first virtual vehicle, and switch the connecting element from connecting the vehicle control and the first virtual vehicle to connecting the vehicle control and the ninth virtual vehicle; in response to the release operation on the drag operation, control the virtual object to automatically enter the ninth virtual vehicle associated with the vehicle control.
[0173] In some embodiments, the device also includes a fifth display module, which is configured to display a virtual object in the virtual scene, where the virtual object is outside the sensing range of the at least one virtual vehicle; in response to a movement instruction for the virtual object, control the virtual object to move toward the at least one virtual vehicle; the display module 4551 is also configured to display the vehicle control when the virtual object moves into the sensing range of the at least one virtual vehicle.
[0174] In some embodiments, the number of the virtual vehicles is at least two, and the device further includes a fifth control module, which is configured to control the virtual object to leave the first virtual vehicle and automatically enter a tenth virtual vehicle among at least one other virtual vehicle in response to a vehicle switching instruction triggered based on the vehicle control; wherein the other virtual vehicle is a virtual vehicle other than the first virtual vehicle among at least two virtual vehicles, and the tenth virtual vehicle is the virtual vehicle to be switched as instructed by the vehicle switching instruction.
[0175] In some embodiments, the first virtual vehicle includes at least one of a ship-type vehicle and a flying vehicle. When the first virtual vehicle includes a ship-type vehicle, the first virtual vehicle is located in the water, and when the first virtual vehicle includes a flying vehicle, the first virtual vehicle is located in the air. The control module 4552 is further configured to, when the virtual vehicle includes a ship-type vehicle, respond to a trigger operation on the vehicle control, control the virtual object to enter the water and swim from the current position to the location of the first virtual vehicle; when the virtual object swims to the location of the first virtual vehicle, control the virtual object to leave the water and enter the first virtual vehicle; or, when the virtual vehicle includes a flying vehicle, respond to a trigger operation on the vehicle control, control the virtual object to jump from the current position on the ground in the virtual scene to the location of the first virtual vehicle in the air and enter the interior of the first virtual vehicle.
[0176] In some embodiments, the display module 4551 is further configured to display at least one virtual vehicle and the vehicle control in an inactivated state in the virtual scene; wherein the inactivated state is used to indicate that the virtual object does not have permission to use the vehicle control; the device also includes a sixth control module, which is configured to control the vehicle control to switch from the inactivated state to the activated state in response to the virtual object having permission to use the vehicle control; the control module 4552 is further configured to control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control in the activated state.
[0177] In some embodiments, the device also includes a sixth display module, which is configured to display interactive tasks and task guidance information, wherein the task guidance information is used to guide the virtual object to perform the interactive task; in response to a task execution operation for the interactive task triggered based on the task guidance information, the process of the virtual object performing the interactive task is displayed; when the virtual object completes the interactive task, the virtual object is controlled to have the right to use the vehicle control.
[0178] An embodiment of the present application provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions or the computer program from the computer-readable storage medium and executes the computer-executable instructions or the computer program, causing the electronic device to perform the virtual object control method described in the embodiment of the present application.
[0179] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the virtual object control method provided by the embodiment of the present application, for example, the virtual object control method shown in Figure 3.
[0180] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM; or various devices including one or any combination of the above memories.
[0181] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0182] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0183] As an example, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.
[0184] In summary, the embodiments of the present application have the following beneficial effects:
[0185] (1) When a user triggers a vehicle control, the virtual object is controlled to automatically enter the first virtual vehicle associated with the vehicle control. Compared with the solution of manually moving the virtual object to the corresponding vehicle and then entering the vehicle, the efficiency of the virtual object entering the vehicle is improved; at the same time, based on the connection element for indicating the association relationship between the vehicle control and the first virtual vehicle, the virtual vehicle that can be entered based on the vehicle control is clarified, that is, the virtual vehicle that the virtual object will enter is clarified, which not only improves the accuracy of the virtual object entering the vehicle, but also further improves the efficiency of the virtual object entering the vehicle, and also improves the human-computer interaction efficiency and the hardware resource utilization of the electronic device.
[0186] (2) By introducing visual line guidance, players can more clearly see the currently selected vehicle. This not only provides players with a quick way to trigger the vehicle, but also allows players to freely choose how to switch vehicles. This not only improves the player's operating efficiency and adds an automatic vehicle search function, but also reduces the player's operating costs.
[0187] (3) It avoids the situation in which, during the process of automatic pathfinding and boarding a vehicle, the player needs to make subjective judgments based on the distance to the vehicle because the progress cannot be perceived. When the player mistakenly thinks that he has reached the virtual vehicle, he performs character displacement operations and interrupts the process of boarding the virtual vehicle. Through the countdown and distance progress bar, the user will clearly perceive the current mobile pathfinding process, reducing the behavior of interrupting the virtual vehicle boarding due to accidental touch operations; in addition, the countdown can also make the player clearly perceive the exact time of boarding the virtual vehicle, so that the player can proceed to the next step.
[0188] It should be noted that in the embodiments of the present application, when it comes to user operations, user historical behavior data and other related data, when the embodiments of the present application are applied to specific products or technologies, corresponding licenses or consents need to be obtained, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0189] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A control method for virtual objects, which is executed by an electronic device. The method includes: In a virtual scene, display at least one virtual vehicle and vehicle controls; Wherein, there is a connection element between the vehicle control and a first virtual vehicle among the at least one virtual vehicle, and the connection element is used to indicate the virtual vehicle associated with the vehicle control; In response to a trigger operation on the vehicle control, control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control.
2. The method according to claim 1, wherein The step of "in response to a trigger operation on the vehicle control, control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control" includes: In response to a trigger operation on the vehicle control, display the process of the virtual object moving towards the first virtual vehicle; When the virtual object moves into the sensing area of the first virtual vehicle, control the virtual object to enter the first virtual vehicle.
3. The method according to claim 2, wherein The method further includes: During the process of the virtual object moving towards the first virtual vehicle, display a distance progress bar in the associated area of the vehicle control; Wherein, the progress displayed by the distance progress bar increases as the distance between the virtual object and the first virtual vehicle decreases, and the distance progress bar is used to indicate the proportion of the distance that the virtual object moves to the total distance between the virtual object and the first virtual vehicle.
4. The method according to claim 2, wherein, The method further includes: During the process of the virtual object moving towards the first virtual vehicle, display a countdown in the associated area of the vehicle control; Wherein, the countdown is used to indicate the required duration for the virtual object to move to the first virtual vehicle.
5. The method according to any one of claims 1 to 4, wherein, Before the step of "in response to a trigger operation on the vehicle control, control the virtual object to automatically enter the first virtual vehicle associated with the vehicle control", the method further includes: In response to the distance between the virtual object and a second virtual vehicle among the at least one virtual vehicle meeting the distance condition, determine the second virtual vehicle as the first virtual vehicle, and control the connection element to connect the vehicle control and the second virtual vehicle.
6. The method according to claim 5, wherein The number of the virtual vehicles is at least two. The method further includes: In response to a movement instruction for the virtual object, control the virtual object to move; During the movement of the virtual object, in response to the virtual vehicle that meets the distance condition among the at least two virtual vehicles being switched from the second virtual vehicle to a third virtual vehicle, determine the third virtual vehicle as the first virtual vehicle, and Switch the connection element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the third virtual vehicle.
7. The method according to claim 5 or 6, wherein The number of the virtual vehicles is at least two. The method further includes: In response to a vehicle switching instruction triggered based on the vehicle control, switch the first virtual vehicle from the second virtual vehicle to a fourth virtual vehicle indicated by the vehicle switching instruction, and Switch the connection element from connecting the vehicle control and the second virtual vehicle to connecting the vehicle control and the fourth virtual vehicle.
8. The method according to claim 7, wherein, The vehicle control is in a draggable state, and the method further includes: Displaying a draggable area corresponding to the vehicle control in the draggable state; In response to a dragging operation on the vehicle control performed in the draggable area, when the dragging angle of the dragging operation reaches a dragging angle threshold, receiving a vehicle switching instruction triggered by the vehicle control.
9. The method according to claim 8, wherein Before displaying the draggable area corresponding to the vehicle control in the draggable state, the method further includes: Displaying the vehicle control in a fixed state; In response to a state switching instruction for the vehicle control in the fixed state, switching the vehicle control from the fixed state to the draggable state.
10. The method according to any one of claims 1 to 9, wherein, Before controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control, the method further includes: In response to the movable speed of the fifth virtual vehicle among the at least one virtual vehicle reaching a moving speed threshold, determining the fifth virtual vehicle as the first virtual vehicle, and controlling the connection element to connect the vehicle control and the fifth virtual vehicle.
11. The method according to claim 10, wherein, The number of the virtual vehicles is at least two, and the method further includes: Displaying the attribute information of the fifth virtual vehicle at an associated position of the vehicle control; In response to a vehicle switching instruction triggered by the vehicle control, switching the first virtual vehicle from the fifth virtual vehicle to a sixth virtual vehicle indicated by the vehicle switching instruction; At an associated position of the vehicle control, switching the display of the attribute information of the fifth virtual vehicle to the display of the attribute information of the sixth virtual vehicle, and switching the connection element from connecting the vehicle control and the fifth virtual vehicle to connecting the vehicle control and the sixth virtual vehicle.
12. The method according to any one of claims 1 to 11, wherein Before controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control, the method further includes: In response to a pressing operation on the vehicle control, when the pressing operation meets a pressing condition, controlling the at least one virtual vehicle to be in an optional state; In response to a selection operation on the seventh virtual vehicle among the at least one virtual vehicle, controlling the seventh virtual vehicle to be in a selected state; In response to a confirmation instruction for the seventh virtual vehicle in the selected state, determining the seventh virtual vehicle as the first virtual vehicle, and controlling the connection element to connect the vehicle control and the seventh virtual vehicle.
13. The method according to any one of claims 1 to 12, wherein, The number of the virtual vehicles is at least two, the trigger operation includes a dragging operation on the vehicle control and a release operation for the dragging operation, the first virtual vehicle is an eighth virtual vehicle among the at least two virtual vehicles, and the connection element connects the vehicle control and the eighth virtual vehicle; Controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control includes: In response to a drag operation on the vehicle control, when the vehicle control is dragged to the ninth virtual vehicle, determine the ninth virtual vehicle as the first virtual vehicle, and switch the connection element from connecting the vehicle control to the first virtual vehicle to connecting the vehicle control to the ninth virtual vehicle; In response to a release operation for the drag operation, control the virtual object to automatically enter the ninth virtual vehicle associated with the vehicle control.
14. The method according to any one of claims 1 to 13, wherein, The method further includes: In the virtual scene, display a virtual object that is outside the sensing range of the at least one virtual vehicle; In response to a movement instruction for the virtual object, control the virtual object to move towards the at least one virtual vehicle; In a virtual scene, display a vehicle control, including: When the virtual object moves into the sensing range of the at least one virtual vehicle, display the vehicle control.
15. The method according to any one of claims 1 to 14, wherein, The number of the virtual vehicles is at least two. After controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control, the method further includes: In response to a vehicle switching instruction triggered based on the vehicle control, control the virtual object to leave the first virtual vehicle and automatically enter the tenth virtual vehicle among at least one other virtual vehicle; Wherein, the other virtual vehicles are virtual vehicles other than the first virtual vehicle among the at least two virtual vehicles, and the tenth virtual vehicle is the virtual vehicle indicated to be switched by the vehicle switching instruction.
16. The method according to any one of claims 1 to 15, wherein The first virtual vehicle includes at least one of a watercraft and an aircraft. When the first virtual vehicle includes a watercraft, the first virtual vehicle is located in water. When the first virtual vehicle includes an aircraft, the first virtual vehicle is located in the air; The controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle control in response to a trigger operation on the vehicle control includes: When the first virtual vehicle includes a watercraft, in response to a trigger operation on the vehicle control, control the virtual object to enter the water and swim from the current position to the location of the first virtual vehicle; when the virtual object swims to the location of the first virtual vehicle, control the virtual object to leave the water and enter the first virtual vehicle; or, When the first virtual vehicle includes an aircraft, in response to a trigger operation on the vehicle control, control the virtual object to jump from the current position on the ground in the virtual scene to the location of the first virtual vehicle in the air and enter the interior of the first virtual vehicle.
17. The method according to any one of claims 1 to 16, wherein The displaying at least one virtual vehicle and a vehicle control in the virtual scene includes: In the virtual scene, display at least one virtual vehicle and the vehicle control in an inactive state; wherein, the inactive state is used to indicate that the virtual object does not have the permission to use the vehicle control; After displaying at least one virtual vehicle and vehicle controls in the virtual scene, the method further includes: In response to the virtual object having the permission to use the vehicle controls, controlling the vehicle controls to switch from the inactive state to the active state; The controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle controls in response to a trigger operation on the vehicle controls includes: In response to a trigger operation on the vehicle controls in the active state, controlling the virtual object to automatically enter the first virtual vehicle associated with the vehicle controls.
18. The method according to claim 17, wherein, Before the controlling the vehicle controls to switch from the inactive state to the active state in response to the virtual object having the permission to use the vehicle controls, the method further includes: Displaying an interaction task and task guidance information for guiding the virtual object to perform the interaction task; In response to a task execution operation for the interaction task triggered based on the task guidance information, displaying the process of the virtual object performing the interaction task; When the virtual object completes the interaction task, controlling the virtual object to have the permission to use the vehicle controls.
19. A control device for a virtual object, the device includes: A display module configured to display at least one virtual vehicle and vehicle controls in a virtual scene; wherein, there is a connection element between the vehicle controls and the first virtual vehicle among the at least one virtual vehicle, and the connection element is used to indicate the virtual vehicle associated with the vehicle controls; A control module configured to control the virtual object to automatically enter the first virtual vehicle associated with the vehicle controls in response to a trigger operation on the vehicle controls.
20. An electronic device, including: A memory configured to store computer-executable instructions or a computer program; A processor configured to implement the control method for a virtual object according to any one of claims 1 to 18 when executing the computer-executable instructions or the computer program stored in the memory.
21. A computer-readable storage medium storing computer-executable instructions or a computer program, and when the computer-executable instructions or the computer program are executed by a processor, implementing the control method for a virtual object according to any one of claims 1 to 18.
22. A computer program product including computer-executable instructions or a computer program, and when the computer-executable instructions or the computer program are executed by a processor, implementing the control method for a virtual object according to any one of claims 1 to 18.
Citation Information
Patent Citations
Virtual character control method and device, electronic equipment and storage medium
CN112843683A
Picture display method and device in virtual scene, computer equipment and storage medium
CN112870712A
Rescue interaction processing method, device, equipment, program product and storage medium
CN114425160A
Information processing method and device in game, electronic equipment and storage medium
CN114832388A
Movement control method and device of virtual object, computer equipment and storage medium
CN116459509A