Method, device, electronic device, storage medium, and computer program for acquiring position in virtual scene
By displaying an operation widget and generating a virtual image in response to interaction, the method efficiently determines the position of a second virtual object in a virtual scene, improving interaction efficiency.
Patent Information
- Application Number
- JP2023518144
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-20
- Filing Date
- 2021-10-09
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2041-10-09
AI Technical Summary
Existing methods for determining the position of a second virtual object in a virtual scene require multiple interactions, leading to inefficient human-computer interaction.
A method and apparatus that display an operation widget for a target virtual item, generate a virtual image corresponding to a first virtual object using the item, and display the position of a second virtual object if it interacts with the image, improving interaction efficiency by reducing the need for repeated interactions.
The method allows for quick determination of the position of a second virtual object by generating a virtual image using a target virtual item, enhancing the efficiency of human-computer interaction in virtual scenes without requiring multiple interactions.
Smart Images

Figure 0007552998000002 
Figure 0007552998000010 
Figure 0007552998000013
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application having application number 202011309691.5, filed on November 20, 2020, the entire contents of which are incorporated herein by reference.
[0002] The present invention relates to a human-computer interaction technology for computers, and in particular to a method, an apparatus, a device, a computer-readable storage medium and a computer program product for obtaining a position in a virtual scene. [Background technology]
[0003] In a virtual scene application, in order to improve the efficiency of interaction between virtual objects, position information of virtual objects can be displayed on the screen of the virtual scene so that a first virtual object can know the position of a second virtual object in the virtual scene.
[0004] In the related art, the method of displaying the position information of the second virtual object so that the first virtual object knows the position of the second virtual object is to display the position information of the second virtual object on the screen of the virtual scene when the first virtual object performs interactions with other virtual objects multiple times and the obtained interaction performance reaches a performance threshold or the achieved interaction level reaches a predetermined level. However, such a method is difficult for the first virtual object, and requires performing interactions multiple times, which reduces the efficiency of human-computer interaction. Summary of the Invention
[0005] Embodiments of the present invention provide a method, apparatus, device, computer-readable storage medium, and computer program product for acquiring a position in a virtual scene, which can improve the efficiency of human-computer interaction by acquiring the position of a virtual object in the virtual scene based on a generated virtual image.
[0006] The technical solutions of the embodiments of the present invention are as follows:
[0007] In an embodiment of the present invention, a method for acquiring a position in a virtual scene, executed by an electronic device, is provided, the method including: displaying an operation widget for a target virtual item on a screen of the virtual scene; in response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to use the target virtual item to generate a virtual image corresponding to the first virtual object; and, if a second virtual object that interacts with the virtual image exists in the virtual scene, displaying a position of the second virtual object in the virtual scene.
[0008] In an embodiment of the present invention, a position acquisition device in a virtual scene is provided, the device including: a first display module that displays an operation widget for a target virtual item on a screen of the virtual scene; a control module that controls a first virtual object in the virtual scene to use the target virtual item to generate a virtual image corresponding to the first virtual object in response to a virtual image generation operation triggered based on the operation widget; and a second display module that displays a position of the second virtual object in the virtual scene when a second virtual object that interacts with the virtual image is present in the virtual scene.
[0009] In an embodiment of the present invention, an electronic device is provided that includes a memory having executable instructions stored therein, and a processor that, when executing the executable instructions stored in the memory, realizes a method for obtaining position in a virtual scene according to an embodiment of the present invention.
[0010] In an embodiment of the present invention, there is provided a computer readable storage medium having executable instructions stored thereon, the instructions, when executed by a processor, implementing a method for obtaining position in a virtual scene according to an embodiment of the present invention.
[0011] In an embodiment of the present invention, there is provided a computer program product including a computer program or instructions which, when executed by a processor, implements a method for obtaining position in a virtual scene according to an embodiment of the present invention.
[0012] The embodiment of the present invention has the following advantageous effects.
[0013] In an embodiment of the present invention, an operation widget for a target virtual item is displayed on a screen of a virtual scene, and in response to a virtual image generation operation triggered based on the operation widget, a first virtual object in the virtual scene is controlled to generate a virtual image corresponding to the first virtual object using the target virtual item, and if a second virtual object that interacts with the virtual image exists in the virtual scene, the position of the second virtual object in the virtual scene is displayed. Thus, according to the embodiment of the present invention, if a second virtual object that interacts with the virtual image exists in the virtual scene, the position of the second virtual object can be determined. That is, according to the embodiment of the present invention, the position of the second virtual object that interacts with the virtual image in the virtual scene can be quickly determined based on the generated virtual image. In addition, since the virtual image can be generated simply by using the target virtual item, compared to other methods that require multiple interaction operations to obtain the position of the virtual object, the embodiment of the present invention can determine the position information of the virtual object without the need to perform multiple interaction operations, and the efficiency of obtaining position information is relatively high, thereby improving the efficiency of human-computer interaction. [Brief description of the drawings]
[0014] [Figure 1] FIG. 2 is a schematic diagram of the architecture of a position acquisition system in a virtual scene according to an embodiment of the present invention. [Diagram 2] 1 is a schematic diagram illustrating a configuration of an electronic device according to an embodiment of the present invention. [Diagram 3] 1 is a schematic diagram of the principle of a human-computer interaction engine installed in a position acquisition device in a virtual scene according to an embodiment of the present invention; [Figure 4] 2 is a flowchart of a method for acquiring position in a virtual scene according to an embodiment of the present invention. [Diagram 5] FIG. 2 is a schematic diagram of a virtual item display interface according to an embodiment of the present invention. [Figure 6] 2 is a schematic diagram of a virtual item usage interface according to an embodiment of the present invention. [Figure 7] 2 is a schematic diagram of a virtual item usage interface according to an embodiment of the present invention. [Figure 8A] 2 is a schematic diagram of a virtual item usage interface according to an embodiment of the present invention. [Figure 8B] 1 is a schematic diagram of a throwing trajectory generation interface according to an embodiment of the present invention; [Figure 9] 2 is a schematic diagram of a virtual item usage interface according to an embodiment of the present invention. [Figure 10] 2 is a schematic diagram of a virtual item usage interface according to an embodiment of the present invention. [Figure 11] FIG. 2 is a schematic diagram of interaction detection according to an embodiment of the present invention. [Figure 12] 1 is a schematic diagram of a position indicator according to an embodiment of the present invention; [Figure 13] 1 is a schematic diagram of a position indicator according to an embodiment of the present invention; [Figure 14] 1 is a schematic diagram of a position indicator according to an embodiment of the present invention; [Figure 15] 2 is a flowchart of a method for acquiring position in a virtual scene according to an embodiment of the present invention. [Figure 16] FIG. 2 is a schematic diagram of a projection display according to an embodiment of the present invention. [Figure 17] FIG. 2 is a schematic diagram of a mapping relationship between a spatial display map of a virtual scene and a map thumbnail image according to an embodiment of the present invention. [Figure 18] FIG. 2 is a schematic diagram of the configuration of a position acquisition device in a virtual scene according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] In order to make the objectives, technical means and advantages of the present invention clearer, the following will further describe the embodiments of the present invention in detail with reference to the drawings. The described embodiments do not limit the present invention, and all other embodiments that a person skilled in the art can obtain without performing creative work belong to the scope of protection of the present invention.
[0016] In the following description, references to "some embodiments" describe a subset of all possible embodiments, but the "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other unless inconsistent.
[0017] In the following description, references to the terms "first" and "second" are merely intended to distinguish between similar objects and do not represent a particular order of the objects. It should be noted that "first" and "second" may be interchanged with respect to a particular order or order, where permitted, such that the described embodiments of the invention may be practiced in orders other than those shown or described herein.
[0018] Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art. The terms used in this specification are merely for describing the embodiments of the present invention and are not intended to limit the present invention.
[0019] Before describing the embodiments of the present invention in more detail, the nouns and terms contained in the embodiments of the present invention will be explained, and the nouns and terms contained in the embodiments of the present invention are suitable for the following interpretation.
[0020] (1) Client: An application executed on a terminal to provide various services, such as a video playback client, a game client, etc.
[0021] (2) "In response to": Used to express a condition or state on which the performed operation depends. When the dependent condition or state is met, the one or more operations that are performed may be in real time or may have a configured delay. Unless otherwise specified, there is no restriction on the execution order of the multiple operations that are performed.
[0022] (3) Virtual Scene: A virtual scene displayed (or provided) when an application program is executed on a terminal. The virtual scene may be a simulation environment for the real world, a semi-simulation and semi-fictional environment, or a purely fictional environment. The virtual scene may be any of a 2D virtual scene, a 2.5D virtual scene, and a 3D virtual scene, but the embodiment of the present invention is not limited to the dimension of the virtual scene. For example, the virtual scene may include sky, land, sea, etc. The land may include environmental elements such as desert, city, etc., and the user may control virtual objects to move within the virtual scene.
[0023] (4) Virtual object: It may be a representation of a person or thing that can be interacted with in the virtual scene, or it may be a movable object in the virtual scene. The movable object may be a virtual character, a virtual animal, a cartoon or animation character, etc., such as a character, an animal, a plant, a barrel, a wall, a stone, etc. displayed in the virtual scene. The virtual object may be a virtual representation representing a user in the virtual scene. The virtual scene may include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.
[0024] Preferably, the virtual object may be a user character controlled by an operation at a client, an artificial intelligence (AI) set in a battle in a virtual scene by training, or a non-player character (NPC) set in an interaction in a virtual scene. Preferably, the virtual object may be a virtual character performing a competitive interaction in a virtual scene. Preferably, the number of virtual objects participating in an interaction in the virtual scene may be set in advance, or may be dynamically determined according to the number of clients participating in the interaction.
[0025] (5) Scene data: Represents various characteristics of objects in a virtual scene in an interaction process, and may include, for example, the position of objects in the virtual scene. It may include various types of characteristics depending on the type of virtual scene. For example, in a game virtual scene, the scene data may include the waiting time of various functions configured in the virtual scene (which depends on the number of times the same function can be used within a given period of time), and may include attribute values representing various states of a game character, such as a life value (HP) (also referred to as the amount of red) and a magic value (also referred to as the amount of blue).
[0026] 1 is a schematic diagram of an architecture of a position acquisition system 100 in a virtual scene according to an embodiment of the present invention. As shown in FIG. 1, to realize one exemplary application, terminals (e.g., terminal 400-1 and terminal 400-2) are connected to a server 200 via a network 300, which may be a wide area network or a local area network, or a combination of the two, and realize data transmission using wireless or wired links.
[0027] The terminal may be various types of user terminals such as a smartphone, a tablet computer, a notebook computer, etc., or may be a desktop computer, a game console, a television, an in-vehicle terminal, or a combination of any two or more of these data processing devices. The server 200 may be a single server individually configured to support various services, may be configured as a server cluster, or may be a cloud server.
[0028] In the implementation, the terminal installs and executes an application program supporting the virtual scene. The application program may be any of a First-Person Shooting game (FPS), a Third-Person Shooting game, a Multiplayer Online Battle Arena game (MOBA), a Massive Multiplayer Online game (MMO), a Two Dimension (abbreviated as 2D) game application, a Three Dimension (abbreviated as 3D) game application, a Virtual Reality application program, a Three-Dimensional map program, a military simulation program, or a Multiplayer Gun Battle Survival game. The application program may be an application program such as a standalone version, for example, a standalone version of a 3D game program. A user may use the terminal to control a virtual object to perform an activity in the virtual scene. The activity includes, but is not limited to, at least one of adjusting a body posture, crawling, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and cutting. For example, the virtual object may be a virtual character that simulates a human character, an animated character, or the like.
[0029] In the example of an electronic game scene, a user may operate the terminal in advance, and the terminal may download a game configuration file of the electronic game after detecting the user's operation. The game configuration file may include an application program of the electronic game, interface display data, or virtual scene data, etc. Thus, when the user logs into the electronic game on the terminal, the game configuration file can be called up and the electronic game interface can be rendered and displayed. The user may perform a touch operation on the terminal. After detecting the touch operation, the terminal may determine game data corresponding to the touch operation, and render and display the game data. The game data may include virtual scene data, motion data of virtual objects in the virtual scene, etc.
[0030] In the implementation, when entering the virtual scene, the terminal sends a request to obtain scene data of the virtual scene to the server 200, and the server obtains the scene data of the virtual scene based on the request to obtain scene data of the virtual scene and returns it to the terminal. The terminal receives the scene data of the virtual scene, renders a screen of the virtual scene based on the scene data, displays an operation widget of a target virtual item on the screen of the virtual scene, and controls a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item in response to a virtual image generation operation triggered based on the operation widget, and displays the position of the second virtual object in the virtual scene when a second virtual object that interacts with the virtual image exists in the virtual scene.
[0031] In the example of military virtual simulation application, the virtual scene technology is used to allow trainees to visually and aurally experience the battlefield environment, become familiar with the environmental characteristics of the battlefield, and interact with objects in the virtual environment through necessary equipment. The battlefield environment may be realized by creating a three-dimensional battlefield environment close to the real environment through background generation and image synthesis using a corresponding three-dimensional battlefield environment graphic image library including battle backgrounds, battlefield scenes, various weapons equipment, and combat personnel.
[0032] In the implementation, when entering the virtual scene, the terminal sends a request to obtain scene data of the virtual scene to the server 200, and the server obtains the scene data of the virtual scene based on the request to obtain scene data of the virtual scene and returns it to the terminal. The terminal receives the scene data of the virtual scene, renders a screen of the virtual scene based on the scene data, displays an operation widget of a target virtual item on the screen of the virtual scene, and controls a first virtual object (e.g., a simulated opponent) in the virtual scene to use the target virtual item to generate a virtual image corresponding to the first virtual object in response to a virtual image generation operation triggered based on the operation widget, and displays the position of the second virtual object in the virtual scene if a second virtual object (e.g., a simulated enemy) that interacts with the virtual image exists in the virtual scene.
[0033] FIG. 2 is a schematic diagram of a configuration of an electronic device 500 according to an embodiment of the present invention. As shown in FIG. 2, in implementation, the electronic device 500 may be the terminal 400-1, the terminal 400-2, or the server shown in FIG. 1. Taking as an example that the electronic device is the terminal 400-1 or the terminal 400-2 shown in FIG. 1, a computer device for implementing a position acquisition method in a virtual scene according to an embodiment of the present invention will be described. As shown in FIG. 2, the electronic device 500 includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. Each component in the electronic device 500 is connected via a bus system 540. The bus system 540 is used to realize connection communication between these components. The bus system 540 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For convenience of explanation, each bus in FIG. 2 is collectively referred to as a bus system 540.
[0034] The processor 510 may 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 may be a microprocessor or any conventional processor, etc.
[0035] User interface 530 includes one or more output devices 531 that enable display of media content, including one or more speakers and / or one or more visual displays. User interface 530 further includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, and other input buttons and widgets.
[0036] Memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. Memory 550 preferably includes one or more storage devices that are physically separate from the processor 510.
[0037] The memory 550 may include volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be Read Only Memory (ROM), and the volatile memory may be Random Access Memory (RAM). The memory 550 described in embodiments of the present invention is intended to include any suitable type of memory.
[0038] In some embodiments, memory 550 may store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, such as those illustrated below.
[0039] The operating system 551 includes system programs for processing various basic system services, implementing various basic services, and performing hardware-related tasks, such as a framework layer, a core library layer, and a driver layer for handling hardware-based tasks.
[0040] The network communication module 552 reaches other electronic devices through one or more (wired or wireless) network interfaces 520. Network interfaces 520 include, for example, Bluetooth, wireless compatibility (WiFi), and Universal Serial Bus (USB).
[0041] The display module 553 displays information through associated output devices 531 (eg, displays, speakers, etc.) via a user interface 530 (eg, a user interface for operating peripherals and displaying content and information).
[0042] The input processing module 554 detects one or more user inputs or interactions from one of the one or more input devices 532 and transforms the detected inputs or interactions.
[0043] In some embodiments, the position acquisition device in the virtual scene according to the embodiment of the present invention may be realized by software. As shown in FIG. 2, the position acquisition device in the virtual scene 555 stored in the memory 550 may be software in the form of a program, a plug-in, etc., and includes a first display module 5551, a control module 5552, and a second display module 5553. These modules are logical, so they may be arbitrarily combined or further divided according to the realized functions. The following describes the functions of the modules.
[0044] In some other embodiments, the device according to the embodiment of the present invention may be implemented in hardware. As an example, the device according to the embodiment of the present invention may employ a processor in the form of a hardware decoding processor, which is programmed to execute the method for obtaining a position in a virtual scene according to the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate Arrays (FPGAs) or other electronic components.
[0045] In some embodiments, the position acquisition device in the virtual scene 555 is installed with a human-computer interaction engine configured to realize the position acquisition method in the virtual scene. The human-computer interaction engine includes a functional module, a component, or a plug-in software configured to realize the position acquisition method in the virtual scene. Figure 3 is a schematic diagram of the principle of a human-computer interaction engine installed in the position acquisition device in the virtual scene according to an embodiment of the present invention. As shown in Figure 3, it is taken as an example that the virtual scene is a game scene, and the human-computer interaction engine is a game engine accordingly.
[0046] A game engine is a set of machine-recognizable codes or instructions designed by a machine to execute a specific type of game, like an engine, which controls the operation of the game. A game program can be mainly divided into two parts: game engine and game resources. Game resources include images, sounds, videos, etc., so game = game engine (program code) + game resources (images, sounds, videos, etc.), and the game engine calls these resources sequentially according to the requirements of the game design.
[0047] The method for acquiring position in a virtual scene according to the embodiment of the present invention may be implemented by each module in the device for acquiring position in a virtual scene shown in Fig. 2 calling a related module, component, or plug-in software of the game engine shown in Fig. 3. The following exemplarily describes the modules, components, or plug-in software included in the game engine shown in Fig. 3.
[0048] (1) Virtual camera: A necessary component of the game scene screen, it is used to display the game scene screen. The game scene corresponds to at least one virtual camera, and may have two or more virtual cameras according to actual needs. The virtual camera is used as a rendering window of the game to capture and display the screen content of the game world for the player. By setting the parameters of the virtual camera, the viewpoint (viewing angle) for the player to observe the game world, such as a first-person viewpoint or a third-person viewpoint, can be adjusted.
[0049] (2) Scene construction: Used for managing game scenes such as collision detection, visibility elimination, etc. Here, collision detection may be realized through a collision body, and the collision body may be realized by an axis-aligned bounding box (AABB) or an oriented bounding box (OBB) according to actual needs. Visibility elimination may be realized based on a view volume. A view volume is a stereoscopic frame generated by a virtual camera and is used to trim objects outside the visible range of the camera. Objects within the view volume are projected onto the view plane, and objects outside the view volume are discarded and not processed.
[0050] (3) Terrain Management: A component for managing terrain in a game scene, which is used to create and edit game terrains in a game scene, such as mountains, canyons, and caves.
[0051] (4) Editor: An auxiliary tool for game design, including the following:
[0052] Scene Editor: Used to edit the contents of game scenes, such as changing the terrain, customizing vegetation distribution, and lighting layout.
[0053] Model Editor: Used to create and edit in-game models (character models in a game scene).
[0054] Special Effects Editor: Used to edit the special effects in the game screen.
[0055] Action Editor: Used to define and edit the actions of characters on the game screen.
[0056] (5) Special Effects Component: Used to create and edit game special effects on the game screen. In implementation, particle special effects and texture UV animation may be used. Here, particle special effects combine a large number of single particles to express a fixed shape, and their overall or individual movements are controlled by a controller and script to simulate real-world effects such as water, fire, fog, and gas. UV animation is texture animation realized by dynamically changing the UV coordinates of an image.
[0057] (6) Skeletal animation: Animation achieved by moving objects using built-in bones, which may be understood as two concepts:
[0058] Bone: an abstract concept for controlling skin, such as human bones for controlling skin.
[0059] Skinning: An externally visible element controlled by bones, such as human skin being influenced by bones.
[0060] (7) Morph animation: This is a deformation animation achieved by adjusting the vertices of a basic model.
[0061] (8) UI widget: A widget for displaying the game screen.
[0062] (9) Fundamental Algorithms: These are algorithms that need to be called to realize the functions of the game engine, including, for example, graphics algorithms required to realize scene composition, and matrix transformations and vector transformations required to realize skeletal animation.
[0063] (10) Rendering component: A component required for displaying game screen effects. The rendering component can convert a scene described by 3D vectors into a scene described by 2D pixels. Examples include model rendering and scene rendering.
[0064] (11) A* Search: An algorithm for finding the shortest path used in path planning, searching and graph traversal in game design.
[0065] Next, a method for acquiring a position in a virtual scene according to an embodiment of the present invention will be described. In practical implementation, the method for acquiring a position in a virtual scene according to an embodiment of the present invention can be implemented by a server or a terminal alone, or by a server and a terminal together.
[0066] 4 is a flow chart of a method for acquiring position in a virtual scene according to an embodiment of the present invention. The following describes the steps of the method with reference to FIG.
[0067] Step 101: The terminal displays an operation widget for a target virtual item on a screen of a virtual scene.
[0068] In the implementation, an application program supporting a virtual scene is installed on the terminal, and when a user launches the application program on the terminal and the terminal executes the application program, the terminal obtains scene data of the virtual scene, renders a screen of the virtual scene based on the scene data of the virtual scene, and displays an operation widget of the target virtual item on the screen of the rendered virtual scene.
[0069] Here, the screen of the virtual scene may be acquired by observing the virtual scene from a first-person object's viewpoint, or may be acquired by observing the virtual scene from a third-person viewpoint. In addition to the skill widget of the target skill, the screen of the virtual scene may further display an interaction object and an object interaction environment in which a first virtual object and a second virtual object in an antagonistic relationship interact with each other in the virtual scene.
[0070] Here, the target virtual item is a virtual item that can generate a virtual image corresponding to the first virtual object after being used by the first virtual object, and can display the position of the second virtual object when there is a second virtual object that interacts with the virtual image. In the implementation, if the terminal has already controlled the first virtual object to equip the target virtual item, it may display an operation widget of the target virtual item taken out from the item pouch on the screen of the virtual scene. If the first virtual object does not equip the target virtual item, the terminal may first control the first virtual object to obtain the target virtual item through a virtual resource or interaction, and then display the corresponding operation widget on the screen of the virtual scene, so as to control the first virtual object to use the target virtual item through the operation widget.
[0071] In some embodiments, before the terminal displays the manipulation widget for the target virtual item on the screen of the virtual scene, the terminal may select and equip the target virtual item as follows:
[0072] A selection interface including at least one virtual item is displayed on a screen of the virtual scene, and in response to a selection operation of the virtual item triggered based on the selection interface, the selected virtual item is determined as a target virtual item.
[0073] Here, the terminal may display a selection interface for selecting an item before displaying a screen of a virtual scene or while displaying a screen of a virtual scene. The selection interface includes at least one virtual item. Here, the virtual item may be displayed in the form of an operation widget. Here, the operation widget may be an icon corresponding to the virtual item or a key corresponding to the virtual item. The selection interface may be a display interface that occupies the entire terminal or a display interface that occupies a part of the entire display interface of the terminal. For example, the selection interface may be displayed as if it is floating above the screen of the virtual scene. When a user selects a target virtual item from at least one virtual object displayed in the selection interface and triggers, for example, an operation widget of the target virtual item, the target virtual item may be displayed on the screen of the virtual scene.
[0074] In the implementation, when the terminal receives a selection operation of a virtual item triggered based on the selection interface, the terminal displays the selected virtual item and an equipment function item corresponding to the selected virtual item in a different display style from the display style of other virtual items, for example, the selected virtual item may be highlighted. Here, the selected virtual item may be highlighted and function introduction information of the target virtual item may be further displayed. When the user triggers the equipment function item, the terminal determines the selected virtual item as the target virtual item, controls the first virtual object to equip the target virtual item in the item pouch, and simultaneously displays an operation widget of the target virtual item in the virtual item bar on the screen of the virtual scene. When the user triggers the operation widget of the target virtual item in the virtual item bar, the terminal controls the first virtual object to take out the target virtual item from the item pouch for use in response to the trigger operation, and displays an operation widget of the target virtual item on the screen of the virtual scene.
[0075] 5 is a schematic diagram of a virtual item display interface according to an embodiment of the present invention. As shown in FIG. 5, when a user triggers an operation widget 502 of a virtual item in a selection interface 501 of a virtual item shown in FIG. 5, the selected operation widget 502 is highlighted, and an introduction information 503 of the virtual item corresponding to the operation widget 502 is displayed. When a user taps (clicks) an equipped function item 504, the terminal determines the virtual item corresponding to the operation widget 502 as a target virtual item, and displays an operation widget of the target virtual item in the virtual item bar. When a user triggers an operation widget 505, the terminal controls the first virtual object to take out the target virtual item from the item pouch for use in response to the trigger operation, and displays an operation widget 506 of the target virtual item on the screen of the virtual scene.
[0076] Step 102: In response to the virtual image generation operation triggered based on the operation widget, control a first virtual object in the virtual scene to use the target virtual item to generate a virtual image corresponding to the first virtual object.
[0077] Here, when a user triggers an operation widget of a target virtual item, the terminal receives a virtual image generation operation in response to the trigger operation, and controls a first virtual object to use the target virtual item to generate a virtual image corresponding to the first virtual object in response to the virtual image generation operation.
[0078] 6 is a schematic diagram of a virtual item use interface according to an embodiment of the present invention. As shown in FIG. 6, when a user triggers an operation widget 601 of a target virtual item shown in FIG. 6, the terminal controls a first virtual object to use the target virtual item and generate a virtual image 602 corresponding to the first virtual object in response to the trigger operation.
[0079] In some embodiments, the terminal may control a first virtual object in a virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item as follows:
[0080] When the target virtual item is a throwing item, a target position is displayed on a screen of a virtual scene, and a first virtual object is controlled to throw the target virtual item at the target position, and when the target virtual item falls at the target position, a virtual image corresponding to the first virtual object is generated at the target position.
[0081] Here, when the target virtual item is a throwing item such as a grenade or a bomb, when the user triggers the operation widget of the target virtual item, the terminal responds to the trigger operation by displaying the target position (i.e., the landing point) where the target virtual item is about to be thrown, controlling the first virtual object to throw the target virtual item at the target position, and generating a 1:1 holographic projection, i.e., a virtual image, of the first virtual object at the target position after the target virtual item falls at the target position. On the screen of the virtual scene from the enemy's viewpoint, the virtual projection matches the outline of the first virtual object using the target virtual item.
[0082] 7 is a schematic diagram of a virtual item using interface according to an embodiment of the present invention. As shown in FIG. 7, when a user taps on an operation widget 701 of a target virtual item shown in FIG. 7, the terminal displays a target position 702 where the target virtual item is about to be thrown according to the tapping operation, controls a first virtual object to throw the target virtual item to the target position 702, and when the tapping operation is released, displays the process of the target virtual item falling to the target position 702, and generates a virtual image 703 corresponding to the first virtual object at the target position 702 after the target virtual item falls to the target position 702.
[0083] In some embodiments, the terminal may control a first virtual object in a virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item as follows:
[0084] When the target virtual item is a throwing item, a throwing trajectory is displayed on the screen of the virtual scene, and a first virtual object is controlled to throw the target virtual item along the throwing trajectory, and when the target virtual item moves to a target position along the throwing trajectory, a virtual image corresponding to the first virtual object is generated at the target position.
[0085] Here, the throwing trajectory is determined based on the position of the first virtual object in the virtual scene and the target position randomly selected from the virtual scene. Alternatively, the terminal acquires a throwing point and a throwing speed at which the first virtual object throws the target virtual item, determines a throwing trajectory based on the throwing point and the throwing speed, and sets the end position of the throwing trajectory as the target position.
[0086] 8A is a schematic diagram of a virtual item using interface according to an embodiment of the present invention. As shown in FIG. 8A, when a user taps an operation widget 801 of a target virtual item shown in FIG. 8A, the terminal displays a throwing trajectory 802 in response to the tapping operation, controls a first virtual object to throw the target virtual item along the throwing trajectory, and displays the process of the target virtual item falling to the target position when the tapping operation is released, and generates a virtual image 803 corresponding to the first virtual object at the target position after the target virtual item falls to the target position.
[0087] 8B is a schematic diagram of a throwing trajectory generation interface according to an embodiment of the present invention. In the implementation, as shown in FIG. 8B, when a user taps an operation widget of a target virtual item and does not release the tapping operation, the terminal responds to the tapping operation, obtains a throwing point and a throwing speed at which the first virtual object throws the target virtual item, and then determines a throwing trajectory in one frame. In the implementation, the throwing trajectory may be determined as follows: obtain a plurality of throwing points corresponding to the throwing trajectory, perform line rendering for each throwing point using a special effect, obtain a corresponding parabola, and use the parabola as the throwing trajectory. Here, the distance between adjacent throwing points may be set according to the actual situation, for example, the distance between two adjacent throwing points is set to 0.1 meters.
[0088] In some embodiments, the terminal may control a first virtual object in a virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item as follows:
[0089] When the target virtual item is a launch type item, the first virtual object is controlled to launch the sub virtual item using the target virtual item, and when the sub virtual item falls at the target position, a virtual image corresponding to the first virtual object is generated at the target position.
[0090] Here, when the target virtual item is a firing-type virtual item such as a firearm or a bow, the sub virtual item is a virtual item corresponding to the target virtual item. For example, when the target virtual item is a firearm-type virtual item, the sub virtual item is a corresponding virtual bullet. When the target virtual item is a bow-type virtual item, the sub virtual item is a corresponding virtual arrow. Before controlling the first virtual object to fire the sub virtual item using the target virtual item, the first virtual object is controlled to aim at a firing action point, i.e., a target position, using the target virtual item. After aiming at the target position, the first virtual object is controlled to fire the sub virtual item using the target virtual item at the target position, and when the sub virtual item falls at the target position, a virtual image corresponding to the first virtual object is generated at the target position.
[0091] 9 is a schematic diagram of a virtual item use interface according to an embodiment of the present invention. As shown in FIG. 9, when a user taps on an operation widget 901 of a target virtual item shown in FIG. 9, the terminal controls a first virtual object to use the target virtual item to aim at a target position 902 in response to the tapping operation, and displays the process of the target virtual item falling to the target position 902 when the tapping operation is released, and generates a virtual image 903 corresponding to the first virtual object at the target position 902 after the target virtual item falls to the target position 902.
[0092] In some embodiments, the terminal may control a first virtual object in a virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item as follows:
[0093] When the target virtual item is a placement-type item, a first virtual object in the virtual scene is controlled to place the target virtual item at a target position, and based on the target position, when a virtual image generation condition is satisfied, a virtual image corresponding to the first virtual object is generated at the target position.
[0094] Here, when the target virtual item is a placement type item such as a mine or a trap, the terminal may control the target virtual item to act on the target position when the first virtual object places the target virtual item at the target position and the activation condition of the target virtual item (i.e., the virtual image generation condition) is satisfied, for example, to generate a virtual image corresponding to the first virtual object at the target position. Here, the virtual image generation condition may be determined according to the actual situation. For example, it may be determined whether the virtual image generation condition is satisfied by determining whether a virtual image generation command is received. Alternatively, it may be determined whether the virtual image generation condition is satisfied by obtaining the installation period during which the target virtual item is placed at the target position and determining whether the installation period has reached a period threshold. When the virtual image generation command is received or the period during which the target virtual item is placed at the target position has reached a period threshold, it is determined that the virtual image generation condition is satisfied.
[0095] 10 is a schematic diagram of a virtual item use interface according to an embodiment of the present invention. As shown in FIG. 10, when a user taps an operation widget 1001 of a target virtual item shown in FIG. 10, the terminal controls a first virtual object to place the target virtual item at a target position 1002 in response to the tap operation, and generates a virtual image 1004 corresponding to the first virtual object at the target position 1002 when the placement period 1003 reaches a period threshold.
[0096] Step 103: If there is a second virtual object in the virtual scene that interacts with the virtual image, display the position of the second virtual object in the virtual scene.
[0097] Here, the second virtual object is an object that interacts with the first virtual object in the virtual scene. The first virtual object is a virtual object in the virtual scene corresponding to the current login account, and the second virtual object is a virtual object in the virtual scene corresponding to another login account different from the current login account, and the two are in an antagonistic relationship with each other. When the virtual image corresponding to the first virtual object is attacked by the second virtual object, that is, when there is a second virtual object that interacts with the virtual image, the position of the second virtual object in the virtual scene is revealed.
[0098] In some embodiments, before displaying the position of the second virtual object in the virtual scene, the terminal may determine whether the virtual scene includes a second virtual object that interacts with the virtual image, as follows:
[0099] If a second virtual object using the interaction virtual item is present in the virtual scene, a detection ray that coincides with the interaction direction of the interaction virtual item and an interaction detection frame corresponding to the virtual image are obtained, intersection detection is performed on the detection ray and the interaction detection frame to obtain a detection result, and if the detection result indicates that the detection ray and the interaction detection frame intersect, it is determined that a second virtual object that interacts with the virtual image is present in the virtual scene.
[0100] In the implementation, a camera assembly bound to an interaction virtual item (a virtual shooting item) used by a second virtual object shoots a detection ray from the shooting mouth (e.g., the mouth of a virtual gun) of the interaction virtual item, which is consistent with the interaction direction (e.g., orientation or aiming direction) of the interaction virtual item. A corresponding interaction detection frame (e.g., a collision assembly such as a collision box or a collision ball) is hung on the main body of the virtual image, and the interaction detection frame is located around the virtual image, i.e., the interaction detection frame surrounds the virtual image. Whether the interaction virtual item used by the second virtual item hits the virtual image is determined based on the intersection detection result between the detection ray and the interaction detection frame. If the detection ray and the interaction detection frame intersect, it indicates that the interaction virtual item used by the second virtual item hits the virtual image, i.e., there is a second virtual object that interacts with the virtual image. If the detection ray does not intersect with the interaction detection frame, it indicates that the interaction virtual item used by the second virtual item has not hit the virtual image, that is, there is no second virtual object that interacts with the virtual image.
[0101] 11 is a schematic diagram of interaction detection according to an embodiment of the present invention. As shown in FIG. 11, when a second virtual object uses an interaction virtual item to interact in a virtual scene, for example, to attack a virtual image 1102, a detection ray 1103 emitted from the launch port of the interaction virtual item and an interaction detection frame 1104 surrounding the virtual image 1102 are subjected to intersection detection. If the detection ray 1103 and the interaction detection frame 1104 intersect, it indicates that a second virtual object 1101 interacting with the virtual image 1102 exists in the virtual scene, and if the detection ray 1103 and the interaction detection frame 1104 do not intersect, it indicates that a second virtual object 1101 interacting with the virtual image 1102 does not exist in the virtual scene.
[0102] In some embodiments, before displaying the position of the second virtual object in the virtual scene, the terminal may output interaction presentation information between the second virtual object and the virtual image, as follows: output video interaction presentation information for presenting the presence of the second virtual object interacting with the virtual image;
[0103] In the implementation, the terminal may output the video interaction presentation information as follows: display the video interaction presentation information for indicating the presence of the second virtual object interacting with the virtual image; or play a media file for indicating the presence of the second virtual object interacting with the virtual image, where the media file includes at least one of a background audio file and a background animation file.
[0104] Here, the video interaction presentation information is used to present to the first virtual object that there is a second virtual object interacting with the virtual video in the virtual scene, so that the first virtual object can be alerted based on the video interaction presentation information and immediately obtain the position information of the second virtual object to formulate a strategy.
[0105] For example, when there is a second virtual object that interacts with the virtual image, video interaction presentation information such as "Watch out! Your target has appeared!" or "Be careful, your target is approaching!" is displayed. Also, when there is a second virtual object that interacts with the virtual image, for example, a background audio file such as "di-di-di..." or "bang-bang-bang..." is played to indicate that the second virtual object has appeared, or an animation showing a facial expression when the second virtual object has appeared, such as "jumping" or "nervous."
[0106] In some embodiments, the position of the second virtual object in the virtual scene may be displayed as follows:
[0107] A map thumbnail image of the virtual scene is displayed and a position of a second virtual object in the virtual scene is displayed on the map thumbnail image, where the position is a position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual video.
[0108] Here, if there is a second virtual object that interacts with the virtual image, for example, if a virtual bullet fired by the second virtual object hits the virtual image, the firing position of the virtual bullet fired by the second virtual object is displayed on the map thumbnail image.
[0109] Fig. 12 is a schematic diagram of a position display according to an embodiment of the present invention. As shown in Fig. 12, when the virtual image is hit by a virtual bullet fired by a second virtual object, a red dot, i.e., a shooting position 1202 of the virtual bullet fired by the second virtual object, is displayed in a map thumbnail image 1201.
[0110] In some embodiments, while the second virtual object moves within the virtual scene, the terminal may display the position of the second virtual object as follows:
[0111] When the second virtual object is not interacting with the virtual image, the position displayed on the map thumbnail image is maintained as is, and when the second virtual object is interacting with the virtual image, the position displayed on the map thumbnail image is updated.
[0112] Here, after the second virtual object interacts with the virtual image, the second virtual object can move in the virtual scene. If the second virtual object does not continue to interact with the virtual image while the second virtual object moves in the virtual scene, the shooting position 1202 for indicating the second virtual object in the map thumbnail image 1201 shown in FIG. 12 is not updated at the same time. If the second virtual object continues to interact with the virtual image, the shooting position 1202 for indicating the second virtual object in the map thumbnail image 1201 shown in FIG. 12 is updated synchronously for each interaction. In this way, the position displayed in the map thumbnail image is simply the firing position when the second virtual object interacts with the virtual image, so that it is possible to avoid revealing too much the position of the second virtual object and affecting the ecological balance between the first virtual object and the second virtual object, and the functional strength of the target virtual item can be effectively controlled, which is favorable to maintaining the interaction balance in the virtual scene.
[0113] In some embodiments, after the second virtual object interacts with the virtual image, the map thumbnail image may further display the moving position of the second virtual object while the second virtual object is moving in the virtual scene, that is, the map thumbnail image may synchronously update the moving position of the second virtual object. Regardless of whether the second virtual object continues to interact with the virtual image, the shooting position 1202 for indicating the second virtual object in the map thumbnail image 1201 shown in FIG. 12 is synchronously updated with the movement of the second virtual object. In this way, when the virtual image generated based on the target virtual item is hit by the second virtual object, the position of the second virtual object in the virtual scene is updated in real time in the map thumbnail image, so that the first virtual object can take control of the battle situation and quickly end the interaction with the second virtual object, thereby improving the interaction efficiency.
[0114] In some embodiments, the terminal may display positions of the second virtual objects in the virtual scene as follows: if the number of the second virtual objects is at least two, display positions of a target number of the second virtual objects among the at least two second virtual objects in the virtual scene.
[0115] Here, when the virtual image is shot simultaneously by a plurality of second virtual objects within a certain period of time, only the shooting position of the second virtual object that hit the first virtual image for the first time may be displayed. Alternatively, the shooting positions of all the second virtual objects that hit the virtual image or some of the second virtual objects that hit the virtual image may be displayed. Alternatively, based on the level of damage to the first virtual object by the second virtual object, the shooting position of the second virtual object that has a relatively high level of damage to the first virtual object may be displayed in order to defeat the second virtual object that has a relatively high level of damage to the first virtual object as quickly as possible. In the implementation, the display of the position of the second virtual object may be set to a time limit. That is, the position when shooting the virtual image of the second virtual object may be displayed for a target period (for example, 10 seconds), and when the target period is reached, the display of the position when shooting the virtual image of the second virtual object may be canceled.
[0116] In some embodiments, the terminal may display the position of a second virtual object in the virtual scene.
[0117] An interaction position of the second virtual object in the virtual scene when the second virtual object is interacting with the virtual image is acquired, and the second virtual object at the interaction position is perspectively displayed on the screen of the virtual scene so that the second virtual object is visible relative to the first virtual object.
[0118] Here, the perspective display of the second virtual object at the interaction position means that even if there is an obstacle between the first virtual object and the second virtual object to prevent them from being seen from each other, or even if the second virtual object is in a position where it is not visible to the first virtual object, the first virtual object can see the second virtual object, and the second virtual object cannot see the first virtual object. In this way, the perspective display of the second virtual object on the screen of the virtual scene is advantageous for the first virtual object to attack the second virtual object accurately.
[0119] Fig. 13 is a schematic diagram of a position display according to an embodiment of the present invention. As shown in Fig. 13, when a virtual image of a first virtual object 1301 is hit by a virtual bullet of a second virtual object, the shooting position when the virtual bullet of the second virtual object is shot is obtained, and a second virtual object 1302 located at the shooting position is perspectively displayed on the screen of the virtual scene from the viewpoint of the first virtual object 1301.
[0120] In some embodiments, the terminal may display a perspective display countdown timer corresponding to the second virtual object, and cancel the perspective display of the second virtual object at the interaction position when the perspective display countdown timer reaches zero.
[0121] In some embodiments, the terminal may obtain and display a perspective display period corresponding to the second virtual object, and when the perspective display period reaches a target period, cancel the perspective display of the second virtual object at the interaction position on the screen of the virtual scene.
[0122] 14 is a schematic diagram of a position display according to an embodiment of the present invention. As shown in FIG. 14, a second virtual object is displayed in perspective, and a perspective display countdown timer corresponding to the second virtual object is displayed. When the perspective display countdown timer reaches zero, the perspective display of the second virtual object at the interaction position is canceled. In this way, by setting a time limit for the perspective display time of the second virtual object, it can encourage the player to control the first virtual object to perform an interactive operation on the second virtual object based on the position of the second virtual object in the perspective display, thereby gaining a great advantage, enhancing the autonomy of the interaction, and improving the interactive experience.
[0123] In the present invention, an operation widget for a target virtual item is displayed on a screen of a virtual scene, and in response to a virtual image generation operation triggered based on the operation widget, a first virtual object in the virtual scene is controlled to generate a virtual image corresponding to the first virtual object using the target virtual item, and if a second virtual object that interacts with the virtual image exists in the virtual scene, the position of the second virtual object in the virtual scene is displayed. Thus, according to the embodiment of the present invention, if a second virtual object that interacts with the virtual image exists in the virtual scene, the position of the second virtual object can be determined. That is, according to the embodiment of the present invention, after generating a virtual image using the target virtual item, it is determined whether or not a second virtual object that interacts with the virtual image exists, and if it is determined that a second virtual object that interacts with the virtual image exists, the position of the second virtual object in the virtual scene can be obtained, so that the first virtual object can formulate a corresponding strategy. Compared with other methods that require multiple interaction operations to obtain the position of a virtual object, the position acquisition method in a virtual scene of the present invention does not require a first virtual object to perform multiple interaction operations with other virtual objects, so that the efficiency of acquiring position information is relatively high and the efficiency of human-computer interaction can be improved.
[0124] The following describes an exemplary application of an embodiment of the present invention in one practical application scenario. Figure 15 is a flow chart of a position acquisition method in a virtual scene according to an embodiment of the present invention. Take the virtual scene as an example of a shooting game, and describe the steps of the method with reference to Figure 15.
[0125] Step 201: The terminal controls a first virtual object to be equipped with a target virtual item.
[0126] Here, the target virtual item is also referred to as a hologram projection item, specifically, a virtual item that can generate a virtual image corresponding to a first virtual object after being used by the first virtual object, and displays the position of a second virtual object when there is a second virtual object interacting with the virtual image. The target virtual item is a passive trigger item, that is, after the target virtual item is thrown, it cannot be actively activated, and needs to be hit by another object or object to generate the above effect.
[0127] Step 202: It is determined whether a trigger operation for the target virtual item has been accepted.
[0128] Here, if the terminal determines that a trigger operation on the target virtual item is accepted, it executes step 203; otherwise, it executes step 201.
[0129] Step 203: Control the first virtual object to throw the target virtual item.
[0130] Here, when the terminal detects a tap operation by the user on the operation widget of the target virtual item, the terminal controls the first virtual object to throw the target virtual item in response to the tap operation.
[0131] Step 204: Determine whether the target virtual item has fallen at the target location.
[0132] Here, if the target virtual item falls at the target location, that is, if the target virtual item falls to the ground, execute step 205; otherwise, execute step 203.
[0133] Step 205: Display a virtual image corresponding to a first virtual object at a target location.
[0134] Here, after the target virtual item falls at the target location, a 1:1 holographic projection, i.e., a virtual image, of the first virtual object is generated at the target location, and in the screen of the enemy's perspective virtual scene, the virtual image coincides with the outline of the first virtual object using the target virtual item.
[0135] Fig. 16 is a schematic diagram of a projection display according to an embodiment of the present invention. In the implementation, as shown in Fig. 16, firstly, a model of a first virtual object using a target virtual item is replicated, and then a target position where the target virtual item lands is obtained, and a model of the first virtual object replicated at the target position is generated. Each time a player controls the operation of the first virtual object to be updated through the terminal, for example, switching from an idle operation to a firing operation, a bullet reloading operation, or a scope looking operation, the terminal synchronizes all the updating operations of the first virtual object to the server, and the server broadcasts the updating operations of the first virtual object to all players in the virtual scene, and then updates the operation in the model of the first virtual object of the hologram projection with the updating of the operation of the first virtual object.
[0136] Step 206: It is determined whether the player has updated the action.
[0137] If the player has updated the action, execute step 207; otherwise, execute step 205.
[0138] Step 207: Update the motion of the virtual image at the target position.
[0139] Step 208: It is determined whether the virtual image has been attacked.
[0140] Here, it is determined whether the virtual image has been attacked by a second virtual object, and if it is determined that the virtual image has been attacked by a second virtual object, step 209 is executed; otherwise, step 207 is executed.
[0141] Step 209: Display the position of the second virtual object in the game scene.
[0142] Here, when the virtual image is hit by the second virtual object, the position of the second virtual object in the virtual scene is revealed. For example, the attack position where the second virtual object attacks the virtual image may be displayed on a map thumbnail image of the virtual scene. Alternatively, the attack position where the second virtual object attacks the virtual image may be transparently displayed on the screen of the virtual scene so that the second virtual object located at the attack position is visible to the first virtual object.
[0143] FIG. 17 is a schematic diagram of a mapping relationship between a spatial display map of a virtual scene and a map thumbnail image according to an embodiment of the present invention. As shown in FIG. 17, when constructing a mapping relationship between a spatial display map 1701 and a map thumbnail image 1702, the mapping relationship between the two may be constructed by mapping three points (A, B, C) selected from the spatial display map 1701 and three points (A1, B1, C1) selected from the map thumbnail image 1702. After the mapping relationship is constructed, when the player selects a target position P where a target virtual object is located on the planar display map 1701, the player connects the target position P with the above three points on the planar display map 1701, respectively, and obtains the distances and directions of the three connecting lines, that is, AP, BP, CP. Then, in the map thumbnail image 1702, A1P1, B1P2, and C1P3, that is, three points P1, P2, and P3 are obtained based on the mapping relationship between the two maps and the directions and distances of the three connecting lines. Finally, based on the three obtained points P1, P2, and P3, the average value P0 of the three points is calculated, that is, P0 becomes the position displayed on the map thumbnail image.
[0144] Step 210: It is determined whether the perspective display time has ended.
[0145] In the implementation, the terminal obtains a perspective display period corresponding to the second virtual object, and if the perspective display period reaches a target time, i.e., if it determines that the perspective display period has ended, executes step 211; otherwise, executes step 209.
[0146] Step 211: Cancel displaying the position of the second virtual object in the game scene.
[0147] Here, when the perspective display time ends, the perspective display of the second virtual object at the interaction position is canceled on the screen of the virtual scene. For example, the perspective display effect for perspectively displaying the position of the second virtual object on the screen of the virtual scene from the viewpoint of the first virtual object is generated for only one second. In this way, the first virtual object can know in advance information such as the distance and height of the hostile player (i.e., the second virtual object) relative to itself (i.e., the first virtual object), and therefore can formulate a strategy according to the enemy's position and gain a great advantage during the battle.
[0148] As described above, the virtual image of the first virtual object can be placed at a specified position by using a passive trigger type target virtual item. After the second virtual object shoots the virtual image and hits it, the position information of the second virtual object in the game can be obtained, so that the first virtual object can formulate a corresponding strategy and eliminate the disadvantage of not being able to obtain the position information of the virtual object at the beginning of the battle. In addition, compared with other methods that require multiple interaction operations to obtain the position of the virtual object, the acquisition efficiency of the position acquisition method in the virtual scene according to the present invention is high, and the efficiency of human-computer interaction can be improved. In addition, the target virtual item according to the embodiment of the present invention is a passive trigger type item, and the position of the virtual object can be displayed only when it is hit, so that the strength of the item can be effectively controlled and it is advantageous to maintaining the balance of the game battle.
[0149] The following continues to describe an exemplary configuration in which the position acquisition device 555 in the virtual scene according to an embodiment of the present invention is implemented as a software module. Figure 18 is a schematic diagram of the configuration of the position acquisition device in the virtual scene according to an embodiment of the present invention. In some embodiments, as shown in Figure 18, the position acquisition device 555 in the virtual scene includes the following modules:
[0150] The first display module 5551 displays an operation widget for the target virtual item on the screen of the virtual scene.
[0151] The control module 5552 controls a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item in response to a virtual image generation operation triggered based on the operation widget.
[0152] The second display module 5553 displays the position of a second virtual object in the virtual scene, if a second virtual object that interacts with the virtual image is present in the virtual scene.
[0153] In some embodiments, before displaying the manipulation widget of the target virtual item on the screen of the virtual scene, the device further includes the following modules:
[0154] The item selection module displays a selection interface including at least one virtual item icon on a screen of a virtual scene, and in response to a selection operation on the virtual item icon in the selection interface, displays instruction information of a virtual item corresponding to the selected virtual item icon, the instruction information being used to indicate a function of the virtual item, and based on the instruction information, in response to a determination operation on the selected virtual item icon, determines the virtual item as a target virtual item.
[0155] In some embodiments, when the target virtual item is a throwable item, the control module displays a target position on a screen of the virtual scene, controls a first virtual object to throw the target virtual item at the target position, and when the target virtual item falls at the target position, generates a virtual image corresponding to the first virtual object at the target position.
[0156] In some embodiments, when the target virtual item is a throwing item, the control module displays a throwing trajectory on a screen of the virtual scene, controls the first virtual object to throw the target virtual item along the throwing trajectory, and when the target virtual item moves to a target position along the throwing trajectory, generates a virtual image corresponding to the first virtual object at the target position.
[0157] In some embodiments, when the target virtual item is a launch item, the control module controls the first virtual object to launch a sub-virtual item using the target virtual item, and when the sub-virtual item falls at the target position, generates a virtual image corresponding to the first virtual object at the target position.
[0158] In some embodiments, when the target virtual item is a placement-based item, the control module controls a first virtual object in the virtual scene to place the target virtual item at a target position, and based on the target position, generates a virtual image corresponding to the first virtual object at the target position when a virtual image generation condition is satisfied.
[0159] In some embodiments, prior to displaying the position of the second virtual object in the virtual scene, the apparatus further comprises a detection module.
[0160] The detection module, when a second virtual object using the interaction virtual item exists in the virtual scene, obtains a detection ray that coincides with the interaction direction of the interaction virtual item and an interaction detection frame corresponding to the virtual image, performs intersection detection on the detection ray and the interaction detection frame, and obtains a detection result, and when the detection result indicates that the detection ray and the interaction detection frame intersect, determines that a second virtual object that interacts with the virtual image exists in the virtual scene.
[0161] In some embodiments, prior to displaying the position of the second virtual object in the virtual scene, the apparatus further comprises an output module.
[0162] The output module outputs video interaction presentation information for presenting the presence of a second virtual object that interacts with the virtual video.
[0163] In some embodiments, the second display module displays a map thumbnail image of the virtual scene and displays a position of the second virtual object in the virtual scene on the map thumbnail image, where the position is a position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual image.
[0164] In some embodiments, while the second virtual object moves through the virtual scene, the second display module maintains the location displayed in the map thumbnail image when the second virtual object is not interacting with the virtual image and updates the location displayed in the map thumbnail image when the second virtual object is interacting with the virtual image.
[0165] In some embodiments, the second display module displays positions of a target number of the second virtual objects of the at least two second virtual objects in the virtual scene when the number of the second virtual objects is at least two.
[0166] In some embodiments, the second display module obtains an interaction position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual image, and displays the second virtual object in a perspective manner at the interaction position on the screen of the virtual scene such that the second virtual object is visible relative to the first virtual object.
[0167] In some embodiments, the second display module displays a map thumbnail image of the virtual scene.
[0168] The map thumbnail image displays the location of the second virtual object in the virtual scene when the second virtual object interacts with the virtual image.
[0169] In response, the second display module displays the moving position of the second virtual object in the map thumbnail image while the second virtual object moves within the virtual scene.
[0170] In some embodiments, the apparatus further includes a cancellation module.
[0171] The cancel module displays a perspective display countdown timer corresponding to the second virtual object, and cancels the perspective display of the second virtual object at the interaction location when the perspective display countdown timer reaches zero.
[0172] In some embodiments, the cancellation module obtains a perspective display period corresponding to the second virtual object, displays the perspective display period, and cancels the perspective display of the second virtual object at the interaction position on the screen of the virtual scene when the perspective display period reaches a target time.
[0173] An embodiment of the present invention further provides a computer program or computer program product comprising computer instructions, the computer instructions being stored in a computer readable storage medium, a processor of a computing device reading the computer instructions from the computer readable storage medium, and the processor executing the computer instructions to cause the computing device to perform the above method for obtaining position in a virtual scene according to an embodiment of the present invention.
[0174] An embodiment of the present invention further provides a computer readable storage medium having executable instructions stored thereon, which, when executed by a processor, perform the above method for obtaining position in a virtual scene according to an embodiment of the present invention.
[0175] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM, or may be any device including one or any combination of the above memories.
[0176] In some embodiments, the executable instructions may be created in any type of programming language (including compiled or interpreted languages, or declarative or procedural languages) in the form of a program, software, software module, script, or code, and may be implemented in any form, for example as a stand-alone program, or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0177] As an example, the executable instructions may correspond to a file in a file system or may be stored as part of a file for holding 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 being referenced, or in multiple cooperating files (e.g., files for storing one or more modules, subprograms, or code sections).
[0178] As an example, the executable instructions may be implemented and executed on a single electronic device, may be executed on multiple electronic devices located at a single location, or may be executed on multiple electronic devices distributed at multiple locations and interconnected via a communications network.
[0179] The above only describes the exemplary embodiments of the present invention, and does not limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included within the protection scope of the present invention.
Claims
1. 1. A method for acquiring a position in a virtual scene, executed by an electronic device, comprising: displaying an operation widget for the target virtual item on a screen of the virtual scene; In response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item; and if a second virtual object that interacts with the virtual image is present in the virtual scene, displaying a position of the second virtual object in the virtual scene; The step of displaying a position of the second virtual object in the virtual scene comprises: displaying a map thumbnail image of the virtual scene; and displaying a location of the second virtual object in the virtual scene in the map thumbnail image; the position is a position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual image; While the second virtual object moves within the virtual scene, maintaining the position displayed in the map thumbnail image when the second virtual object is not interacting with the virtual image; and if the second virtual object interacts with the virtual image multiple times, updating the location displayed in the map thumbnail image for each interaction, The step of displaying a position of the second virtual object in the virtual scene comprises: obtaining an interaction position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual video; and displaying, on a screen of the virtual scene, a second virtual object at the interaction location in perspective such that the second virtual object is visible relative to the first virtual object.
2. In response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item, If the target virtual item is a throwing item, displaying a target position on a screen of the virtual scene and controlling the first virtual object to throw the target virtual item to the target position; and generating a virtual image corresponding to the first virtual object at the target location when the target virtual item falls at the target location.
3. In response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item, If the target virtual item is a throwing item, displaying a throwing trajectory on a screen of the virtual scene and controlling the first virtual object to throw the target virtual item along the throwing trajectory; and generating a virtual image corresponding to the first virtual object at a target position when the target virtual item moves to the target position along the throw trajectory.
4. In response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item, If the target virtual item is a launch item, controlling the first virtual object to launch a sub virtual item using the target virtual item; The method of claim 1 , further comprising: if the sub virtual item falls at a target position, generating a virtual image corresponding to the first virtual object at the target position.
5. In response to a virtual image generation operation triggered based on the operation widget, controlling a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item, If the target virtual item is a placement item, controlling a first virtual object in the virtual scene to place the target virtual item at a target position; The method of claim 1 , further comprising: generating a virtual image corresponding to the first virtual object at the target position based on the target position if a virtual image generation condition is satisfied.
6. prior to displaying the position of the second virtual object in the virtual scene; When there is a second virtual object using an interaction virtual item in the virtual scene, obtaining a detection ray that coincides with the interaction direction of the interaction virtual item and an interaction detection frame that corresponds to the virtual image; performing intersection detection on the detection ray and the interaction detection frame to obtain a detection result; The method of claim 1 , further comprising: determining that a second virtual object interacting with the virtual image is present in the virtual scene if the detection result indicates that the detection ray intersects with the interaction detection frame.
7. prior to displaying the position of the second virtual object in the virtual scene; The method according to claim 1 , further comprising the step of outputting image interaction presentation information for presenting the presence of a second virtual object that interacts with the virtual image.
8. The step of displaying a position of the second virtual object in the virtual scene comprises:
8. The method of claim 1, further comprising: if the number of second virtual objects is at least two, displaying positions of a target number of second virtual objects of the at least two second virtual objects in the virtual scene.
9. displaying a perspective countdown timer corresponding to the second virtual object; The method of claim 1 , further comprising: canceling the perspective display of the second virtual object at the interaction location when the perspective display countdown timer reaches zero.
10. A position acquisition device in a virtual scene, comprising: a first display module for displaying an operation widget of a target virtual item on a screen of a virtual scene; a control module that controls a first virtual object in the virtual scene to generate a virtual image corresponding to the first virtual object using the target virtual item in response to a virtual image generation operation triggered based on the operation widget; and a second display module configured to display a position of a second virtual object in the virtual scene when the second virtual object interacts with the virtual image, The second display module includes: displaying a map thumbnail image of the virtual scene; displaying a position of the second virtual object in the virtual scene in the map thumbnail image; the position is a position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual image; While the second virtual object moves within the virtual scene, If the second virtual object is not interacting with the virtual image, the position displayed in the map thumbnail image is maintained as is; If the second virtual object interacts with the virtual image multiple times, updating the location displayed on the map thumbnail image for each interaction; The second display module includes: obtaining an interaction position of the second virtual object in the virtual scene when the second virtual object interacts with the virtual video; and displaying, on a screen of the virtual scene, a second virtual object at the interaction position in perspective such that the second virtual object is visible relative to the first virtual object.
11. A memory having executable instructions stored therein; and a processor which, when executing executable instructions stored in the memory, implements the method for obtaining position in a virtual scene according to any of claims 1 to 9.
12. A computer-readable storage medium having executable instructions stored thereon, A storage medium, the instructions, when executed by a processor, implement a method for obtaining position in a virtual scene according to any one of claims 1 to 9.
13. A computer program or computer program comprising instructions, A computer program or instructions which, when executed by a processor, implements a method for obtaining a position in a virtual scene according to any of claims 1 to 9.
Citation Information
Patent Citations
Virtual prop control method and device, storage medium and electronic device
CN111202982A
