A method, device and electronic device for controlling a virtual object
By setting up a wider judgment area for the virtual window, and in response to the overturning action of the virtual object, the virtual object is controlled to pass through the visible channel side, solving the operation difficulty problem caused by the small area range of the virtual window in the prior art, and improving the user experience.
Patent Information
- Application Number
- CN202210723374.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In the prior art, the area opposite to the virtual window is small, which causes the user to accurately control the virtual object to move to the area opposite to the above-mentioned virtual window to perform the overturning action. The operation is difficult and reduces the user's gaming experience.
By setting a corresponding determination area for the visual channel, the determination area is around the periphery of the visual channel. In response to the overturning action performed by the target virtual object, when the target virtual object faces the determination area and the position relationship between the center axis of the center of gravity and the determination area meets the preset conditions, the control target virtual object passes through one side of the visual channel and reaches the other side of the visual channel.
It improves the possibility that the user controls the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel, reduces the difficulty of operation caused by the small area opposite to the virtual window, and improves the user experience.
Smart Images

Figure CN115300909B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for controlling a virtual object. The present application further provides related electronic equipment and a computer-readable storage medium. Background Art
[0002] Currently, in game applications, when a user controls the movement of a virtual object, if a virtual window is encountered, the user hopes to control the virtual object to climb over the window and enter (or exit) the room.
[0003] In the prior art, whether the virtual object climbs over the virtual window is controlled by judging whether the take-off position of the virtual object for climbing over is within the area directly facing the virtual window. If the take-off position is within the area directly facing the virtual window, the virtual object is controlled to climb over the window; otherwise, the virtual object is controlled to perform other operations.
[0004] However, since the area facing the virtual window is relatively small, the user needs to accurately control the virtual object to move to the area facing the virtual window to perform the climbing action in order to successfully achieve the window climbing operation. This is too restrictive for the user to determine the conditions and the operation is difficult, which reduces the user's gaming experience. For example, during a tense game, the user does not notice whether the starting position of the climbing action is in the area facing the virtual window, and rushes to control the virtual object to perform the climbing action in an attempt to climb over the window, which makes it very easy to control the virtual object to perform other erroneous operations and fail to achieve the window climbing operation. Summary of the invention
[0005] The present application provides a control method, device, electronic device and computer-readable storage medium for a virtual object, so as to reduce the difficulty of user operation and effectively control the virtual object to achieve a target action effect.
[0006] In a first aspect, an embodiment of the present application provides a method for controlling a virtual object, the method comprising:
[0007] Displaying a virtual scene, the virtual scene comprising at least one target virtual object and at least one visual channel, the target virtual object being a virtual object currently controlled by a user through a terminal, the visual channel being used for the target virtual object to pass through from one side of the visual channel to the other side of the visual channel; wherein the visual channel corresponds to a determination area, and the determination area is surrounded by the outer periphery of the visual channel;
[0008] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the central axis of the target virtual object's center of gravity and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0009] Optionally, the first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
[0010] Optionally, the method further comprises:
[0011] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the center of gravity axis of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0012] Optionally, the method further comprises:
[0013] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area and the visual channel meets a second preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0014] Optionally, the second preset condition includes any one of the following: the center of gravity axis is located between the first left edge longitudinal axis and the second left edge longitudinal axis, and the center of gravity axis is located between the first right edge longitudinal axis and the second right edge longitudinal axis.
[0015] Optionally, the visual channel includes a first virtual obstacle, and the first virtual obstacle can be broken;
[0016] The controlling the target virtual object to pass through the visible channel includes:
[0017] The target virtual object is controlled to break the first virtual obstacle and climb over the visible channel.
[0018] Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse to control the orientation of the target virtual object;
[0019] The target virtual object faces the determination area, including:
[0020] The mouse pointer is located within the determination area; or,
[0021] The angle between the target virtual object and the determination area is smaller than a preset angle threshold.
[0022] Optionally, the periphery of the visual channel includes a second virtual obstacle, and the second virtual obstacle cannot be broken;
[0023] The method further comprises:
[0024] In response to a climbing action performed by the target virtual object, when the target virtual object is not facing the judgment area and the centerline of gravity is located to the left of the first left edge longitudinal axis or the centerline of gravity is located to the right of the first right edge longitudinal axis, the target virtual object is controlled to climb the second virtual obstacle.
[0025] Optionally, the method further comprises:
[0026] In response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area, the distance between the target virtual object and the determination area is less than a third distance threshold, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0027] Optionally, the method further comprises:
[0028] When the positional relationship between the axis of the target virtual object's center of gravity and the determination area meets the first preset condition, or when the positional relationship between the axis of the target virtual object's center of gravity and the determination area and the visual channel meets the second preset condition, a prompt mark is displayed in the virtual scene, and the prompt mark is used to prompt the execution of the climbing action.
[0029] Optionally, the visual channel is a virtual door, and the determination area corresponding to the visual channel includes a virtual door frame; or,
[0030] The visual channel is a virtual window, and the determination area corresponding to the visual channel includes a virtual window frame.
[0031] In a second aspect, an embodiment of the present application provides a method for controlling a virtual object, the device comprising:
[0032] A display module, used for displaying a virtual scene, wherein the virtual scene includes at least one target virtual object and at least one visual channel, wherein the target virtual object is a virtual object currently controlled by a user through a terminal, and the visual channel is used for the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel; wherein the visual channel corresponds to a determination area, and the determination area is surrounded by the outer periphery of the visual channel;
[0033] A control module is used to control the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel in response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the central axis of the center of gravity of the target virtual object and the determination area meets a first preset condition.
[0034] Optionally, the first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
[0035] Optionally, the control module is further used for:
[0036] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the center of gravity axis of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0037] Optionally, the control module is further used for:
[0038] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area and the visual channel meets a second preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0039] Optionally, the second preset condition includes any one of the following: the center of gravity axis is located between the first left edge longitudinal axis and the second left edge longitudinal axis, and the center of gravity axis is located between the first right edge longitudinal axis and the second right edge longitudinal axis.
[0040] Optionally, the visual channel includes a first virtual obstacle, and the first virtual obstacle can be broken;
[0041] The control module is also used for:
[0042] The target virtual object is controlled to break the first virtual obstacle and climb over the visible channel.
[0043] Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse to control the orientation of the target virtual object;
[0044] The target virtual object faces the determination area, including:
[0045] The mouse pointer is located within the determination area; or,
[0046] The angle between the target virtual object and the determination area is smaller than a preset angle threshold.
[0047] Optionally, the periphery of the visual channel includes a second virtual obstacle, and the second virtual obstacle cannot be broken;
[0048] The control module is also used for:
[0049] In response to a climbing action performed by the target virtual object, when the target virtual object is not facing the judgment area and the centerline of gravity is located to the left of the first left edge longitudinal axis or the centerline of gravity is located to the right of the first right edge longitudinal axis, the target virtual object is controlled to climb the second virtual obstacle.
[0050] Optionally, the control module is further used for:
[0051] In response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area, the distance between the target virtual object and the determination area is less than a third distance threshold, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0052] Optionally, the control module is further used for:
[0053] When the positional relationship between the axis of the target virtual object's center of gravity and the determination area meets the first preset condition, or when the positional relationship between the axis of the target virtual object's center of gravity and the determination area and the visual channel meets the second preset condition, a prompt mark is displayed in the virtual scene, and the prompt mark is used to prompt the execution of the climbing action.
[0054] Optionally, the visual channel is a virtual door, and the determination area corresponding to the visual channel includes a virtual door frame; or,
[0055] The visual channel is a virtual window, and the determination area corresponding to the visual channel includes a virtual window frame.
[0056] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the processor runs the computer program to execute the virtual object control method as described in any one of the first aspects.
[0057] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium includes a computer program, and when the computer program is executed by a processor, the method for controlling a virtual object as described in any one of the first aspects is implemented.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for controlling a virtual object as described in any one of the first aspects.
[0059] Compared with the prior art, this application has the following advantages:
[0060] The present application provides a method for controlling a virtual object, including: displaying a virtual scene, the virtual scene including at least one target virtual object and at least one visual channel, the target virtual object being a virtual object currently controlled by a user through a terminal, the visual channel being used for allowing the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel; wherein the visual channel corresponds to a determination area, and the determination area is surrounded by the outer periphery of the visual channel; in response to a climbing action performed by the target virtual object, when the target virtual object faces the determination area and the positional relationship between the central axis of the target virtual object's center of gravity and the determination area meets a first preset condition, controlling the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel.
[0061] By setting a corresponding determination area for the visual channel, the determination area surrounds the entire visual channel, that is, the area covered by the determination area is larger than the area covered by the visual channel, and it is easier for the user to control the virtual object to enter the area covered by the determination area than the area covered by the visual channel. Therefore, when the target virtual object is facing the determination area, and the positional relationship between the central axis of the target virtual object's center of gravity and the determination area meets the first preset condition, in response to the crossing action performed by the target virtual object, the target virtual object can be successfully controlled to pass through one side of the visual channel and reach the other side of the visual channel. This greatly increases the possibility that the user controls the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel, and avoids the problem that the user needs to accurately control the target virtual object to move to the above-mentioned small area due to the small area directly facing the virtual window, otherwise it is very easy to control the virtual object to perform other erroneous operations, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0063] Figure 1 A schematic diagram of an application scenario provided for the first embodiment of the present application;
[0064] Figure 2 A schematic flow chart of a method for controlling a virtual object provided in the second embodiment of the present application;
[0065] Figure 3 One of the schematic diagrams of the determination area provided in the second embodiment of the present application;
[0066] Figure 4 A second schematic diagram of a determination area provided for the second embodiment of the present application;
[0067] Figure 5 A schematic diagram of the axis of the center of gravity of the target virtual object provided in the second embodiment of the present application;
[0068] Figure 6 A schematic diagram of a target virtual object direction determination area provided in the second embodiment of the present application;
[0069] Figure 7 One of the schematic diagrams for determining a first angle between a target virtual object and a determination area provided in the second embodiment of the present application;
[0070] Figure 8 A second schematic diagram of determining a first angle between a target virtual object and a determination area provided in the second embodiment of the present application;
[0071] Fig. 9 One of the schematic diagrams of the second embodiment of the present application showing that the positional relationship between the axis of the centroid of the target virtual object and the determination area meets the first preset condition;
[0072] Fig.10 A second schematic diagram of the second embodiment of the present application showing that the positional relationship between the axis of the centroid of the target virtual object and the determination area meets the first preset condition;
[0073] Fig.11 A schematic diagram of the positional relationship between the axis of the center of gravity of the target virtual object and the visual channel provided in the second embodiment of the present application;
[0074] Fig.12 A schematic diagram of the positional relationship between the axis of the center of gravity of the target virtual object and the determination area and the visual channel provided in the second embodiment of the present application;
[0075] Fig.13 A schematic diagram of a process in which a target virtual object crosses a visual channel provided in the second embodiment of the present application;
[0076] Fig.14 A schematic diagram of the structure of a method and device for controlling a virtual object provided in a third embodiment of the present application;
[0077] Fig.15 A schematic diagram of the hardware structure of an electronic device provided in the fourth embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purpose, advantages and features of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotions without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0079] It should be noted that, in the description of the present application, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance, and a specific order or sequence. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, the term "multiple" refers to two or more. The term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship. The terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0080] In order to facilitate understanding of the technical solution of the present application, the relevant concepts involved in the present application are first introduced.
[0081] Virtual environment: It is a virtual environment provided by the application corresponding to the virtual game when it is running on an electronic device. It can be displayed on a display screen for users to view. The virtual environment can be a simulation of the real world, a semi-simulation and semi-fictional environment, or a purely fictional environment. For example, it can be a fictional game environment, a fictional movie environment, a virtual reality environment formed by superimposing a fictional game environment and a real environment, etc. The virtual environment can be a two-dimensional virtual environment or a three-dimensional virtual environment.
[0082] Virtual object: can be called user character or game character or virtual object. In the embodiment of the present application, it refers to an object that can be selected and controlled by the user, and can represent the user image. The user can control the virtual object selected by the user to perform operations in the virtual environment, such as walking, climbing, climbing, jumping, running, shooting, attacking, etc., and multiple users can control their respective virtual objects to interact in the virtual environment, simulating the effect of multiple users interacting face to face. There are many virtual objects in the virtual environment, and different virtual objects usually have different images and executable operations.
[0083] Virtual obstacles: refers to obstacles that block the passage of virtual objects in the virtual environment. For example, virtual obstacles include virtual windows, virtual doors, virtual walls, virtual trees, virtual boxes, etc. Among them, obstacles with connecting passages (or connecting spaces) such as virtual windows and virtual doors can be passed through by virtual objects, while obstacles without connecting passages such as virtual walls, virtual trees, virtual boxes, etc. cannot be passed through by virtual objects.
[0084] Below, the prior art involved in this application and the problems existing in the prior art are first explained.
[0085] In the prior art, whether the virtual object climbs over the virtual window is controlled by judging whether the take-off position of the virtual object for climbing over is within the area directly facing the virtual window. If the take-off position is within the area directly facing the virtual window, the virtual object is controlled to climb over the window; otherwise, the virtual object is controlled to perform other operations.
[0086] However, since the area facing the virtual window is relatively small, the user needs to accurately control the virtual object to move to the area facing the virtual window to perform the climbing action in order to successfully achieve the window climbing operation. This is too restrictive for the user to determine the conditions and the operation is difficult, which reduces the user's gaming experience. For example, during a tense game, the user does not notice whether the starting position of the climbing action is in the area facing the virtual window, and rushes to control the virtual object to perform the climbing action in an attempt to climb over the window, which makes it very easy to control the virtual object to perform other erroneous operations and fail to achieve the window climbing operation.
[0087] Based on the above problems, in order to reduce the difficulty of user operation and effectively control the virtual object to achieve the target action effect. The present application provides a method for controlling a virtual object, a device for controlling a virtual object corresponding to the method, an electronic device that can implement the method for controlling a virtual object, and a computer-readable storage medium. The following provides embodiments to describe the above method, device, electronic device, and computer-readable storage medium in detail.
[0088] In order to make the purpose and technical solution of this application clearer and more intuitive, the method provided by the embodiment of this application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.
[0089] The embodiments of the present application provide a control method, device, storage medium and electronic device for a virtual object. Specifically, the control method for a virtual object in the embodiments of the present application can be performed by an electronic device, wherein the electronic device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), etc. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.
[0090] Combine the following Figure 1 , introduces an application scenario of controlling a virtual object provided by an embodiment of the present application, Figure 1 A schematic diagram of an application scenario provided for the first embodiment of the present application.
[0091] like Figure 1 As shown, the application scenario 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 servers of different games through the network. The terminal is any device with computing hardware that can support and execute software application products corresponding to the game. Game software application products include, but are not limited to, any one of third-person shooter game applications, single-player game applications, and multiplayer online tactical competitive games (Multiplayer Online Battle Arena Games, Moba) applications. The types of the above games may include, but are not limited to, at least one of the following: two-dimensional (Two Dimension, 2D) game applications, three-dimensional (Three Dimension, 3D) game applications, virtual reality (Virtual Reality, VR) game applications, augmented reality (Augmented Reality, AR) game applications, mixed reality (Mixed Reality, MR) game applications. The above is just an example, and this embodiment does not impose any limitation on this.
[0092] One of the at least one terminals is referred to as a first terminal. The first terminal may be a terminal used by a first user. The first user uses the first terminal to operate a virtual object in a virtual game scene to perform an activity, including but not limited to: adjusting body posture, crawling, walking, running, jumping, driving, picking up, shooting, attacking, and throwing. In addition, the terminal has one or more multi-touch screens for sensing and obtaining input of a user through a touch or sliding operation performed at multiple points on one or more touch-sensitive display screens. In addition, when the application scenario 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 servers, etc. 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 play multi-player games online.
[0093] It should be noted that in the following description of the technical solution provided by this application, the terminal is used as an example for description. In other possible implementations, the server can also be used as an execution subject to execute the technical solution provided by this application, and the embodiment of this application does not limit the type of execution subject.
[0094] Next, combine Figure 2 , the control method of the virtual object provided by the present application is described in detail, Figure 2 A flowchart of a method for controlling a virtual object provided in the second embodiment of the present application.
[0095] like Figure 2 As shown, including:
[0096] S201: Display a virtual scene, where the virtual scene includes at least one target virtual object and at least one visual channel.
[0097] The target virtual object is a virtual object currently controlled by the user through the terminal.
[0098] The visual channel is used for the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel. The visual channel may be a virtual window, a virtual door, etc. in a virtual game scene. It should be emphasized that the user can see the visual channel through the game scene displayed on the terminal. For example, the user can see a virtual room or a virtual window in a virtual scene.
[0099] Below, the visual channel is described as a virtual window. For example, when the user controls the target virtual object to stand in the room facing the window, the user can control the target virtual object to pass through one side of the virtual window and reach the other side of the virtual window. It can also be understood that the user controls the target virtual object standing in the room to perform a climbing action, so that the target virtual object climbs over the virtual window to reach the outside of the room.
[0100] Among them, each visual channel corresponds to a determination area, and the determination area is surrounded by the periphery of the visual channel. The determination area is used to assist in determining whether the target virtual object can successfully pass through one side of the visual channel and reach the other side of the visual channel when performing a climbing action. It can be understood that the determination area is the area obtained by expanding in all directions along the periphery of the visual channel. The determination area is surrounded by the periphery of the visual channel. It should be emphasized that the determination area is invisible to the user.
[0101] Optionally, the visual channel is a virtual door, and the determination area corresponding to the visual channel includes a virtual door frame; or, the visual channel is a virtual window, and the determination area corresponding to the visual channel includes a virtual window frame.
[0102] Optionally, the shape and size of the determination area corresponding to the visual channel are not limited and can be the same or different. In addition, the shape and size of the determination areas corresponding to different visual channels can be the same or different.
[0103] Optionally, the shape of the determination area is spherical, cylindrical, cubed, or the same shape as the visible channel, etc. The example of the present application does not limit the shape of the determination area.
[0104] Next, combine Figure 3 , Figure 4 And a specific example, taking the visual channel as a virtual window as an example, the determination area corresponding to the visual channel is exemplarily explained, Figure 3 This is one of the schematic diagrams of the determination area provided in the second embodiment of the present application. Figure 4 The second schematic diagram of the determination area provided for the second embodiment of the present application.
[0105] like Figure 3 As shown, Figure 3The room in the figure has a virtual window 301 facing south (the area defined by the black solid line), and the virtual windows seen from the room include a window on the port side 3011 and a window on the starboard side 3012 (it should be noted that, since the virtual windows on the port side and the starboard side are relative, for the sake of convenience, taking the view from the room to the outside as an example, 3011 is the window on the port side, and 3012 is the window on the starboard side). Along the virtual windows on the port side 3011 and the window on the starboard side 3012, extend in the east and west directions for different distances or the same distance to obtain a determination area 302 (the area defined by the black dotted line).
[0106] like Figure 4 As shown, Figure 3 The room in FIG. 1 has a virtual window 301 facing south (the area defined by the black solid line), and the virtual windows seen from the room include a window on the port side 3011 and a window on the starboard side 3012. The virtual windows on the port side 3011 and the window on the starboard side 3012 are extended in four directions of east, west, south, and north by different distances or the same distance to obtain a determination area 402 (the area defined by the black dotted line).
[0107] The above examples are only illustrative of the shape and size of the determination area, and do not limit the shape and size of the determination area. The shape and size of the determination area can be set according to actual needs, as long as the determination area is surrounded by the outer periphery of the visible channel.
[0108] S202. In response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the central axis of the target virtual object's center of gravity and the determination area meets a first preset condition, control the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel.
[0109] Below, three possible ways of determining the center axis of the target virtual object in the virtual scene are first exemplarily described.
[0110] The terminal uses the coordinates of the target virtual object in the virtual scene to represent the position of the target virtual object in the virtual scene.
[0111] In a possible implementation, in a 3D game application, the terminal determines that the position of the target virtual object in the virtual game scene is represented as a three-dimensional coordinate, for example, a three-dimensional coordinate system is established with the center point of the virtual scene as the origin of the three-dimensional coordinate, and the position of the target virtual object is assumed to be the coordinate (x1, y1, z1), and the coordinate (x1, y1, z1) can represent the specific position of the target virtual object in the virtual scene. Then the center of gravity axis of the target virtual object is x=x1, that is, the x coordinate value of the target virtual object in the virtual scene is x1.
[0112] In another possible implementation, in a 2D game application, the terminal determines that the position of the target virtual object in the three-dimensional virtual game scene is expressed in the form of two-dimensional coordinates, such as coordinates (x2, y2), which can represent the specific position of the target virtual object in the two-dimensional virtual scene. Then the center of gravity axis of the target virtual object is x=x2, that is, the x coordinate value of the target virtual object in the virtual scene is x2.
[0113] Next, combine Figure 5 , an exemplary description of the center axis of gravity of the target virtual object is given, Figure 5 This is a schematic diagram of the center-of-gravity axis of a target virtual object provided in the second embodiment of the present application.
[0114] like Figure 5 As shown, in the virtual room 501 , the target virtual object 503 stands near the virtual window 502 , and the center axis 5031 of gravity of the target virtual object is located between the port side 5022 and the starboard side 5023 of the virtual window 502 .
[0115] Below, two possible implementations of determining whether the target virtual object is facing the determination area are exemplified.
[0116] In one possible implementation, in a computer game scene (i.e., a game in which a user uses a computer and a keyboard and mouse to manipulate a target virtual object), the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse to control the direction of the target virtual object.
[0117] By determining whether the position of the mouse pointer is within the determination area corresponding to the visual channel, it is determined whether the target virtual object is facing the determination area. For example, when the terminal determines that the position of the mouse pointer is within the determination area corresponding to the visual channel, it is determined that the target virtual object is facing the determination area; otherwise, it is determined that the target virtual object is not facing the determination area. For another example, when the terminal determines that the position of the mouse pointer is within the vicinity of the visual channel, it is determined that the target virtual object is facing the visual channel; otherwise, it is determined that the target virtual object is not facing the visual channel.
[0118] Next, combine Figure 6 , an exemplary description is given of determining the orientation of the target virtual object, Figure 6 A schematic diagram of a target virtual object orientation determination area provided in the second embodiment of the present application.
[0119] like Figure 6As shown, the target virtual object 503 is near the virtual window 502, and the mouse pointer 601 is displayed in the determination area 602 corresponding to the virtual window 502, then the terminal determines that the target virtual object 503 is facing the determination area 602, which can also be understood as the terminal determining that the target virtual object 503 is facing the virtual window 502. It should be noted that the virtual window 502 and the determination area 602 seen at this time are two-dimensional schematic diagrams.
[0120] In another possible implementation, the terminal determines whether the target virtual object is facing the determination area by the magnitude relationship between the first angle between the target virtual object and the determination area and the preset angle threshold. Specifically, when the terminal determines that the first angle between the target virtual object and the determination area is less than the preset angle threshold, the terminal determines that the target virtual object is facing the determination area; otherwise, the terminal determines that the target virtual object is not facing the determination area.
[0121] Below, two possible implementations of determining the first angle between the target virtual object and the determination area are exemplarily described.
[0122] In a possible implementation, a ray is emitted from the facing direction (orientation) of the target virtual object toward the determination area, and an angle between the ray and the determination area is determined as a first angle.
[0123] Next, combine Figure 7 , taking the visual channel as a virtual window as an example, the above possible implementation methods are explained. Figure 7 This is one of the schematic diagrams for determining the first angle between the target virtual object and the determination area provided in the second embodiment of the present application.
[0124] like Figure 7 As shown, a virtual window 701, a target virtual object 702, and a determination area 706 corresponding to the virtual window 701 are included. A ray 704 is emitted toward the determination area 706 along the direction directly facing the target virtual object 702, and a reference line 704 parallel to the determination area 706 is drawn along the intersection of the ray 703 and the determination area 706. An angle 705 between the reference line 704 and the ray 703 is determined as a first angle between the target virtual object 702 and the determination area 706.
[0125] The above figure merely illustrates exemplary identification of the virtual window, the determination area corresponding to the virtual window, and the target virtual object, and this embodiment does not impose any specific limitation on this.
[0126] In another possible implementation, a ray is emitted from the facing direction (orientation) of the target virtual object toward the determination area, and an angle between the ray and the normal of the determination area is determined as a first angle.
[0127] Next, combine Figure 8, taking the visual channel as a virtual window as an example, the above possible implementation methods are explained. Figure 8 The second schematic diagram of determining the first angle between the target virtual object and the determination area provided in the second embodiment of the present application.
[0128] like Figure 8 As shown, a virtual window 701, a target virtual object 702, and a determination area 706 corresponding to the virtual window 701 are included. A ray 703 is emitted toward the determination area 706 along the direction directly facing the target virtual object 702, and a normal vector 801 perpendicular to the determination area 706 is drawn along the intersection of the ray 703 and the determination area 706. An angle 802 between the normal vector 801 and the ray 703 is determined as a first angle between the target virtual object 702 and the determination area 706.
[0129] In this embodiment, the implementation method of determining the first angle between the target virtual object and the determination area is merely illustrative and not limiting. The implementation method of determining the first angle between the target virtual object and the determination area can be set according to actual needs.
[0130] It should be noted that the preset angle thresholds corresponding to the first angles in the above two methods for determining the first angle may be the same or different. The preset angle thresholds corresponding to the first angles need to be determined according to actual conditions.
[0131] Optionally, it is determined whether a positional relationship between the central axis of the target virtual object and the determination area meets a first preset condition.
[0132] Optionally, the first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
[0133] Next, combine Figure 9-10 In a specific example, taking the visual channel as a virtual window as an example, the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets the first preset condition. Fig. 9 One of the schematic diagrams of the second embodiment of the present application showing that the positional relationship between the axis of the centroid of the target virtual object and the determination area meets the first preset condition, Fig.10 The second schematic diagram of the second embodiment of the present application showing that the positional relationship between the central axis of the target virtual object and the determination area meets the first preset condition.
[0134] like Fig. 9 As shown, it includes a virtual window 701, a target virtual object 702, a determination area 706 corresponding to the virtual window 701, a first left edge longitudinal axis 901 of the determination area 706, and a first right edge longitudinal axis 902 of the determination area 706. The center of gravity axis 903 of the target virtual object 702 is translated to the left, and when the center of gravity axis 903 is translated to the wall 904 opposite to the target virtual object 702, the center of gravity axis 903 of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the determination area.
[0135] like Fig.10 As shown, the center axis 905 of the target virtual object 702 is translated to the left. When the center axis 905 is translated to the wall 904 opposite to the target virtual object 702, the center axis 905 of the target virtual object is located to the left of the first left edge longitudinal axis corresponding to the determination area, and the distance between the center axis 905 of the target virtual object and the first left edge longitudinal axis is a first distance 906. When the first distance is less than the preset distance threshold, the positional relationship between the center axis of the target virtual object and the determination area meets the first preset condition.
[0136] In this embodiment, in response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the central axis of the target virtual object and the determination area meets the first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel. For example, taking the visual channel as a virtual window as an example, in response to the climbing action performed by the target virtual object, when it is determined that the target virtual object is facing the determination area and the positional relationship between the central axis of the target virtual object and the determination area meets the first preset condition, the target virtual object is controlled to climb over (or pass through) from one side of the virtual window to reach the other side of the virtual window.
[0137] The control method of a virtual object provided by the present application displays a virtual scene, wherein the virtual scene includes at least one target virtual object and at least one visual channel, wherein the target virtual object is a virtual object controlled by the current user through a terminal, and the visual channel is used for the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel; wherein the visual channel corresponds to a determination area, and the determination area is surrounded by the periphery of the visual channel; in response to the climbing action performed by the target virtual object, when the target virtual object faces the determination area, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets the first preset condition, the target virtual object is controlled to pass through one side of the visual channel and reach the other side of the visual channel. By setting a determination area corresponding to the visual channel, the determination area surrounds the entire visual channel, that is, the area covered by the determination area is larger than the area covered by the visual channel, and it is easier for the user to control the virtual object to enter the area covered by the determination area than the area covered by the visual channel. Therefore, when the target virtual object is facing the determination area, and the positional relationship between the target virtual object's center of gravity axis and the determination area meets the first preset condition, in response to the target virtual object's climbing action, the target virtual object can be successfully controlled to pass through one side of the visual channel and reach the other side of the visual channel. This greatly increases the possibility that the user can control the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel, and avoids the problem that the user needs to accurately control the target virtual object to move to the above-mentioned small area due to the small area directly facing the virtual window, otherwise it is very easy to control the virtual object to perform other erroneous operations, thereby improving the user experience.
[0138] Optionally, in response to a climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the center of gravity axis of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0139] Next, combine Fig.11 With a specific example, taking the visual channel as a virtual window as an example, a schematic diagram of the positional relationship between the axis of the center of gravity of the target virtual object and the visual channel provided in the second embodiment of the present application is provided. Fig.11 A schematic diagram of the positional relationship between the center-of-gravity axis and the visual channel of a target virtual object provided in the second embodiment of the present application.
[0140] like Fig.11As shown, it includes a virtual window 701, a target virtual object 702, a second left edge longitudinal axis 1101 of the virtual window 701, and a second right edge longitudinal axis 1102 of the virtual window 701. (It should be noted that in order to distinguish the left edge longitudinal axis of the virtual window from the left edge longitudinal axis of the determination area, the left edge longitudinal axis of the determination area is referred to as the first left edge longitudinal axis, and the left edge longitudinal axis of the virtual window is referred to as the second left edge longitudinal axis.) The center of gravity axis 1103 of the target virtual object 702 is translated to the left. When the center of gravity axis 1103 is translated to the wall 904 opposite to the target virtual object 702, the center of gravity axis 1103 of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the determination area.
[0141] Optionally, in response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the central axis of the target virtual object's center of gravity and the determination area and the visual channel meets a second preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0142] Optionally, the second preset condition includes any one of the following: the center of gravity axis is located between the first left edge longitudinal axis and the second left edge longitudinal axis, and the center of gravity axis is located between the first right edge longitudinal axis and the second right edge longitudinal axis.
[0143] Next, combine Fig.12 With a specific example, taking the visual channel as a virtual window as an example, a schematic diagram of the positional relationship between the axis of the center of gravity of the target virtual object provided in the second embodiment of the present application and the determination area and the visual channel is provided. Fig.12 A schematic diagram of the positional relationship between the center axis of gravity of a target virtual object and a determination area and a visual channel provided in the second embodiment of the present application.
[0144] like Fig.12 As shown, it includes a virtual window 701, a target virtual object 702, a second left edge longitudinal axis 1101 of the virtual window 701, a second right edge longitudinal axis 1102 of the virtual window 701, a first left edge longitudinal axis 901 of the determination area 706, and a first right edge longitudinal axis 902 of the determination area 706. The center of gravity axis 1201 of the target virtual object 702 is translated to the left, and when the center of gravity axis 1201 is translated to the wall 904 opposite to the target virtual object 702, the center of gravity axis 1103 of the target virtual object is located between the first left edge longitudinal axis 901 corresponding to the determination area and the second left edge longitudinal axis 1101 corresponding to the virtual window 701.
[0145] Optionally, the visual channel includes a first virtual obstacle, wherein the first virtual obstacle can be broken.
[0146] Optionally, the step of “controlling the target virtual object to pass through the visible passage” may include: controlling the target virtual object to break through the first virtual obstacle and climb over the visible passage.
[0147] For example, taking the visual channel as a virtual window, the first virtual obstacle can be a breakable glass. Before the user controls the target virtual object to cross the visual channel, the user first controls the target virtual object to break the glass, and then passes through one side of the virtual window to reach the other side of the virtual window.
[0148] Optionally, in response to a climbing action performed by the target virtual object, when the target virtual object is not facing the judgment area and the axis of the center of gravity is located to the left of the longitudinal axis of the first left edge or the axis of the center of gravity is located to the right of the longitudinal axis of the first right edge, the target virtual object is controlled to climb the second virtual obstacle.
[0149] Optionally, in response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area, the distance between the target virtual object and the determination area is less than a third distance threshold, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0150] It should be noted that the distance between the target virtual object and the determination area refers to the straight-line distance between the target virtual object and the determination area.
[0151] Optionally, when the positional relationship between the target virtual object's centroidal axis and the determination area meets the first preset condition, or when the positional relationship between the target virtual object's centroidal axis and the determination area and the visual channel meets the second preset condition, a prompt mark is displayed in the virtual scene, and the prompt mark is used to prompt the execution of the climbing action. When the user sees the indicator mark, he can clearly know that the position of the target virtual object he is controlling meets the positional condition for climbing over the visual channel.
[0152] The control method of a virtual object provided by an embodiment of the present application displays an indication mark in a virtual scene when it is detected that the target virtual object is located in the determination area corresponding to the visible channel. The user can judge whether the target virtual object controlled by the user has entered the determination area (i.e., the effective climbing area) corresponding to the visible channel by whether the prompt mark appears in the display interface, thereby avoiding the problem that the target virtual object is controlled to perform a climbing operation when it is unclear whether the target virtual object has entered the effective climbing range corresponding to the visible channel, resulting in the game application misjudging the behavior of the target virtual object, thereby improving the accuracy of the user's control of the target virtual object to climb over the visual channel and improving the efficiency of human-computer interaction; in addition, compared with the prior art that takes a small area in the direction opposite to the visual channel as the effective climbing range of the visual channel, the determination area in this solution includes the area occupied by the visual channel and the area extending to each preset distance in each direction outside the visual channel, which can greatly improve the possibility of the user controlling the target virtual object to successfully climb over the visual channel, improve the operation fluency of the target virtual object, and improve the user's gaming experience. In particular, in intense battles in virtual games, users often do not have enough time to control the target virtual object to the area occupied by the visible channel, and they hurriedly control the target virtual object to climb over the area near the area occupied by the visible channel. In this case, the possibility of users controlling the target virtual object to successfully climb over the visible channel is greatly increased, the smoothness of the virtual object's escape is improved, and the user's gaming experience is improved.
[0153] Next, combine Fig.13 and one In a specific embodiment, the control method of the virtual object provided by the present application is further described by taking the visual channel as a virtual window as an example. Fig.13 A schematic diagram of the process of a target virtual object crossing a visual channel provided in the second embodiment of the present application.
[0154] like Fig.13 As shown, it includes three interfaces (a), (b), and (c). Fig.13 In the example, the target virtual object 702 is in the virtual room 1300, and the determination area 1301 is the determination area corresponding to the virtual window 1302 (wherein the determination area 1301 is invisible to the user). The visible channel for the target virtual object 702 to climb over is the virtual window 1302. Fig.13As shown in the middle interface (a), the target virtual object 702 is facing the virtual window 1302. As the user presses the movement control 1303 to control the target virtual object 702 to move from the position 1305 to the virtual window 1302 in the direction indicated by the arrow 1304, when it moves to the position 1306, the terminal detects that the center axis 1308 of the target virtual object is located in the determination area 1301 corresponding to the virtual window 1302, and the terminal determines that the position relationship between the position 1306 where the target virtual object 702 is located and the determination area 1301 meets the first preset condition. Fig.13 As shown in the middle interface (b), a prompt mark 1307 with "open window" is displayed near the virtual window 1302. Therefore, after the terminal detects that the target virtual object is facing the determination area, and the positional relationship between the center of gravity axis of the target virtual object and the determination area meets the first preset condition, as shown in FIG. Fig.13 As shown in the middle interface (b), the terminal responds to the user triggering the flip control 1308 to control the target virtual object to flip over, such as Fig.13 As shown in the middle interface (c), the terminal displays the target virtual object climbing over the virtual window, that is, the target virtual object 702 climbs from one side of the virtual window 1302 in the virtual room 1300 to the other side of the virtual window 1302 and reaches the screen outside the virtual room 1300.
[0155] Fig.14 This is a schematic diagram of the structure of a virtual object control method and device provided in the third embodiment of the present application. Fig.14 As shown, the device includes: a display module 1401 and a control module 1402 .
[0156] The display module 1401 is used to display a virtual scene, wherein the virtual scene includes at least one target virtual object and at least one visual channel, wherein the target virtual object is a virtual object currently controlled by the user through the terminal, and the visual channel is used for the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel; wherein the visual channel corresponds to a determination area, and the determination area is surrounded by the outer periphery of the visual channel;
[0157] The control module 1402 is used to control the target virtual object to pass through one side of the visual channel to the other side of the visual channel in response to the climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the positional relationship between the central axis of the center of gravity of the target virtual object and the judgment area meets the first preset condition.
[0158] Optionally, the first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
[0159] Optionally, the control module 1402 is further configured to:
[0160] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the center of gravity axis of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0161] Optionally, the control module 1402 is further configured to:
[0162] In response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area and the visual channel meets a second preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0163] Optionally, the second preset condition includes any one of the following: the center of gravity axis is located between the first left edge longitudinal axis and the second left edge longitudinal axis, and the center of gravity axis is located between the first right edge longitudinal axis and the second right edge longitudinal axis.
[0164] Optionally, the visual channel includes a first virtual obstacle, and the first virtual obstacle can be broken;
[0165] The control module 1402 is also used for:
[0166] The target virtual object is controlled to break the first virtual obstacle and climb over the visible channel.
[0167] Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse to control the orientation of the target virtual object;
[0168] The target virtual object faces the determination area, including:
[0169] The mouse pointer is located within the determination area; or,
[0170] The angle between the target virtual object and the determination area is smaller than a preset angle threshold.
[0171] Optionally, the periphery of the visual channel includes a second virtual obstacle, and the second virtual obstacle cannot be broken;
[0172] The control module 1402 is also used for:
[0173] In response to a climbing action performed by the target virtual object, when the target virtual object is not facing the judgment area and the centerline of gravity is located to the left of the first left edge longitudinal axis or the centerline of gravity is located to the right of the first right edge longitudinal axis, the target virtual object is controlled to climb the second virtual obstacle.
[0174] Optionally, the control module 1402 is further configured to:
[0175] In response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area, the distance between the target virtual object and the determination area is less than a third distance threshold, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
[0176] Optionally, the control module 1402 is further configured to:
[0177] When the positional relationship between the axis of the target virtual object's center of gravity and the determination area meets the first preset condition, or when the positional relationship between the axis of the target virtual object's center of gravity and the determination area and the visual channel meets the second preset condition, a prompt mark is displayed in the virtual scene, and the prompt mark is used to prompt the execution of the climbing action.
[0178] Optionally, the visual channel is a virtual door, and the determination area corresponding to the visual channel includes a virtual door frame; or,
[0179] The visual channel is a virtual window, and the determination area corresponding to the visual channel includes a virtual window frame.
[0180] The virtual object control device provided in this embodiment can be used to execute the technical solution of the above-mentioned virtual object control method embodiment. Its implementation principle and technical effects are similar, and this embodiment will not be repeated here.
[0181] Fig.15 A schematic diagram of the hardware structure of an electronic device provided in the fourth embodiment of the present application is shown in FIG. Fig.15As shown, the electronic device 1500 of this embodiment includes: a processor 1501 and a memory 1502;
[0182] Memory 1502, used to store computer-executable instructions;
[0183] The processor 1501 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the virtual object control method in the above embodiment. For details, please refer to the relevant description in the above virtual object control method embodiment.
[0184] Optionally, the memory 1502 may be independent or integrated with the processor 1501 .
[0185] When the memory 1502 is independently provided, the electronic device further includes a bus 1503 for connecting the memory 1502 and the processor 1501 .
[0186] The fifth embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the virtual object control method executed by the above electronic device is implemented.
[0187] The sixth embodiment of the present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any embodiment of the above-mentioned virtual object control method.
[0188] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0189] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0190] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0191] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0192] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0193] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0194] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling a virtual object, characterized in that: The method comprises: Displaying a virtual scene, the virtual scene comprising at least one target virtual object and at least one visual channel, the target virtual object being a virtual object currently controlled by a user through a terminal, the visual channel being used for the target virtual object to pass through from one side of the visual channel to the other side of the visual channel; wherein the visual channel corresponds to a determination area, the determination area is surrounded by the periphery of the visual channel, and the determination area is larger than the visual channel; In response to the climbing action performed by the target virtual object, when the target virtual object faces the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel; The first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
2. The method according to claim 1, characterized in that The method further comprises: In response to the climbing action performed by the target virtual object, when the target virtual object is facing the judgment area and the center of gravity axis of the target virtual object is located between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
3. The method according to claim 2, characterized in that The method further comprises: In response to the climbing action performed by the target virtual object, when the target virtual object is facing the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area and the visual channel meets a second preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
4. The method according to claim 3, characterized in that The second preset condition includes any one of the following: the center of gravity axis is located between the first left edge longitudinal axis and the second left edge longitudinal axis, and the center of gravity axis is located between the first right edge longitudinal axis and the second right edge longitudinal axis.
5. The method according to any one of claims 1 to 4, characterized in that: The visual channel includes a first virtual obstacle, and the first virtual obstacle can be broken; The controlling the target virtual object to pass through the visible channel comprises: The target virtual object is controlled to break the first virtual obstacle and climb over the visible channel.
6. The method according to any one of claims 1 to 4, characterized in that: The current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse to control the direction of the target virtual object; The target virtual object faces the determination area, including: The mouse pointer is located within the determination area; or, The angle between the target virtual object and the determination area is smaller than a preset angle threshold.
7. The method according to claim 1, characterized in that The periphery of the visual channel includes a second virtual obstacle, and the second virtual obstacle cannot be broken; The method further comprises: In response to a climbing action performed by the target virtual object, when the target virtual object is not facing the judgment area and the centerline of gravity is located to the left of the first left edge longitudinal axis or the centerline of gravity is located to the right of the first right edge longitudinal axis, the target virtual object is controlled to climb the second virtual obstacle.
8. The method according to claim 1, characterized in that The method further comprises: In response to a climbing action performed by the target virtual object, when the target virtual object is facing the determination area, the distance between the target virtual object and the determination area is less than a third distance threshold, and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to pass through one side of the visual channel to reach the other side of the visual channel.
9. The method according to claim 1, characterized in that: The method further comprises: When the positional relationship between the axis of the target virtual object's center of gravity and the determination area meets the first preset condition, or the positional relationship between the axis of the target virtual object's center of gravity and the determination area and the visual channel meets the second preset condition, a prompt mark is displayed in the virtual scene, and the prompt mark is used to prompt the execution of the climbing action.
10. The method according to claim 1, characterized in that The visual channel is a virtual door, and the determination area corresponding to the visual channel includes a virtual door frame; or, The visual channel is a virtual window, and the determination area corresponding to the visual channel includes a virtual window frame.
11. A control device for a virtual object, characterized in that: The device comprises: A display module, used for displaying a virtual scene, wherein the virtual scene includes at least one target virtual object and at least one visual channel, wherein the target virtual object is a virtual object currently controlled by a user through a terminal, and the visual channel is used for the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel; wherein the visual channel corresponds to a determination area, the determination area surrounds the periphery of the visual channel, and the determination area is larger than the visual channel; a control module, configured to, in response to the climbing action performed by the target virtual object, control the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel when the target virtual object faces the determination area and the positional relationship between the axis of the center of gravity of the target virtual object and the determination area meets a first preset condition; The first preset condition includes any one of the following: the center of gravity axis of the target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the judgment area, the center of gravity axis is located to the left of the first left edge longitudinal axis and the distance from the first left edge longitudinal axis is less than a preset distance threshold, the center of gravity axis is located to the right of the first right edge longitudinal axis and the distance from the first right edge longitudinal axis is less than a preset distance threshold.
12. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the control method of the virtual object as described in any one of claims 1 to 10 is executed.
13. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the control method of the virtual object according to any one of claims 1 to 10.
Citation Information
Patent Citations
Object control method and device, storage medium and electronic device
CN108635853A
Method and device for controlling display of virtual scene, storage medium and computer equipment
CN110947174A