Virtual scene interaction method and device, electronic equipment and storage medium
By using projection area identification in game scene editing to prompt the player's positional relationship of virtual objects, the problem of low movement accuracy of virtual objects is solved, and the efficiency and interactivity of game scene editing is improved.
Patent Information
- Application Number
- CN202410977964.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-12
AI Technical Summary
In game scene editing, players need to switch view angles multiple times when moving virtual objects to a specified position, resulting in cumbersome operation and low accuracy, which affects efficiency.
By displaying the projection area identifier of the virtual object on the graphical user interface, when the second virtual object and the first virtual object meet the preset projection conditions, the player is prompted to have their positional relationship simplified the alignment and placement steps and improve accuracy.
Improve the interactivity and efficiency of game scene editing, making objects placed more accurately.
Smart Images

Figure CN118925237A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game technology, and in particular to a virtual scene interaction method, device, electronic device and storage medium. Background Art
[0002] In order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged, such as role-playing games, tactical competitive games, shooting competitive games or massively multiplayer online role-playing games developed based on client or server architecture. In the game, players can manipulate the virtual characters on the screen to play the game, and can perform related operations such as walking, running, jumping, picking up props and fighting in the game scene based on the first or third perspective of the characters operated by the players, so that players can experience the visual impact brought by the game in an immersive way, greatly enhancing the initiative and realism of the game.
[0003] At present, in some games, players can customize game scenes through scene editors to meet the personalized needs of players in the game. However, in the prior art, when players edit game scenes, when they want to move a first virtual object to a specified position of a second virtual object, they often need to switch multiple perspectives to move the first virtual object so that the first virtual object can be aligned with the second virtual object from multiple angles to achieve an operation of accurately moving to the specified position. As a result, the steps of aligning and placing objects are cumbersome, and the placement accuracy is not high, resulting in low efficiency for players in editing game scenes. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for interacting with a virtual scene, which can intuitively prompt a player of the current positional relationship between a first virtual object and a second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of object placement, and improving the interactivity of players when editing game scenes, thereby improving the efficiency of players in editing game scenes.
[0005] In a first aspect, an embodiment of the present application provides a method for interacting with a virtual scene, providing a graphical user interface through a terminal device, the method comprising:
[0006] Displaying the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface;
[0007] In response to a movement operation on a second virtual object, controlling the second virtual object to move, wherein the second virtual object is a virtual object located in the game scene to be edited;
[0008] If the second virtual object and the first virtual object meet a preset projection condition, a projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate position information between the second virtual object and the first virtual object.
[0009] In a second aspect, an embodiment of the present application provides an interactive device for a virtual scene, which provides a graphical user interface through a terminal device, including:
[0010] A first display unit, configured to display the game scene to be edited and a first virtual object located in the game scene to be edited through the graphical user interface;
[0011] A control unit, configured to control a second virtual object to move in response to a movement operation on the second virtual object, wherein the second virtual object is a virtual object located in the game scene to be edited;
[0012] The second display unit is used to display a projection area mark of the second virtual object on the first virtual object if the second virtual object and the first virtual object meet a preset projection condition, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any virtual scene interaction method provided in an embodiment of the present application.
[0014] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in any virtual scene interaction method provided in an embodiment of the present application.
[0015] By adopting the solution of the embodiment of the present application, the projection area logo of the second virtual object can be displayed on the first virtual object when the positional relationship between the second virtual object and the first virtual object meets the preset projection condition, thereby intuitively prompting the player of the current positional relationship between the first virtual object and the second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of object placement, and improving the interactivity of players when editing game scenes, thereby improving the efficiency of players in editing game scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 is a scene schematic diagram of an interactive system of a virtual scene provided in an embodiment of the present application;
[0018] Figure 2 This is a flow chart of an embodiment of a virtual scene interaction method provided in an embodiment of the present application;
[0019] Figure 3 It is a scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0020] Figure 4 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0021] Figure 5 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0022] Figure 6 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0023] Figure 7 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0024] Figure 8 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0025] Fig. 9 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0026] Fig.10 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0027] Fig.11 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0028] Fig.12 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0029] Fig.13 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0030] Fig.14 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0031] Fig.15 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0032] Fig.16 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0033] Fig.17 is another scene schematic diagram of the virtual scene interaction method provided in the embodiment of the present application;
[0034] Fig.18 is a schematic diagram of the structure of an interactive device for a virtual scene provided in an embodiment of the present application;
[0035] Fig.19 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0037] The embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for interacting with a virtual scene. Specifically, the present embodiment will be described from the perspective of an interactive device for a virtual scene, and the interactive device for the virtual scene can be specifically integrated in an electronic device, that is, the interactive method for a virtual scene in the embodiments of the present application can be executed by an electronic device, and optionally, the electronic device can include: a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and the like.
[0038] The interactive method of the virtual scene provided in the embodiment of the present application can be applied to an interactive system of a virtual scene. The interactive system of the virtual scene can include a player terminal device and a server, and the terminal can be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server can perform two-way communication through a network.
[0039] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0040] The interactive method of the virtual scene in one embodiment of the present disclosure can be run on a local terminal device or a server. When the interactive method of the virtual scene is run on a server, the method can be implemented and executed based on a cloud interactive system, wherein the cloud interactive system includes a server and a client device.
[0041] For example, when the interactive method of the virtual scene is run on the terminal, the terminal device stores a game application and is used to present the virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, the game application is downloaded and installed by the terminal device and run. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on the display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present the graphical user interface and receive the operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0042] For example, when the interactive method of the virtual scene runs on the server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating body of the game application and the main body of the game screen presentation are separated, and the storage and operation of the interactive method of the virtual scene are completed on the cloud gaming server. The game screen presentation is completed on the client of the cloud game. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0043] See also Figure 1 , Figure 1 A scene diagram of an interactive system of a virtual scene provided by an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to the server of different games through the network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment can be continuously stored in the database when different users are online for multi-player games.
[0044] The embodiment of the present application provides an interactive method for a virtual scene, which can be executed by a terminal or a server. The embodiment of the present application takes the interactive method of a virtual scene executed by a terminal as an example for explanation. Among them, the terminal may include a touch display screen and a processor (of course, the terminal may also use peripherals such as a mouse and a keyboard as input devices, and only the touch display screen is used as an example for explanation here), and the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instructions, and can also control the content of the opposite server by responding to the received operation instructions. For example, the operation instructions generated by the user acting on the graphical user interface include instructions for starting a game application, and the processor is configured to start the game application after receiving the instructions for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously by multiple points on the screen. The user uses a finger to perform a touch operation on the graphical user interface, and when the graphical user interface detects the touch operation, different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation.
[0045] It should be noted that Figure 1 The scene diagram of the interactive system of the virtual scene shown is merely an example. The interactive system and scene of the virtual scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0046] The embodiment of the present application provides a method for interacting with a virtual scene, which can be executed by a terminal or a server. The embodiment of the present application takes the method for interacting with a virtual scene executed by a terminal as an example for explanation, and a graphical user interface can be provided by a terminal device, and the graphical user interface includes at least part of a virtual scene, and a controlled virtual character located in the virtual scene and controlled by the terminal device. The graphical user interface, virtual scene, and virtual object are explained below.
[0047] The game scene (or virtual scene) is a virtual scene displayed (or provided) when the application is running on a terminal or server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene and a three-dimensional virtual scene, and the virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the virtual scene is a scene with complete game logic of virtual objects such as user control. For example, for sandbox 3D shooting games, the virtual scene is a 3D game world for players to control virtual objects to fight. Example virtual scenes may include: at least one element of mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles; for example, for 2D card games, the virtual scene is a scene for displaying released cards or displaying virtual objects corresponding to cards. Example virtual scenes may include: an arena, a decisive battlefield, or other "field" elements or other elements that can display the status of card battles; for 2D or 3D multiplayer online tactical competitive games, the virtual scene is a 2D or 3D terrain scene for virtual objects to fight. Example virtual scenes may include: canyon-style mountains, lines, rivers, classrooms, tables and chairs, podiums and other elements.
[0048] The graphical user interface is obtained by executing a software application on a processor of a mobile terminal or other terminal and rendering it on a display, and can be a display screen interface of a terminal device. The graphical user interface can present the entire game scene, or only a part of the game scene. The game scene includes multiple static virtual objects, specifically including ground, mountains, rocks, vegetation, buildings, etc. When the game scene is relatively large, only the local content of the game scene is displayed on the graphical user interface of the terminal device during the game. Optionally, the game scene contains game characters, which can be game characters controlled by players, or NPCs (abbreviation of Non-Player Character, which is a type of character in the game, meaning non-player characters), which is not limited in this exemplary embodiment. The graphical user interface can include a UI interface and a game screen for players to interact. In an optional embodiment, the UI interface can include game controls (such as skill controls, mobile controls, function controls, etc.), indicator signs (such as direction indicator signs, role indicator signs, etc.), information display areas (such as the number of kills, game time, etc.), or game setting controls (such as system settings, stores, gold coins, etc.). In an optional implementation, the game screen is a display screen corresponding to a virtual scene displayed by a terminal device, and the game screen may include virtual objects such as game characters, NPC characters, AI characters, etc. that execute game logic in the virtual scene.
[0049] A game object (or virtual object, virtual character, game character) refers to a dynamic object that can be controlled in a virtual scene. Optionally, the dynamic object can be a virtual character, a virtual animal, a cartoon character, etc. The virtual object is a character controlled by a player through an input device, or an artificial intelligence (AI) set in a virtual environment battle through training, or a non-player character (NPC) set in a virtual scene battle. Optionally, the virtual object is a virtual character competing in a virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or is dynamically determined according to the number of clients joining the battle, and the embodiment of the present application does not limit this. In a possible implementation, a user can control a virtual object to move in the virtual scene, for example, control a virtual object to run, jump, crawl, etc., and can also control a virtual object to fight with other virtual objects using skills, virtual props, etc. provided by an application. (Game) props refer to props that can be used by virtual objects in a virtual environment, including but not limited to firearms, cold weapons, grenades, shields, springboards, puppets, etc., which can be used by virtual objects to speed up their own attributes, assist in combat, or launch damage to other virtual objects. Virtual props can also be supply props such as bullets, and can also be equipped on designated virtual weapons for accessories such as extended magazines, aiming scopes, flash suppressors, and stocks. The virtual camera is a necessary component for the game scene screen, which is used to present the game scene screen. A game scene corresponds to at least one virtual camera. According to actual needs, there can be two or more virtual cameras, which serve as the game rendering window to capture and present the game world's screen content to the player. By setting the parameters of the virtual camera, the player's perspective of viewing the game world can be adjusted, such as the first-person perspective and the third-person perspective.
[0050] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0051] See also Figure 2 , Figure 2 The flowchart of a virtual scene interaction method provided in an embodiment of the present application is as follows: Step 101 to Step 103:
[0052] Step 101: Displaying a game scene to be edited and a first virtual object located in the game scene to be edited through the graphical user interface.
[0053] In an embodiment of the present application, a player can trigger a game scene editing instruction in the game, and the computer device responds to the game scene editing instruction for the game scene, and displays the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface. Optionally, the game scene to be edited may also include a number of other virtual objects. Among them, the virtual objects include virtual objects that can be edited in the game scene, for example, virtual objects can be virtual scene elements such as movable virtual objects or virtual buildings.
[0054] For example, see Figure 3 The computer device may provide a graphical user interface, and the computer device may display the game scene to be edited, and the first virtual object, the first candidate virtual object, and the second candidate virtual object located in the game scene to be edited through the graphical user interface in response to the scene editing instruction. The graphical user interface may also display a perspective switching control, and the perspective switching control may be a cube, and the cube is configured to determine the corresponding target shooting angle of the virtual camera in response to the target surface selected for the cube.
[0055] Step 102: In response to a movement operation on a second virtual object, control the second virtual object to move, wherein the second virtual object is a virtual object located in the game scene to be edited.
[0056] In the embodiment of the present application, the player can arbitrarily select another virtual object other than the first virtual object as the second virtual object. Figure 4 The player may perform a selection operation on the first candidate virtual object, and the computer device determines the first candidate virtual object as the second virtual object in response to the selection operation on the first candidate virtual object.
[0057] Specifically, after selecting the first candidate virtual object as the second virtual object, the player can continue to move the first candidate virtual object, thereby controlling the second virtual object to move in the game scene to be edited. Figure 5 At this time, the first candidate virtual object is the second virtual object. The player can select the second virtual object and perform a sliding operation (i.e., a moving operation) on the second virtual object in the direction indicated by the arrow. In response to the sliding operation on the second virtual object, the computer device controls the second virtual object to move in the direction indicated by the arrow in the game scene to be edited, so as to move the second virtual object to the operating position of the sliding operation.
[0058] Step 103: If the second virtual object and the first virtual object meet a preset projection condition, a projection area mark of the second virtual object is displayed on the first virtual object, where the projection area mark is used to indicate position information between the second virtual object and the first virtual object.
[0059] Specifically, the preset projection condition includes any one of the following:
[0060] The positional relationship between the second virtual object and the first virtual object meets a first preset projection condition of a preset positional relationship, wherein the positional relationship includes a relative positional relationship and / or an absolute positional relationship;
[0061] The pixel distance between the second virtual object and the first virtual object meets a second preset projection condition of a preset pixel distance.
[0062] Specifically, the first preset projection condition may be that the relative position relationship or absolute position relationship between the second virtual object and the first virtual object conforms to the preset position relationship; the second preset projection condition is that the pixel distance between the second virtual object and the first virtual object is equal to or less than the preset pixel distance.
[0063] For example, the first preset projection condition may be that the relative distance between the two virtual objects meets a preset distance, and / or the moved virtual object is within a judgment range of a certain surface of the virtual object on which projection is required.
[0064] For another example, the pixel distance refers to the distance in the game scene to be edited. A number of white grids will be displayed below the game scene to be edited, and each grid has a preset side length. The specified pixel distance can be determined based on the side length of the white grid. Therefore, the pixel distance between two virtual objects in the game scene to be edited can be determined based on the number of grids between them. For example, when the distance between the first virtual object and the second virtual object is equal to X pixels, a judgment operation is performed to determine whether projection can be performed.
[0065] In a specific embodiment, the step of “if the relative orientation information between the second virtual object and the first virtual object meets the preset projection condition, displaying the projection area mark of the second virtual object on the first virtual object” may include:
[0066] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a projection area mark of the second virtual object is displayed on the first virtual object.
[0067] For example, see Figure 6At this time, the first candidate virtual object is the second virtual object. When the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, the target surface of the first virtual object can be used as the orthographic projection plane, the orthographic projection of the second virtual object can be displayed on the target surface, the orthographic projection is used as the projection area identifier, and the projection area identifier of the second virtual object is displayed on the first virtual object.
[0068] Based on the above introduction, the virtual scene interaction method of the present application will be further illustrated by examples below. The specific implementation of the virtual scene interaction method is described as follows.
[0069] In one embodiment, the step of “if the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying the projection area mark of the second virtual object on the first virtual object” may include:
[0070] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying a first projection area mark corresponding to the partial area of the second virtual object on the first virtual object;
[0071] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, a second projection area identifier corresponding to the entire area of the second virtual object is displayed on the first virtual object.
[0072] For example, see Figure 7 When the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and a partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, that is, one-half of the area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a first projection area identifier corresponding to one-half of the area of the second virtual object is displayed on the first virtual object, and the first projection area identifier may be one-half of the second projection area identifier, and the second projection area identifier is an orthographic projection of the entire area of the second virtual object projected onto the first virtual object.
[0073] For another example, see Figure 8When the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, the entire area of the second virtual object is projected onto the first virtual object as a positive projection, and the second projection area mark is displayed on the first virtual object. The display position of the first projection area mark or the second projection area mark on the first virtual object corresponds to the relative position of the first virtual object and the second virtual object.
[0074] Optionally, in order to distinguish and prompt the player that the first virtual object partially overlaps or completely overlaps with the second virtual object, the display styles of the first projection area mark and the second projection area mark are the same or different. Fig. 9 and Fig.10 When the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and a partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a first projection area logo of a first color is displayed on the first virtual object; when the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a second projection area logo of a second specified color is displayed on the first virtual object.
[0075] In a specific embodiment, the method further comprises:
[0076] When it is detected that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, obtaining a second projection area identifier of the entire area of the second virtual object projected onto the first virtual object;
[0077] Based on the projection relationship between the second projection area identifier and the second virtual object, determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object;
[0078] Aiming prompt information is determined based on the first reference point and the second reference point, wherein the aiming prompt information is used to prompt relative distance information between the second virtual object and the first virtual object.
[0079] Furthermore, the step of “determining aiming prompt information based on the first reference point and the second reference point” includes:
[0080] A target indication line is formed with the first reference point as a first endpoint and the second reference point as a second endpoint, and the target indication line is used as aiming prompt information.
[0081] For example, see Fig.11 , when the computer device detects that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, obtain a second projection area identifier of the entire area of the second virtual object projected onto the first virtual object; based on the projection relationship between the second projection area identifier and the second virtual object, four first reference points are determined on the first virtual object based on the second projection area identifier, and specifically, four vertices of the second projection area identifier are used as first reference points; at the same time, the four vertices of the second virtual object when projected are used as second reference points, and the first reference points and the second reference points having the corresponding relationship are connected to obtain four target indication lines, and the four target indication lines are used as aiming prompt information.
[0082] In one embodiment, after the step of “determining at least one first reference point on the first virtual object, and determining at least one second reference point on the second virtual object”, the method may further include:
[0083] Acquire a display position of the second reference point and a display position of a first reference point projected from the second reference point onto the first virtual object;
[0084] determining a relative distance based on a display position of the first reference point and a display position of the second reference point;
[0085] Distance prompt information is generated according to the relative distance, and the distance prompt information is displayed on the graphical user interface based on a display position of the aiming prompt information.
[0086] Specifically, the target indication line may be a line segment, and the computer device may obtain the line segment length of the target indication line, and generate distance prompt information based on the line segment length. For example, if the length of the target indication line is 8, then the distance prompt information “the distance between the first virtual object and the second virtual object is 8” or “distance 8” may be generated and displayed on the graphical user interface.
[0087] In one embodiment, the step of “the relative distance between the second virtual object and the first virtual object meets a preset distance” includes:
[0088] Acquire a first scene position of the first virtual object in the game scene to be edited, and a second scene position of the second virtual object in the game scene to be edited;
[0089] determining a relative distance based on the first scene position and the second scene position;
[0090] The magnitude relationship between the relative distance and the preset distance is determined, and if the relative distance is equal to or less than the preset distance, it is determined that the relative distance meets the preset distance.
[0091] For example, a plurality of grids may be set and displayed below the virtual scene, and each grid corresponds to a specified pixel distance. Therefore, the distance between two virtual objects in the virtual scene may be determined according to the number of grids between them. Specifically, when the distance between the first virtual object and the second virtual object is equal to the specified pixel distance, it is determined that the relative distance meets the preset distance.
[0092] In one embodiment, the game scene to be edited includes a plurality of candidate virtual objects, and the step of “determining the second virtual object in response to the virtual object selection operation” includes:
[0093] In response to a selection operation on a target virtual object among the candidate virtual objects, the target virtual object is used as the second virtual object.
[0094] In another embodiment, the graphical user interface displays multiple candidate object identifiers, and the step of “determining the second virtual object in response to the virtual object selection operation” includes:
[0095] In response to a selection operation on a target object identifier among the candidate object identifiers, a virtual object corresponding to the target object identifier is acquired as a second virtual object.
[0096] For example, see also Fig.12 and Fig.13 The graphical user interface displays multiple candidate object identifiers, including a first object identifier, a second object identifier, a third object identifier, and a fourth object identifier. The player can drag the first object identifier to drag the virtual object corresponding to the first object identifier to the game scene to be edited as the second virtual object.
[0097] In one embodiment, the step of “after displaying the projection area mark of the second virtual object on the first virtual object” further includes:
[0098] In response to continuing the movement operation on the second virtual object, if the movement parameters of the movement operation meet the preset display conditions, a preview window is displayed on the graphical user interface, wherein position prompt information is displayed in the preview window, the position prompt information is determined based on the first virtual object and the second virtual object, and the position prompt information is used to indicate the position relationship between the first virtual object and the second virtual object.
[0099] The position prompt information is updated in real time as the position relationship between the first virtual object and the second virtual object is updated.
[0100] Specifically, the movement parameter includes at least one of the following: current movement position, movement direction, movement distance, and movement duration.
[0101] In a specific embodiment, the step of “in response to continuing the movement operation on the second virtual object, if the movement parameters of the movement operation meet the preset display conditions, displaying a preview window on the graphical user interface” includes:
[0102] In response to continuing the movement operation on the second virtual object, if the positional relationship between the current movement position and the first virtual object satisfies a first preset display condition, displaying a preview window on the graphical user interface; or,
[0103] In response to continuing the movement operation on the second virtual object, if the movement direction is toward the first virtual object, and the movement distance and / or movement duration meets a second preset display condition, a preview window is displayed on the graphical user interface.
[0104] Specifically, the first preset display condition may be that the positional relationship between the current moving position and the first virtual object satisfies a specified positional relationship. For example, the first preset display condition may be that the distance and / or orientation between the current moving position and the first virtual object satisfies a specified distance and / or specified orientation.
[0105] Specifically, the second preset display condition may be that the moving direction is toward the first virtual object, and the moving distance meets the specified moving distance; the second preset display condition may be that the moving direction is toward the first virtual object, and the moving duration meets the specified moving duration.
[0106] For example, in response to continuing the movement operation on the second virtual object, if the distance and / or orientation between the current moving position and the first virtual object satisfies the specified distance and / or specified orientation, that is, satisfies the first preset display condition, a preview window is displayed on the graphical user interface.
[0107] For another example, in response to continuing the movement operation on the second virtual object, if the movement direction is toward the first virtual object, and the movement distance meets the specified movement distance, specifically, the second virtual object moves 5 cm toward the first virtual object, which meets the specified movement distance of 5 cm, that is, meets the second preset adjustment, then the preview window is displayed on the graphical user interface. Alternatively, if the movement direction is toward the first virtual object, and the movement duration meets the specified movement duration, specifically, the second virtual object maintains the movement operation in the direction of the first virtual object for 2 seconds, which meets the specified movement duration of 2 seconds, that is, meets the second preset adjustment, then the preview window is displayed on the graphical user interface. Alternatively, if the movement direction is toward the first virtual object, the movement distance meets the specified movement distance, and the movement duration meets the specified movement duration, then the preview window is displayed on the graphical user interface.
[0108] In a specific embodiment, the step “before displaying the preview window on the graphical user interface” further includes:
[0109] displaying a first reference coordinate system based on a designated vertex on the second virtual object;
[0110] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a target preview angle based on the target coordinate axis;
[0111] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0112] Based on the first reference identifier and the second reference identifier, position prompt information is generated to display the position prompt information through the preview window when the preview window is displayed on the graphical user interface, and the position prompt information is used to show the position relationship between the first virtual object and the second virtual object at the target preview angle.
[0113] Optionally, in the step “after displaying the first reference coordinate system based on the specified vertex on the second virtual object”, the method further includes:
[0114] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a second reference coordinate system and a target preview angle based on the target coordinate axis;
[0115] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0116] Position prompt information is generated based on the second reference coordinate system, the first reference identifier, and the second reference identifier.
[0117] For example, see Fig.14 , the first reference coordinate system is displayed based on the specified vertex on the second virtual object. At this time, the first reference coordinate system can be a three-dimensional coordinate system, including an X-axis, a Y-axis and a Z-axis. The three-dimensional coordinate system can be displayed on the graphical user interface with the specified vertex of the second virtual object as the origin.
[0118] For further information, see Fig.15 , the player can trigger the X axis, and the computer device responds to the trigger operation on the X axis, takes the X axis as the target coordinate axis, thereby determining the second reference coordinate system XY coordinate system, and then determines the target preview angle with the X axis and the Y axis as the reference plane, generates the first reference identifier of the first virtual object and the second reference identifier of the second virtual object based on the target preview angle, the first display position of the first virtual object, and the second display position of the second virtual object, and generates the position prompt information based on the second reference coordinate system, the first reference identifier and the second reference identifier. Specifically, a preview window can be displayed on a graphical user interface, and the position prompt information is displayed through the preview window. At this time, the position prompt information includes the first reference identifier, the second reference identifier, the XY two-dimensional coordinate system (second reference coordinate system) generated with the specified vertex as the origin, the shooting position of the virtual camera, and the relative distance between the first virtual object and the second virtual object on each axis in the three-dimensional coordinate system. Specifically, the relative distance between the first virtual object and the second virtual object on the X axis is 8, the relative distance between the first virtual object and the second virtual object on the Y axis is 0, and the relative distance between the first virtual object and the second virtual object on the Z axis is 0. The first reference marker may be a first projection of the first virtual object with the plane of the XY two-dimensional coordinate system as a reference, and the second reference marker may be a second projection of the second virtual object with the plane of the XY two-dimensional coordinate system as a reference.
[0119] Optionally, the player can also trigger the Y-axis (for example, perform a moving operation along the Y-axis). In this case, the Y-axis is used as the target coordinate axis to determine the second reference coordinate system XY coordinate system (or YZ coordinate system). Then, the target preview angle is determined with the X-axis and Y-axis as reference planes (or the Y-axis and Z-axis). Based on the target preview angle, the first display position of the first virtual object, and the second display position of the second virtual object, a first reference identifier of the first virtual object and a second reference identifier of the second virtual object are generated. Position prompt information is generated based on the second reference coordinate system, the first reference identifier, and the second reference identifier.
[0120] Alternatively, the player can also trigger the Z axis (for example, move along the Z axis). In this case, the Z axis is used as the target coordinate axis to determine the second reference coordinate system ZX coordinate system (or ZY coordinate system). This is an example, and the specific steps for determining the position prompt information are as described above and will not be repeated here.
[0121] In another embodiment, the step of “displaying a preview window on the graphical user interface” may include:
[0122] Obtaining display parameters of the preview window;
[0123] Determining a target display position on the graphical user interface based on the display parameter, the display parameter of the first virtual object, and the display parameter of the second virtual object, wherein the target display position is a position that does not block the first virtual object and the second virtual object when the preview window is displayed;
[0124] A preview window is displayed at the target display position on the graphical user interface.
[0125] In an embodiment of the present application, the display parameters of the preview window may include a display size, and the target display position is determined on the graphical user interface based on the display size, the display parameters of the first virtual object, and the display parameters of the second virtual object.
[0126] Optionally, distance information may also be displayed between the first reference mark and the second reference mark displayed in the preview window, and the distance information is based on the distance between the first virtual object and the second virtual object on the target coordinate axis. Fig.16 , Fig.16 A preview window is displayed in the figure, which displays the first reference marker, the second reference marker, and the distance information 8 between the first reference marker and the second reference marker, which is used to indicate that the distance between the first virtual object and the second virtual object on the X-axis is 8.
[0127] Furthermore, the player can continue to control the second virtual object to move along the target coordinate axis toward the first virtual object. At this time, the distance between the first virtual object and the second virtual object on the target coordinate axis can be updated in real time according to the movement operation. Fig.16 and Fig.17 , the player can perform a movement operation along the X-axis toward the first virtual object, that is, the player can continue to control the second virtual object to move along the X-axis toward the first virtual object. At this time, the distance between the first virtual object and the second virtual object on the X-axis changes from 8 to 4. Therefore, the distance information can be updated from 8 to 4, and the updated distance information can be displayed between the first reference mark and the second reference mark.
[0128] In summary, the embodiment of the present application provides an interactive method for a virtual scene, wherein the game scene to be edited and the first virtual object located in the game scene to be edited are displayed through the graphical user interface; then, in response to the movement operation for the second virtual object, the second virtual object is controlled to move, wherein the second virtual object is a virtual object located in the game scene to be edited; finally, if the second virtual object and the first virtual object meet the preset projection condition, the projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object. The embodiment of the present application displays the projection area mark of the second virtual object on the first virtual object when the position relationship between the second virtual object and the first virtual object meets the preset projection condition, thereby intuitively prompting the player of the current position relationship between the first virtual object and the second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of placing objects, and improving the interactivity of players when editing game scenes, and improving the efficiency of players when editing game scenes.
[0129] This embodiment also provides a virtual scene interaction device, which can be integrated into a terminal device. Fig.18 As shown, the interactive device of the virtual scene may include:
[0130] A first display unit 201, used for displaying the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface;
[0131] A control unit 202, configured to control a second virtual object to move in response to a movement operation on the second virtual object, wherein the second virtual object is a virtual object located in the game scene to be edited;
[0132] The second display unit 203 is used to display a projection area mark of the second virtual object on the first virtual object if the second virtual object and the first virtual object meet a preset projection condition, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object.
[0133] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0134] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a projection area mark of the second virtual object is displayed on the first virtual object.
[0135] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0136] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying a first projection area mark corresponding to the partial area of the second virtual object on the first virtual object;
[0137] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, a second projection area identifier corresponding to the entire area of the second virtual object is displayed on the first virtual object.
[0138] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0139] When it is detected that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, obtaining a second projection area identifier of the entire area of the second virtual object projected onto the first virtual object;
[0140] Based on the projection relationship between the second projection area identifier and the second virtual object, determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object;
[0141] Aiming prompt information is determined based on the first reference point and the second reference point, wherein the aiming prompt information is used to prompt relative distance information between the second virtual object and the first virtual object.
[0142] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0143] A target indication line is formed with the first reference point as a first endpoint and the second reference point as a second endpoint, and the target indication line is used as aiming prompt information.
[0144] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0145] Acquire a display position of the second reference point and a display position of a first reference point projected from the second reference point onto the first virtual object;
[0146] determining a relative distance based on a display position of the first reference point and a display position of the second reference point;
[0147] Distance prompt information is generated according to the relative distance, and the distance prompt information is displayed on the graphical user interface based on a display position of the aiming prompt information.
[0148] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0149] Acquire a first scene position of the first virtual object in the game scene to be edited, and a second scene position of the second virtual object in the game scene to be edited;
[0150] determining a relative distance based on the first scene position and the second scene position;
[0151] The magnitude relationship between the relative distance and a preset distance is determined, and if the relative distance is equal to or less than the preset distance, it is determined that the relative distance meets the preset distance.
[0152] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0153] In response to continuing the movement operation on the second virtual object, if the movement parameters of the movement operation meet the preset display conditions, a preview window is displayed on the graphical user interface, wherein position prompt information is displayed in the preview window, the position prompt information is determined based on the first virtual object and the second virtual object, and the position prompt information is used to indicate the position relationship between the first virtual object and the second virtual object.
[0154] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0155] displaying a first reference coordinate system based on a designated vertex on the second virtual object;
[0156] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a target preview angle based on the target coordinate axis;
[0157] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0158] Based on the first reference identifier and the second reference identifier, position prompt information is generated to display the position prompt information through the preview window when the preview window is displayed on the graphical user interface, and the position prompt information is used to show the position relationship between the first virtual object and the second virtual object at the target preview angle.
[0159] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0160] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a second reference coordinate system and a target preview angle based on the target coordinate axis;
[0161] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0162] Position prompt information is generated based on the second reference coordinate system, the first reference identifier, and the second reference identifier.
[0163] In some embodiments, the virtual scene interaction device includes a processing subunit, which is used to:
[0164] Obtaining display parameters of the preview window;
[0165] Determining a target display position on the graphical user interface based on the display parameter, the display parameter of the first virtual object, and the display parameter of the second virtual object, wherein the target display position is a position that does not block the first virtual object and the second virtual object when the preview window is displayed;
[0166] A preview window is displayed at the target display position on the graphical user interface.
[0167] The embodiment of the present application discloses an interactive device for a virtual scene, wherein a first display unit 201 displays a game scene to be edited and a first virtual object located in the game scene to be edited through the graphical user interface; a control unit 202 controls the second virtual object to move in response to a movement operation on the second virtual object, wherein the second virtual object is a virtual object located in the game scene to be edited; and a second display unit 203 displays a projection area mark of the second virtual object on the first virtual object if the second virtual object and the first virtual object meet a preset projection condition, wherein the projection area mark is used to indicate the position information between the second virtual object and the first virtual object. The embodiment of the present application displays the projection area mark of the second virtual object on the first virtual object when the position relationship between the second virtual object and the first virtual object meets the preset projection condition, thereby intuitively prompting the player of the current position relationship between the first virtual object and the second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of placing objects, improving the interactivity of players when editing game scenes, and improving the efficiency of players when editing game scenes.
[0168] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.
[0169] like Fig.19 As shown, Fig.19 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0170] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302, so as to monitor the electronic device 300 as a whole. The processor 301 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0171] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:
[0172] Displaying the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface;
[0173] In response to a movement operation on a second virtual object, controlling the second virtual object to move, wherein the second virtual object is a virtual object located in the game scene to be edited;
[0174] If the second virtual object and the first virtual object meet a preset projection condition, a projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate position information between the second virtual object and the first virtual object.
[0175] In one embodiment, the preset projection condition includes any one of the following:
[0176] The positional relationship between the second virtual object and the first virtual object meets a first preset projection condition of a preset positional relationship, wherein the positional relationship includes a relative positional relationship and / or an absolute positional relationship;
[0177] The pixel distance between the second virtual object and the first virtual object meets a second preset projection condition of a preset pixel distance.
[0178] In one embodiment, if the second virtual object and the first virtual object meet a preset projection condition, displaying a projection area mark of the second virtual object on the first virtual object includes:
[0179] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a projection area mark of the second virtual object is displayed on the first virtual object.
[0180] In one embodiment, if the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying the projection area mark of the second virtual object on the first virtual object includes:
[0181] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying a first projection area mark corresponding to the partial area of the second virtual object on the first virtual object;
[0182] If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, a second projection area identifier corresponding to the entire area of the second virtual object is displayed on the first virtual object.
[0183] In one embodiment, the display styles of the first projection area marker and the second projection area marker are the same or different.
[0184] In one embodiment, the method further comprises:
[0185] When it is detected that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, obtaining a second projection area identifier of the entire area of the second virtual object projected onto the first virtual object;
[0186] Based on the projection relationship between the second projection area identifier and the second virtual object, determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object;
[0187] Aiming prompt information is determined based on the first reference point and the second reference point, wherein the aiming prompt information is used to prompt relative distance information between the second virtual object and the first virtual object.
[0188] In one embodiment, determining aiming prompt information based on the first reference point and the second reference point includes:
[0189] A target indication line is formed with the first reference point as a first endpoint and the second reference point as a second endpoint, and the target indication line is used as aiming prompt information.
[0190] In one embodiment, after determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object, the method further includes:
[0191] Acquire a display position of the second reference point and a display position of a first reference point projected from the second reference point onto the first virtual object;
[0192] determining a relative distance based on a display position of the first reference point and a display position of the second reference point;
[0193] Distance prompt information is generated according to the relative distance, and the distance prompt information is displayed on the graphical user interface based on a display position of the aiming prompt information.
[0194] In one embodiment, the step of determining that the relative distance between the second virtual object and the first virtual object meets a preset distance includes:
[0195] Acquire a first scene position of the first virtual object in the game scene to be edited, and a second scene position of the second virtual object in the game scene to be edited;
[0196] determining a relative distance based on the first scene position and the second scene position;
[0197] The magnitude relationship between the relative distance and a preset distance is determined, and if the relative distance is equal to or less than the preset distance, it is determined that the relative distance meets the preset distance.
[0198] In one embodiment, after displaying the projection area mark of the second virtual object on the first virtual object, the method further includes:
[0199] In response to continuing the movement operation on the second virtual object, if the movement parameters of the movement operation meet the preset display conditions, a preview window is displayed on the graphical user interface, wherein position prompt information is displayed in the preview window, the position prompt information is determined based on the first virtual object and the second virtual object, and the position prompt information is used to indicate the position relationship between the first virtual object and the second virtual object.
[0200] In one embodiment, the movement parameter includes at least one of the following: current movement position, movement direction, movement distance, and movement duration.
[0201] In one embodiment, before displaying the preview window on the graphical user interface, the method further includes:
[0202] displaying a first reference coordinate system based on a designated vertex on the second virtual object;
[0203] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a target preview angle based on the target coordinate axis;
[0204] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0205] Based on the first reference identifier and the second reference identifier, position prompt information is generated to display the position prompt information through the preview window when the preview window is displayed on the graphical user interface, and the position prompt information is used to show the position relationship between the first virtual object and the second virtual object at the target preview angle.
[0206] In one embodiment, after displaying the first reference coordinate system based on the designated vertex on the second virtual object, the method further includes:
[0207] In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a second reference coordinate system and a target preview angle based on the target coordinate axis;
[0208] generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object;
[0209] Position prompt information is generated based on the second reference coordinate system, the first reference identifier, and the second reference identifier.
[0210] In one embodiment, displaying a preview window on the graphical user interface includes:
[0211] Obtaining display parameters of the preview window;
[0212] Determining a target display position on the graphical user interface based on the display parameter, the display parameter of the first virtual object, and the display parameter of the second virtual object, wherein the target display position is a position that does not block the first virtual object and the second virtual object when the preview window is displayed;
[0213] A preview window is displayed at the target display position on the graphical user interface.
[0214] The electronic device provided in the embodiment of the present application displays the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface; then, in response to the movement operation on the second virtual object, the second virtual object is controlled to move, wherein the second virtual object is a virtual object located in the game scene to be edited; finally, if the second virtual object and the first virtual object meet the preset projection condition, the projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object. The embodiment of the present application displays the projection area mark of the second virtual object on the first virtual object when the position relationship between the second virtual object and the first virtual object meets the preset projection condition, thereby intuitively prompting the player of the current position relationship between the first virtual object and the second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of placing objects, and improving the interactivity of players when editing game scenes, and improving the efficiency of players when editing game scenes.
[0215] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0216] Optional, such as Fig.19 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Fig.19 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0217] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0218] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0219] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the electronic device.
[0220] The input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0221] The power supply 307 is used to supply power to various components of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0222] although Fig.19 Not shown, the electronic device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0223] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0224] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0225] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any virtual scene interaction method provided in the embodiment of the present application. The computer program can execute the following steps of the virtual scene interaction method:
[0226] Displaying the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface;
[0227] In response to a movement operation on a second virtual object, controlling the second virtual object to move, wherein the second virtual object is a virtual object located in the game scene to be edited;
[0228] If the second virtual object and the first virtual object meet a preset projection condition, a projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate position information between the second virtual object and the first virtual object.
[0229] Due to the computer program stored in the storage medium, the game scene to be edited and the first virtual object located in the game scene to be edited can be displayed through the graphical user interface; then, in response to the movement operation for the second virtual object, the second virtual object is controlled to move, wherein the second virtual object is a virtual object located in the game scene to be edited; finally, if the second virtual object and the first virtual object meet the preset projection condition, the projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object. The embodiment of the present application displays the projection area mark of the second virtual object on the first virtual object when the position relationship between the second virtual object and the first virtual object meets the preset projection condition, thereby intuitively prompting the player of the current position relationship between the first virtual object and the second virtual object, thereby simplifying the steps of aligning and placing objects, improving the accuracy of placing objects, and improving the interactivity of players when editing game scenes, and improving the efficiency of players when editing game scenes.
[0230] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0231] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0232] Since the computer program stored in the computer-readable storage medium can execute any virtual scene interaction method provided in the embodiments of the present application, the beneficial effects that can be achieved by any virtual scene interaction method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0233] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0234] In the above-mentioned virtual scene interactive device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the above-described virtual scene interactive device, computer-readable storage medium, computer program product, electronic device and its corresponding units The specific working process and beneficial effects that can be brought about can refer to the description of the virtual scene interactive method in the above embodiment, and the specific details will not be repeated here.
[0235] The above is a detailed introduction to the interactive method, device, electronic device, computer-readable storage medium and computer program product of a virtual scene provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A virtual scene interaction method, characterized in that: A graphical user interface is provided through a terminal device, including: Displaying the game scene to be edited and the first virtual object located in the game scene to be edited through the graphical user interface; In response to a movement operation on a second virtual object, controlling the second virtual object to move, wherein the second virtual object is a virtual object located in the game scene to be edited; If the second virtual object and the first virtual object meet a preset projection condition, a projection area mark of the second virtual object is displayed on the first virtual object, and the projection area mark is used to indicate position information between the second virtual object and the first virtual object.
2. The method according to claim 1, characterized in that The preset projection condition includes any one of the following: The positional relationship between the second virtual object and the first virtual object meets a first preset projection condition of a preset positional relationship, wherein the positional relationship includes a relative positional relationship and / or an absolute positional relationship; The pixel distance between the second virtual object and the first virtual object meets a second preset projection condition of a preset pixel distance.
3. The method according to claim 1, characterized in that If the second virtual object and the first virtual object meet a preset projection condition, displaying a projection area mark of the second virtual object on the first virtual object includes: If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a projection area mark of the second virtual object is displayed on the first virtual object.
4. The method according to claim 3, characterized in that If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, displaying the projection area mark of the second virtual object on the first virtual object includes: If the relative distance between the second virtual object and the first virtual object meets the preset distance, and a partial area of the second virtual object is located within the target judgment range corresponding to the target surface of the first virtual object, a first projection area mark corresponding to the partial area of the second virtual object is displayed on the first virtual object; If the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, a second projection area identifier corresponding to the entire area of the second virtual object is displayed on the first virtual object.
5. The method according to claim 4, characterized in that The display styles of the first projection area identifier and the second projection area identifier are the same or different.
6. The method according to claim 4, characterized in that The method further comprises: When it is detected that the relative distance between the second virtual object and the first virtual object meets the preset distance, and the entire area of the second virtual object is within the target judgment range corresponding to the target surface of the first virtual object, obtaining a second projection area identifier of the entire area of the second virtual object projected onto the first virtual object; Based on the projection relationship between the second projection area identifier and the second virtual object, determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object; Aiming prompt information is determined based on the first reference point and the second reference point, wherein the aiming prompt information is used to prompt relative distance information between the second virtual object and the first virtual object.
7. The method according to claim 6, characterized in that The determining of aiming prompt information based on the first reference point and the second reference point includes: A target indication line is formed with the first reference point as a first endpoint and the second reference point as a second endpoint, and the target indication line is used as aiming prompt information.
8. The method according to claim 6, characterized in that After determining at least one first reference point on the first virtual object and determining at least one second reference point on the second virtual object, the method further includes: Acquire a display position of the second reference point and a display position of a first reference point projected from the second reference point onto the first virtual object; determining a relative distance based on a display position of the first reference point and a display position of the second reference point; Distance prompt information is generated according to the relative distance, and the distance prompt information is displayed on the graphical user interface based on a display position of the aiming prompt information.
9. The method according to claim 3, characterized in that: The step of determining that the relative distance between the second virtual object and the first virtual object meets a preset distance includes: Acquire a first scene position of the first virtual object in the game scene to be edited, and a second scene position of the second virtual object in the game scene to be edited; determining a relative distance based on the first scene position and the second scene position; The magnitude relationship between the relative distance and a preset distance is determined, and if the relative distance is equal to or less than the preset distance, it is determined that the relative distance meets the preset distance.
10. The method according to claim 1, characterized in that After displaying the projection area mark of the second virtual object on the first virtual object, the method further includes: In response to continuing the movement operation on the second virtual object, if the movement parameters of the movement operation meet the preset display conditions, a preview window is displayed on the graphical user interface, wherein position prompt information is displayed in the preview window, the position prompt information is determined based on the first virtual object and the second virtual object, and the position prompt information is used to indicate the position relationship between the first virtual object and the second virtual object.
11. The method according to claim 10, characterized in that The movement parameters include at least one of the following: current movement position, movement direction, movement distance, and movement duration.
12. The method according to claim 10, characterized in that Before displaying the preview window on the graphical user interface, the method further includes: displaying a first reference coordinate system based on a designated vertex on the second virtual object; In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a target preview angle based on the target coordinate axis; generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object; Based on the first reference identifier and the second reference identifier, position prompt information is generated to display the position prompt information through the preview window when the preview window is displayed on the graphical user interface, and the position prompt information is used to show the position relationship between the first virtual object and the second virtual object at the target preview angle.
13. The method according to claim 12, characterized in that After displaying the first reference coordinate system based on the designated vertex on the second virtual object, the method further includes: In response to a trigger operation on a target coordinate axis in the first reference coordinate system, determining a second reference coordinate system and a target preview angle based on the target coordinate axis; generating a first reference identifier of the first virtual object and a second reference identifier of the second virtual object based on the target preview angle, a first display position of the first virtual object, and a second display position of the second virtual object; Position prompt information is generated based on the second reference coordinate system, the first reference identifier, and the second reference identifier.
14. The method according to claim 10, characterized in that Displaying a preview window on the graphical user interface includes: Obtaining display parameters of the preview window; Determining a target display position on the graphical user interface based on the display parameter, the display parameter of the first virtual object, and the display parameter of the second virtual object, wherein the target display position is a position that does not block the first virtual object and the second virtual object when the preview window is displayed; A preview window is displayed at the target display position on the graphical user interface.
15. An interactive device for a virtual scene, characterized in that: A graphical user interface is provided through a terminal device, including: A first display unit, configured to display the game scene to be edited and a first virtual object located in the game scene to be edited through the graphical user interface; A control unit, configured to control a second virtual object to move in response to a movement operation on the second virtual object, wherein the second virtual object is a virtual object located in the game scene to be edited; The second display unit is used to display a projection area mark of the second virtual object on the first virtual object if the second virtual object and the first virtual object meet a preset projection condition, and the projection area mark is used to indicate the position information between the second virtual object and the first virtual object.
16. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the virtual scene interaction method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the virtual scene interaction method according to any one of claims 1 to 14.
