[go: up one dir, main page]

CN115300909B - A method, device and electronic device for controlling a virtual object - Google Patents

A method, device and electronic device for controlling a virtual object Download PDF

Info

Publication number
CN115300909B
CN115300909B CN202210723374.0A CN202210723374A CN115300909B CN 115300909 B CN115300909 B CN 115300909B CN 202210723374 A CN202210723374 A CN 202210723374A CN 115300909 B CN115300909 B CN 115300909B
Authority
CN
China
Prior art keywords
virtual object
target virtual
visual channel
center
longitudinal axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210723374.0A
Other languages
Chinese (zh)
Other versions
CN115300909A (en
Inventor
罗浩
刘勇成
胡志鹏
袁思思
程龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202210723374.0A priority Critical patent/CN115300909B/en
Publication of CN115300909A publication Critical patent/CN115300909A/en
Application granted granted Critical
Publication of CN115300909B publication Critical patent/CN115300909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种虚拟对象的控制方法、装置及电子设备,该方法包括:显示虚拟场景,虚拟场景包括至少一个目标虚拟对象和至少一个可视通道,目标虚拟对象为当前用户通过终端操控的虚拟对象,可视通道用于供目标虚拟对象从可视通道一侧穿过,到达可视通道的另一侧;可视通道与一个判定区域相对应;响应于目标虚拟对象执行的翻越动作,在目标虚拟对象朝向判定区域,且目标虚拟对象的重心中轴线与判定区域之间的位置关系符合第一预设条件的情况下,控制目标虚拟对象从可视通道一侧穿过,到达可视通道的另一侧。通过目标虚拟对象与判定区域之间的位置关系来确定控制目标虚拟对象实现的动作效果,提高了用户控制目标虚拟对象实现目标动作的可能性。

The present application discloses a control method, device and electronic device for a virtual object, the method comprising: 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 controlled by the current 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; the visual channel corresponds to a determination area; 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 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 from one side of the visual channel to the other side of the visual channel. The action effect achieved by controlling the target virtual object is determined by the positional relationship between the target virtual object and the determination area, thereby increasing the possibility that the user controls the target virtual object to achieve the target action.

Description

Virtual object control method and device and electronic equipment
Technical Field
The application relates to the technical field of computers, in particular to a control method and device of a virtual object, and further provides related electronic equipment and a computer readable storage medium.
Background
Currently, in gaming applications, during the user's control of the movement of a virtual object, if a virtual window is encountered, the user wishes to control the virtual object to turn over the window into (out of) the room.
In the prior art, whether the virtual object turns over the virtual window is controlled by judging whether the take-off position of the virtual object for the turning-over action is in the area opposite to the virtual window, if the take-off position is in the area opposite to the virtual window, the virtual object is controlled to execute the turning-over action, otherwise, the virtual object is controlled to execute other operations.
However, because the area range over which the virtual window is over is smaller, the user needs to precisely control the virtual object to move into the area over which the virtual window is over and execute the overturning action to successfully realize the window overturning operation, so that the judgment conditions are over-limited for the user, the operation difficulty is high, and the game experience of the user is reduced. For example, during the process of the game tension fight, if the user does not notice whether the jump position of the jump action is in the area opposite to the virtual window, the user urgently controls the virtual object to execute the jump action to try to jump the window, so that other misoperation of the virtual object is extremely easy to control, and the execution of the window-flipping operation cannot be realized.
Disclosure of Invention
The application provides a control method and device of a virtual object, electronic equipment and a computer readable storage medium, which are used for reducing the operation difficulty of a user and effectively controlling the virtual object to achieve a target action effect.
In a first aspect, an embodiment of the present application provides a method for controlling a virtual object, where the method includes:
Displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, and the visual channel is used for the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel;
And responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
Optionally, the first preset condition includes any one of a center of gravity axis of the target virtual object being located between a first left edge longitudinal axis and a first right edge longitudinal axis corresponding to the determination region, the center of gravity axis being located to the left of the first left edge longitudinal axis and a distance from the first left edge longitudinal axis being less than a preset distance threshold, the center of gravity axis being located to the right of the first right edge longitudinal axis and a distance from the first right edge longitudinal axis being less than a preset distance threshold.
Optionally, the method further comprises:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the center of gravity central axis of the target virtual object is positioned between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel.
Optionally, the method further comprises:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object, the judging area and the visual channel meets a second preset condition.
Optionally, the second preset condition includes any one of the center of gravity axis being located between the first left edge longitudinal axis and the second left edge longitudinal axis, the center of gravity axis being located between the first right edge longitudinal axis and the second right edge longitudinal axis.
Optionally, a first virtual obstacle is included in the visual channel, and the first virtual obstacle can be broken;
the controlling the target virtual object to pass through the visual channel includes:
and controlling the target virtual object to break the first virtual barrier and cross the visual channel.
Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse so as to control the orientation of the target virtual object;
The target virtual object facing the determination area includes:
The mouse pointer being located within the decision region, or
And the included angle between the target virtual object and the judging area is smaller than a preset angle threshold value.
Optionally, the periphery of the visual channel includes a second virtual barrier, the second virtual barrier being non-breakable;
The method further comprises the steps of:
and in response to the step of performing the step of traversing the target virtual object, controlling the target virtual object to climb the second virtual obstacle when the target virtual object is not oriented to the determination area and the center of gravity axis is located on the left side of the first left edge longitudinal axis or the center of gravity axis is located on the right side of the first right edge longitudinal axis.
Optionally, the method further comprises:
And responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area, the distance between the target virtual object and the judging area is smaller than a third distance threshold value and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
Optionally, the method further comprises:
And displaying a prompt identifier in the virtual scene under the condition that the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition or the position relationship between the center of gravity central axis of the target virtual object and the judging area and the visual channel accords with the second preset condition, wherein the prompt identifier is used for prompting to execute the overturning action.
Optionally, the visual channel is a virtual door, and the judging area corresponding to the visual channel comprises a virtual door frame, or
The visual channel is a virtual window, and the judging area corresponding to the visual channel comprises a virtual window frame.
In a second aspect, an embodiment of the present application provides a method for controlling a virtual object, where the device includes:
The display module is used for displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, and the visual channel is used for the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel;
The control module is used for responding to the overturning action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
Optionally, the first preset condition includes any one of a center of gravity axis of the target virtual object being located between a first left edge longitudinal axis and a first right edge longitudinal axis corresponding to the determination region, the center of gravity axis being located to the left of the first left edge longitudinal axis and a distance from the first left edge longitudinal axis being less than a preset distance threshold, the center of gravity axis being located to the right of the first right edge longitudinal axis and a distance from the first right edge longitudinal axis being less than a preset distance threshold.
Optionally, the control module is further configured to:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the center of gravity central axis of the target virtual object is positioned between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel.
Optionally, the control module is further configured to:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object, the judging area and the visual channel meets a second preset condition.
Optionally, the second preset condition includes any one of the center of gravity axis being located between the first left edge longitudinal axis and the second left edge longitudinal axis, the center of gravity axis being located between the first right edge longitudinal axis and the second right edge longitudinal axis.
Optionally, a first virtual obstacle is included in the visual channel, and the first virtual obstacle can be broken;
The control module is further configured to:
and controlling the target virtual object to break the first virtual barrier and cross the visual channel.
Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse so as to control the orientation of the target virtual object;
The target virtual object facing the determination area includes:
The mouse pointer being located within the decision region, or
And the included angle between the target virtual object and the judging area is smaller than a preset angle threshold value.
Optionally, the periphery of the visual channel includes a second virtual barrier, the second virtual barrier being non-breakable;
The control module is further configured to:
and in response to the step of performing the step of traversing the target virtual object, controlling the target virtual object to climb the second virtual obstacle when the target virtual object is not oriented to the determination area and the center of gravity axis is located on the left side of the first left edge longitudinal axis or the center of gravity axis is located on the right side of the first right edge longitudinal axis.
Optionally, the control module is further configured to:
And responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area, the distance between the target virtual object and the judging area is smaller than a third distance threshold value and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
Optionally, the control module is further configured to:
And displaying a prompt identifier in the virtual scene under the condition that the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition or the position relationship between the center of gravity central axis of the target virtual object and the judging area and the visual channel accords with the second preset condition, wherein the prompt identifier is used for prompting to execute the overturning action.
Optionally, the visual channel is a virtual door, and the judging area corresponding to the visual channel comprises a virtual door frame, or
The visual channel is a virtual window, and the judging area corresponding to the visual channel comprises a virtual window frame.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory is configured to store a computer program, and the processor is configured to call and run the computer program from the memory, so that the processor runs the computer program to execute the method for controlling a virtual object according to any one of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, including a computer program, which when executed by a processor implements a method for controlling a virtual object according to any one of the first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a method of controlling a virtual object according to any of the first aspects.
Compared with the prior art, the application has the following advantages:
The virtual object control method comprises the steps of displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, the visual channel is used for enabling the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel, the visual channel corresponds to a judging area, the judging area surrounds the periphery of the visual channel, and under the condition that the target virtual object faces the judging area and the position relation between the center axis of gravity of the target virtual object and the judging area meets a 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 in response to the crossing action executed by the target virtual object.
By setting the corresponding judging area for the visual channel, the judging area surrounds the whole visual channel, namely, the area coverage of the judging area is larger than that of the visual channel, and compared with the area coverage of the visual channel, a user can control the virtual object to enter into the area coverage of the judging area more easily. Therefore, when the target virtual object faces the judging area and the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition, the target virtual object can be successfully controlled to pass through one side of the visual channel to reach the other side of the visual channel in response to the crossing action executed by the target virtual object. The method greatly 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, avoids the problem that the user needs to precisely control the target virtual object to move into the cell because the area range opposite to the virtual window is smaller, otherwise, the user is very easy to control the virtual object to execute other misoperation, and improves the user experience.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic view of an application scenario provided in a first embodiment of the present application;
Fig. 2 is a flow chart of a control method of a virtual object according to a second embodiment of the present application;
FIG. 3 is a schematic diagram of a determination area according to a second embodiment of the present application;
FIG. 4 is a second schematic diagram of a determination area according to a second embodiment of the present application;
FIG. 5 is a schematic diagram of a center of gravity axis of a target virtual object according to a second embodiment of the present application;
FIG. 6 is a schematic diagram of a target virtual object orientation determination area according to a second embodiment of the present application;
FIG. 7 is a schematic diagram of determining a first included angle between a target virtual object and a determination area according to a second embodiment of the present application;
FIG. 8 is a second schematic diagram of determining a first angle between a target virtual object and a determination area according to a second embodiment of the present application;
fig. 9 is a schematic diagram of a positional relationship between a center of gravity axis of a target virtual object and a determination area according to a first preset condition according to a second embodiment of the present application;
FIG. 10 is a second schematic diagram of a second embodiment of the present application, in which a position relationship between a center axis of gravity of a target virtual object and a determination area meets a first preset condition;
FIG. 11 is a schematic diagram illustrating a positional relationship between a center of gravity axis of a target virtual object and a visual channel according to a second embodiment of the present application;
FIG. 12 is a schematic diagram of a positional relationship between a center of gravity axis of a target virtual object and a determination area and a visual channel according to a second embodiment of the present application;
FIG. 13 is a schematic diagram illustrating a process of traversing a visual channel by a target virtual object according to a second embodiment of the present application;
fig. 14 is a schematic structural diagram of a control method device for a virtual object according to a third embodiment of the present application;
Fig. 15 is a schematic hardware structure of an electronic device according to a fourth embodiment of the present application.
Detailed Description
The application will be described in further detail with reference to the drawings and the detailed description, in order to make the objects, advantages and features of the application more apparent. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application may be embodied in many other forms than described herein and similarly generalized to the embodiments described herein may be made by those skilled in the art without departing from the spirit of the application and the application is therefore not limited to the specific embodiments disclosed below.
It should be noted that in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying any particular order or sequence. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, the term "plurality" means two or more, unless otherwise indicated. The term "and/or" describes an association relationship of associated objects, meaning that there may be three relationships, e.g., A and/or B, and that there may be three cases where A exists alone, while A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
In order to facilitate understanding of the technical solution of the present application, related concepts related to the present application will be described first.
The virtual environment is provided when the application program corresponding to the virtual game runs on the electronic equipment, and can be displayed through a display screen so as to be convenient for a user to check. The virtual environment may be a simulation environment for the real world, a semi-simulation and semi-imaginary environment, or a pure imaginary environment. Such as a fictitious game environment, a fictitious movie environment, a virtual reality environment formed by superimposing a fictitious game environment and a real environment, etc. The virtual environment may be a two-dimensional virtual environment or a three-dimensional virtual environment.
Virtual objects, which may be referred to as user characters or game characters or virtual objects, refer in embodiments of the application to objects that may be selected and controlled by a user, and may represent user images. The user can control the virtual object selected by the user to execute operations in the virtual environment, such as walking, climbing, jumping, running, shooting, attacking and the like, so that a plurality of users can control the virtual objects selected by the users to interact in the virtual environment, and the effect of face-to-face interaction of the users is simulated. The number of virtual objects in a virtual environment is large, and different virtual objects often have different visualizations and executable operations.
Virtual obstacle refers to an obstacle in the virtual environment which blocks the passage of virtual objects. For example, virtual obstacles include virtual windows, virtual doors, virtual walls, virtual trees, virtual boxes, and the like. Wherein, the obstacles such as virtual windows and virtual doors with communication channels (or communication spaces) can be penetrated by virtual objects, while the obstacles such as virtual walls, virtual trees, virtual boxes and the like without communication channels in the middle can not be penetrated by virtual objects.
The prior art and problems associated with the prior art according to the present application will be described first.
In the prior art, whether the virtual object turns over the virtual window is controlled by judging whether the take-off position of the virtual object for the turning-over action is in the area opposite to the virtual window, if the take-off position is in the area opposite to the virtual window, the virtual object is controlled to execute the turning-over action, otherwise, the virtual object is controlled to execute other operations.
However, because the area range over which the virtual window is over is smaller, the user needs to precisely control the virtual object to move into the area over which the virtual window is over and execute the overturning action to successfully realize the window overturning operation, so that the judgment conditions are over-limited for the user, the operation difficulty is high, and the game experience of the user is reduced. For example, during the process of the game tension fight, if the user does not notice whether the jump position of the jump action is in the area opposite to the virtual window, the user urgently controls the virtual object to execute the jump action to try to jump the window, so that other misoperation of the virtual object is extremely easy to control, and the execution of the window-flipping operation cannot be realized.
Based on the problems, in order to reduce the operation difficulty of the user, the virtual object is effectively controlled to achieve the target action effect. The application provides a control method of a virtual object, a control device of the virtual object corresponding to the method, an electronic device capable of implementing the control method of the virtual object and a computer readable storage medium. The following provides detailed descriptions of the above methods, apparatuses, electronic devices, and computer-readable storage media.
In order to make the purpose and the technical scheme of the application clearer and more intuitive, the method provided by the embodiment of the application is described in detail below with reference to the attached drawings and the embodiment. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a control method and device of a virtual object, a storage medium and electronic equipment. Specifically, the method for controlling the virtual object according to the embodiment of the present application may be executed by an electronic device, where the electronic device may be a device such as a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a Personal computer (Personal Computer, PC), a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), and the like, and the terminal may further include a client, which may be a game application client, a browser client carrying a game program, or an instant messaging client, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms.
Next, referring to fig. 1, an application scenario of virtual object control provided by an embodiment of the present application is described, and fig. 1 is a schematic diagram of an application scenario provided by a first embodiment of the present application.
As shown in fig. 1, 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 server of different games through the network. A terminal is any device having computing hardware capable of supporting and executing a software application product corresponding to a game. The game software application product includes, but is not limited to, any of a third person shooter game application, a single person game application, and a multiplayer online tactical game (Multiplayer Online Battle ARENA GAMES, moba) application. Types of the above-described games may include, but are not limited to, at least one of a Two-dimensional (2D) game application, a Three-dimensional (3D) game application, a Virtual Reality (VR) game application, an augmented Reality (Augmented Reality, AR) game application, a Mixed Reality (MR) game application. The above is merely an example, and the present embodiment is not limited in any way.
One of the at least one terminal is referred to as a first terminal, which may be a terminal used by a first user who operates a virtual object located in a virtual game scene to perform an activity including, but not limited to, at least one of adjusting body posture, crawling, walking, running, jumping, driving, picking up, shooting, attacking, throwing. In addition, the terminal has one or more multi-touch-sensitive screens for sensing and obtaining inputs of a user through touch or slide operations performed at a plurality of points of the one or more touch-sensitive display screens. In addition, when the application scenario includes a plurality of terminals, a plurality of servers, and a plurality of networks, different terminals may be connected to each other through different networks, through different servers. The network may be a wireless network or a wired 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, the different terminals may be connected to other terminals or to a server or the like using their own bluetooth network or hotspot network. In addition, the system may include multiple databases coupled to different servers and information related to the gaming environment may be continuously stored in the databases as different users play multiplayer games online.
It should be noted that, in the following description of the technical solution provided in the present application, a terminal is taken as an execution body for illustration. In other possible embodiments, the technical solution provided by the present application may also be executed by using the server as the execution body, and the embodiment of the present application is not limited to the type of the execution body.
Next, with reference to fig. 2, a detailed description is given of a method for controlling a virtual object provided by the present application, and fig. 2 is a flow chart of a method for controlling a virtual object provided by a second embodiment of the present application.
As shown in fig. 2, includes:
s201, displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel.
The target virtual object is a virtual object controlled by the current user through the terminal.
The visual channel is 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 may be a virtual window, a virtual door, etc. in a virtual game scene. It is emphasized that the user can see the visual channel through the displayed game scene on the terminal. For example, a user may see a virtual room, a virtual window in a virtual scene.
In the following, a visual channel is taken as a virtual window as an example. For example, when a user manipulates a target virtual object to stand in a room facing a window, the user may manipulate the target virtual object to pass through one side of the virtual window to the other side of the virtual window. It is also understood that the user manipulates the target virtual object within the room to perform a panning action such that the target virtual object passes over the virtual window to the outside of the room.
Wherein each of the visual channels corresponds to a judgment area, and the judgment area is surrounded on the periphery of the visual channel. The judging area is used for assisting in judging whether the target virtual object can successfully pass through one side of the visual channel to reach the other side of the visual channel when the target virtual object executes the crossing action. It is understood that the determination area is an area obtained by expanding in various directions along the periphery of the visual channel. The decision area is enclosed around the periphery of the viewing channel. It should be emphasized that this decision area is not visible to the user.
Optionally, the visual channel is a virtual door, the judging area corresponding to the visual channel comprises a virtual door frame, or the visual channel is a virtual window, and the judging area corresponding to the visual channel comprises a virtual window frame.
Alternatively, the shape and the area size of the determination area corresponding to the visual channel are not limited at all, and may be the same or different. The shape and size of the regions between the determination regions corresponding to different visual channels may be the same or different.
Alternatively, the shape of the determination region is spherical, or cylindrical, or square, or cubic, or the same shape as that of the visual channel, or the like, and the shape of the determination region is not limited by the present embodiment.
Next, with reference to fig. 3, fig. 4, and specific examples, taking a visual channel as a virtual window as an example, a determination area corresponding to the visual channel is illustrated, fig. 3 is one of schematic diagrams of the determination area provided in the second embodiment of the present application, and fig. 4 is a second schematic diagram of the determination area provided in the second embodiment of the present application.
As shown in fig. 3, the room in fig. 3 has a virtual window 301 facing south (area defined by a black solid line), and the virtual window includes a window port 3011 and a window starboard 3012 when viewed from the inside of the room (note that, since the port and starboard of the virtual window are relatively speaking, for convenience of description, 3011 is the window port and 3012 is the window starboard when viewed from the inside of the room to the outside of the room, for example). The determination region 302 (region defined by the black dotted line) is obtained by extending the window port 3011 and the window starboard 3012 of the virtual window in the east-west direction by different distances or by the same distance.
As shown in fig. 4, the room in fig. 3 has a virtual window 301 (area defined by solid black lines) facing south, which includes a window port 3011 and a window starboard 3012 as viewed from the room. The determination area 402 (area defined by the black dotted line) is obtained by extending the virtual window in the four directions of east, west, south, and north by different distances or by the same distance along the window port 3011 and the window starboard 3012.
The above examples are merely illustrative of the shape and size of the determination region, and are not limited to the shape and size of the determination region, and the shape and size of the determination region may be determined according to actual requirements, as long as the determination region is satisfied to surround the outer periphery of the visible channel.
S202, responding to the overturning action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
In the following, three possible ways of centering the center of gravity axis of the target virtual object in the virtual scene are first described by way of example.
The terminal adopts the coordinates of the target virtual object in the virtual scene to represent the position of the target virtual object in the virtual scene.
In one possible implementation, in the 3D game application, the terminal determines that the position of the target virtual object in the virtual game scene is represented in a three-dimensional coordinate form, for example, a three-dimensional coordinate system is established by taking the center point of the virtual scene as the three-dimensional coordinate origin, and the position of the target virtual object is assumed to be a coordinate (x 1,y1,z1), where the coordinate (x 1,y1,z1) can represent the specific position of the target virtual object in the virtual scene. Then the center axis of gravity of the target virtual object is x=x 1, that is, the value of the x coordinate of the target virtual object in the virtual scene is x 1.
In another possible implementation, in a 2D game application, the terminal determines that the location of the target virtual object in the three-dimensional virtual game scene is represented in two-dimensional coordinates, such as coordinates (x 2,y2), which can represent the specific location of the target virtual object in the two-dimensional virtual scene. Then the center axis of gravity of the target virtual object is x=x 2, that is, the value of the x coordinate of the target virtual object in the virtual scene is x 2.
Next, with reference to fig. 5, an exemplary description is made of a center of gravity axis of a target virtual object, and fig. 5 is a schematic diagram of a center of gravity axis of a target virtual object according to a second embodiment of the present application.
As shown in fig. 5, a target virtual object 503 stands near a virtual window 502 in a virtual room 501, and a center axis 5031 of gravity of the target virtual object is located between a port 5022 and a starboard 5023 of the virtual window 502.
Next, two possible implementations of determining whether the target virtual object is oriented to the determination area are exemplarily described.
In one possible implementation, in a computer game scenario (i.e., a game in which a user manipulates a target virtual object through a computer and using a keyboard and a mouse), the current user adjusts the position of a mouse pointer in the virtual scenario by moving the mouse to control the orientation of the target virtual object.
Whether the target virtual object faces the judging area is judged by judging whether the position of the mouse pointer is in the judging area corresponding to the visual channel. For example, when the terminal determines that the position of the mouse pointer is in the judging area corresponding to the visual channel, the terminal determines that the target virtual object faces the judging area, otherwise, the terminal determines that the target virtual object does not face the judging area. For another example, when the terminal determines that the position of the mouse pointer is in the vicinity of the visual channel, the target virtual object is determined to be oriented to the visual channel, and otherwise, the target virtual object is determined to be not oriented to the visual channel.
Next, with reference to fig. 6, an exemplary description will be given of determining the direction of the target virtual object, and fig. 6 is a schematic diagram of the target virtual object direction determination area according to the second embodiment of the present application.
As shown in fig. 6, when 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, the terminal determines that the target virtual object 503 is oriented to the determination area 602, which may be understood as the terminal determines that the target virtual object 503 is oriented to the virtual window 502. The virtual window 502 and the determination area 602 are two-dimensional schematic views.
In another possible implementation manner, the terminal determines whether the target virtual object faces the determination area according to the magnitude relation between the first included angle between the target virtual object and the determination area and the preset angle threshold. Specifically, when the terminal determines that the first included angle between the target virtual object and the judging area is smaller than the preset angle threshold, the terminal determines that the target virtual object faces the judging area, otherwise, the terminal determines that the target virtual object does not face the judging area.
In the following, two possible implementations of determining the first angle of the target virtual object to the decision area are exemplarily described.
In one possible implementation, a ray is emitted from a direction (direction) opposite to the target virtual object to the determination area, and an angle between the ray and the determination area is determined as a first angle.
Next, with reference to fig. 7, a visual channel is taken as an example of a virtual window, and the foregoing possible implementation manner is described, where fig. 7 is one of schematic diagrams for determining a first included angle between a target virtual object and a determination area according to a second embodiment of the present application.
As shown in fig. 7, the virtual window 701, the target virtual object 702, and the determination area 706 corresponding to the virtual window 701 are included. A ray 704 is issued to the determination area 706 in the direction opposite to the target virtual object 702, and a reference line 704 parallel to the determination area 706 is drawn at 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 region 706.
In the above figures, only the virtual window, the determination area corresponding to the virtual window, and the target virtual object are identified by way of example, which is not limited in any way.
In another possible implementation, a ray is emitted from a direction (direction) opposite to the target virtual object to the determination area, and an angle between the ray and a normal line of the determination area is determined as the first angle.
Next, with reference to fig. 8, a visual channel is taken as an example of a virtual window, and the foregoing possible implementation manner is described, where fig. 8 is a second schematic diagram of determining a first included angle between a target virtual object and a determination area according to a second embodiment of the present application.
As shown in fig. 8, the virtual window 701, the target virtual object 702, and the determination area 706 corresponding to the virtual window 701 are included. A ray 703 is issued in the opposite direction of the target virtual object 702 to the decision region 706, and a normal vector 801 perpendicular to the decision region 706 is drawn at the intersection of the ray 703 and the decision region 706. The angle 802 between normal vector 801 and ray 703 is determined as the first angle between target virtual object 702 and decision region 706.
In this embodiment, only the implementation manner of determining the first angle between the target virtual object and the determination area is described as an example, but the implementation manner of determining the first angle between the target virtual object and the determination area may be set according to actual requirements.
It should be noted that, for the above two methods for determining the first included angles, the preset angle thresholds corresponding to the first included angles may be the same or different. The preset angle threshold value corresponding to each first included angle needs to be determined according to actual conditions.
Optionally, whether the positional relationship between the center of gravity central axis of the target virtual object and the determination area meets the first preset condition is determined.
Optionally, the first preset condition includes any one of a center of gravity axis of the target virtual object being located between a first left edge longitudinal axis and a first right edge longitudinal axis corresponding to the determination region, a center of gravity axis being located to the left of the first left edge longitudinal axis and a distance from the first left edge longitudinal axis being less than a preset distance threshold, and a center of gravity axis being located to the right of the first right edge longitudinal axis and a distance from the first right edge longitudinal axis being less than a preset distance threshold.
In the following, taking a visual channel as a virtual window as an example, a first preset condition is met by a positional relationship between a center of gravity axis of a target virtual object and a determination area, which is illustrated in fig. 9, a first schematic diagram of a first preset condition is met by a positional relationship between a center of gravity axis of a target virtual object and a determination area, which is provided in a second embodiment of the present application, and fig. 10, a second schematic diagram of a first preset condition is met by a positional relationship between a center of gravity axis of a target virtual object and a determination area, which is provided in a second embodiment of the present application.
As shown in fig. 9, a virtual window 701, a target virtual object 702, a decision region 706 corresponding to the virtual window 701, a first left edge longitudinal axis 901 of the decision region 706, and a first right edge longitudinal axis 902 of the decision region 706. Center of gravity central axis 903 of target virtual object 702 is shifted to the left, and center of gravity central axis 903 of target virtual object is located between the first left edge longitudinal axis and the first right edge longitudinal axis corresponding to the determination region when center of gravity central axis 903 is shifted to wall 904 opposite to target virtual object 702.
As shown in fig. 10, the center of gravity central axis 905 of the target virtual object 702 is shifted to the left, and when the center of gravity central axis 905 is shifted to the wall 904 opposite to the target virtual object 702, the center of gravity central axis 905 of the target virtual object is located at the left of the first left edge longitudinal axis corresponding to the determination area, and the center of gravity central axis 905 of the target virtual object is located at the first distance 906 from the first left edge longitudinal axis. When the first distance is smaller than a preset distance threshold, the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
In this embodiment, in response to the panning action performed by the target virtual object, in the target virtual object orientation determination area, and under the condition that the position relation between the center of gravity central axis of the target virtual object and the judging area accords with 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. For example, taking a visual channel as a virtual window, in response to a step of performing a step of turning over the target virtual object, when it is determined that the target virtual object is oriented to the determination area and a positional relationship between a center of gravity axis of the target virtual object and the determination area meets a first preset condition, the target virtual object is controlled to turn over (or pass through) from one side of the virtual window to the other side of the virtual window.
The virtual object control method includes displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, the visual channel is used for enabling the target virtual object to pass through one side of the visual channel and reach the other side of the visual channel, the visual channel corresponds to a judging area, the judging area surrounds the periphery of the visual channel, and under the condition that the target virtual object faces the judging area and the position relation between the center axis of gravity of the target virtual object and the judging area accords with a 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 in response to the crossing action executed by the target virtual object. By setting the corresponding judging area for the visual channel, the judging area surrounds the whole visual channel, namely, the area coverage of the judging area is larger than that of the visual channel, and compared with the area coverage of the visual channel, a user can control the virtual object to enter into the area coverage of the judging area more easily. Therefore, when the target virtual object faces the judging area and the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition, the target virtual object can be successfully controlled to pass through one side of the visual channel to reach the other side of the visual channel in response to the crossing action executed by the target virtual object. The method greatly 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, avoids the problem that the user needs to precisely control the target virtual object to move into the cell because the area range opposite to the virtual window is smaller, otherwise, the user is very easy to control the virtual object to execute other misoperation, and improves the user experience.
Optionally, in response to a scrolling action performed by the target virtual object, in the target virtual object towards the decision area, and under the condition that the center of gravity central axis of the target virtual object is positioned between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel, the control target virtual object passes through one side of the visual channel and reaches the other side of the visual channel.
Next, taking the visual channel as a virtual window as an example, referring to fig. 11 and a specific example, a schematic diagram of a positional relationship between a center of gravity axis of a target virtual object and the visual channel according to a second embodiment of the present application is shown in fig. 11, where fig. 11 is a schematic diagram of a positional relationship between a center of gravity axis of a target virtual object and the visual channel according to a second embodiment of the present application.
As shown in fig. 11, 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. (in order to distinguish the left edge longitudinal axis of the virtual window from the left edge longitudinal axis of the determination zone, the left edge longitudinal axis of the determination zone is referred to as a first left edge longitudinal axis, and the left edge longitudinal axis of the virtual window is referred to as a second left edge longitudinal axis). The center of gravity central axis 1103 of the target virtual object 702 is shifted leftward, and when the center of gravity central axis 1103 is shifted onto the wall 904 opposite to the target virtual object 702, the center of gravity central 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 region.
Optionally, in response to a scrolling action performed by the target virtual object, in the target virtual object towards the decision area, and under the condition that the position relation between the center of gravity central axis of the target virtual object and the judging area and the visual channel accords with a second 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.
Optionally, the second preset condition includes any one of a center of gravity axis being located between the first left edge longitudinal axis and the second left edge longitudinal axis, and a center of gravity axis being located between the first right edge longitudinal axis and the second right edge longitudinal axis.
Next, taking the visual channel as a virtual window as an example, referring to fig. 12 and a specific example, a schematic diagram of a positional relationship between the center of gravity axis of the target virtual object and the determination area and the visual channel according to the second embodiment of the present application is shown in fig. 12, and a schematic diagram of a positional relationship between the center of gravity axis of the target virtual object and the determination area and the visual channel according to the second embodiment of the present application is shown in fig. 12.
As shown in fig. 12, comprising 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 decision region 706, and a first right edge longitudinal axis 902 of the decision region 706. Center of gravity central axis 1201 of target virtual object 702 is translated to the left, and center of gravity central axis 1201 of target virtual object 702 is positioned between first left edge longitudinal axis 901 corresponding to the determination region and second left edge longitudinal axis 1101 corresponding to virtual window 701 when center of gravity central axis 1201 is translated to wall 904 opposite target virtual object 702.
Optionally, a first virtual obstacle is included in the visual channel. Wherein the first virtual obstacle may be breached.
Alternatively, the step of controlling the target virtual object to traverse the visual channel may comprise controlling the target virtual object to break the first virtual obstacle and to cross the visual channel.
For example, taking a visual channel as a virtual window, the first virtual obstacle may be a glass that can be broken, and 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.
Optionally, in response to the step of performing the step of moving over by the target virtual object, the target virtual object is controlled to climb the second virtual obstacle in a case where the target virtual object is not oriented to the determination area, the center of gravity central axis is located to the left of the first left edge longitudinal axis or the center of gravity central axis is located to the right of the first right edge longitudinal axis.
Optionally, in response to the step of performing the step of traversing the target virtual object, in the direction of the target virtual object toward the determination area, a distance between the target virtual object and the determination area is less than a third distance threshold, and under the condition that the position relation between the center of gravity central axis of the target virtual object and the judging area accords with 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.
The distance between the target virtual object and the determination area refers to a linear distance between the target virtual object and the determination area.
Optionally, when the positional relationship between the center of gravity central axis of the target virtual object and the determination area meets a first preset condition, or the positional relationship between the center of gravity central axis of the target virtual object and the determination area and the visual channel meets a second preset condition, a prompt identifier is displayed in the virtual scene, and the prompt identifier is used for prompting to execute the step-over action. When the user sees the indication mark, the user can clearly know that the position of the target virtual object controlled by the user accords with the position condition of the visual channel.
In addition, compared with the prior art, a small part of the area in the direction opposite to the visual channel is used as the effective crossing range of the visual channel, the judging area in the scheme comprises the area occupied by the visual channel and the areas extending for preset distances towards the peripheral directions of the visual channel, so that the problem that the game application program misjudges the behavior of the target virtual object when the target virtual object is controlled to enter the effective crossing range corresponding to the visual channel is solved, the accuracy of the user to control the target virtual object to cross the visual channel is improved, the efficiency of human-computer interaction is improved, and compared with the prior art, the judgment area in the scheme comprises the area occupied by the visual channel and the area extending for preset distances towards the peripheral directions of the visual channel, and the game application program can greatly improve the possibility of successfully controlling the target virtual object by the user, improve the target virtual object and improve the user experience. Especially, in the fight of the tension of the virtual game, the user does not reach to control the target virtual object to the area occupied by the visual channel, and the user controls the target virtual object to execute the skip action in a panic manner in the vicinity area of the area occupied by the visual channel, so that the possibility that the user controls the target virtual object to successfully skip the visual channel is greatly improved, the evasion fluency of the virtual object is improved, and the game experience of the user is improved.
Next, with reference to fig. 13 and a specific embodiment, taking a visual channel as a virtual window as an example, a control method of a virtual object provided by the present application is further described, and fig. 13 is a schematic diagram of a process of a target virtual object crossing the visual channel provided by the second embodiment of the present application.
As shown in fig. 13, three interfaces (a), (b), and (c) are included. In fig. 13, a determination region 1301 is a determination region corresponding to a virtual window 1302 within a virtual room 1300 (wherein the determination region 1301 is invisible to a user). The visual channel that the target virtual object 702 is to cross is the virtual window 1302, as shown in interface (a) in fig. 13, with the target virtual object 702 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 along the direction indicated by the arrow 1304, when moving to the position 1306, the terminal detects that the center axis 1308 of the center of gravity of the target virtual object is located in the determination area 1301 corresponding to the virtual window 1302, and then determines that the positional relationship between the position 1306 where the target virtual object 702 is located and the determination area 1301 meets the first preset condition. As shown in interface (b) of fig. 13, a prompt sign 1307 with a "window-flipable" is displayed near the virtual window 1302. Therefore, after the terminal detects that the condition that the target virtual object orientation determination area is satisfied and that the positional relationship between the center axis of gravity of the target virtual object and the determination area meets the first preset condition is met, as shown in an interface (b) in fig. 13, the terminal responds to the user to trigger the scroll control 1308 to control the target virtual object to scroll, as shown in an interface (c) in fig. 13, the terminal displays a screen that the target virtual object scrolls across the virtual window, that is, the target virtual object 702 scrolls from the inside of the virtual room 1300 to the other side of the virtual window 1302 from the side of the virtual window 1302, and reaches the outside of the virtual room 1300.
Fig. 14 is a schematic structural diagram of a control method device for a virtual object according to a third embodiment of the present application. As shown in fig. 14, the apparatus includes a display module 1401 and a control module 1402.
The display module 1401 is configured to display a virtual scene, where the virtual scene includes at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, and the visual channel is used for the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel, where the visual channel corresponds to a determination area, and the determination area is enclosed on the periphery of the visual channel;
A control module 1402, configured to respond to a scrolling action performed by the target virtual object, when the target virtual object is facing the determination area, and under the condition that the position relation between the center of gravity central axis of the target virtual object and the judging area accords with 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.
Optionally, the first preset condition includes any one of a center of gravity axis of the target virtual object being located between a first left edge longitudinal axis and a first right edge longitudinal axis corresponding to the determination region, the center of gravity axis being located to the left of the first left edge longitudinal axis and a distance from the first left edge longitudinal axis being less than a preset distance threshold, the center of gravity axis being located to the right of the first right edge longitudinal axis and a distance from the first right edge longitudinal axis being less than a preset distance threshold.
Optionally, the control module 1402 is further configured to:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the center of gravity central axis of the target virtual object is positioned between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel.
Optionally, the control module 1402 is further configured to:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object, the judging area and the visual channel meets a second preset condition.
Optionally, the second preset condition includes any one of the center of gravity axis being located between the first left edge longitudinal axis and the second left edge longitudinal axis, the center of gravity axis being located between the first right edge longitudinal axis and the second right edge longitudinal axis.
Optionally, a first virtual obstacle is included in the visual channel, and the first virtual obstacle can be broken;
the control module 1402 is further configured to:
and controlling the target virtual object to break the first virtual barrier and cross the visual channel.
Optionally, the current user adjusts the position of the mouse pointer in the virtual scene by moving the mouse so as to control the orientation of the target virtual object;
The target virtual object facing the determination area includes:
The mouse pointer being located within the decision region, or
And the included angle between the target virtual object and the judging area is smaller than a preset angle threshold value.
Optionally, the periphery of the visual channel includes a second virtual barrier, the second virtual barrier being non-breakable;
the control module 1402 is further configured to:
and in response to the step of performing the step of traversing the target virtual object, controlling the target virtual object to climb the second virtual obstacle when the target virtual object is not oriented to the determination area and the center of gravity axis is located on the left side of the first left edge longitudinal axis or the center of gravity axis is located on the right side of the first right edge longitudinal axis.
Optionally, the control module 1402 is further configured to:
And responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area, the distance between the target virtual object and the judging area is smaller than a third distance threshold value and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
Optionally, the control module 1402 is further configured to:
And displaying a prompt identifier in the virtual scene under the condition that the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition or the position relationship between the center of gravity central axis of the target virtual object and the judging area and the visual channel accords with the second preset condition, wherein the prompt identifier is used for prompting to execute the overturning action.
Optionally, the visual channel is a virtual door, and the judging area corresponding to the visual channel comprises a virtual door frame, or
The visual channel is a virtual window, and the judging area corresponding to the visual channel comprises a virtual window frame.
The control device for the virtual object provided in this embodiment may be used to execute the technical solution of the control method embodiment for the virtual object, and its implementation principle and technical effect are similar, and this embodiment is not repeated here.
Fig. 15 is a schematic diagram of a hardware structure of an electronic device according to a fourth embodiment of the present application, and as shown in fig. 15, an electronic device 1500 of the present embodiment includes a processor 1501 and a memory 1502, wherein
A memory 1502 for storing computer-executable instructions;
A processor 1501 for executing computer-executable instructions stored in a memory to implement the steps performed by the control method of a virtual object in the above embodiments. See in particular the description of the control method embodiments of the virtual object described above.
Alternatively, the memory 1502 may be separate or integrated with the processor 1501.
When the memory 1502 is provided separately, the electronic device further comprises a bus 1503 for connecting said memory 1502 and the processor 1501.
The fifth embodiment of the present application also provides a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement a method of controlling a virtual object executed by an electronic device as above.
The sixth embodiment of the application also provides a computer program product, the program product comprising a computer program stored in a readable storage medium, from which the computer program can be read by at least one processor of an electronic device, the at least one processor executing the computer program to cause the electronic device to execute the solution provided by any embodiment of the control method of a virtual object described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application.
It should be understood that the above Processor may be a central processing module (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, a digital signal Processor (english: DIGITAL SIGNAL Processor, abbreviated as DSP), an Application-specific integrated Circuit (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the various method embodiments described above may be implemented by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs the steps comprising the method embodiments described above, and the storage medium described above includes various media capable of storing program code, such as ROM, RAM, magnetic or optical disk.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present application.

Claims (13)

1. A method for controlling a virtual object, the method comprising:
Displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, and the visual channel is used for the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel;
Responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition;
The first preset condition comprises any one of that the center of gravity central axis of the target virtual object is located between a first left edge longitudinal axis and a first right edge longitudinal axis which correspond to the judging area, the center of gravity central axis is located on the left side of the first left edge longitudinal axis and the distance between the center of gravity central axis and the first left edge longitudinal axis is smaller than a preset distance threshold, and the center of gravity central axis is located on the right side of the first right edge longitudinal axis and the distance between the center of gravity central axis and the first right edge longitudinal axis is smaller than a preset distance threshold.
2. The method according to claim 1, wherein the method further comprises:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the center of gravity central axis of the target virtual object is positioned between the second left edge longitudinal axis and the second right edge longitudinal axis corresponding to the visual channel.
3. The method according to claim 2, wherein the method further comprises:
and responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relation between the center of gravity central axis of the target virtual object, the judging area and the visual channel meets a second preset condition.
4. The method of claim 3, wherein the second predetermined condition includes any one of the center of gravity axis being located between the first left edge longitudinal axis and the second left edge longitudinal axis and the center of gravity axis being located between the first right edge longitudinal axis and the second right edge longitudinal axis.
5. The method of any one of claims 1-4, wherein a first virtual barrier is included in the visual channel, the first virtual barrier being breakable;
the controlling the target virtual object to pass through the visual channel includes:
and controlling the target virtual object to break the first virtual barrier and cross the visual channel.
6. The method of any of claims 1-4, wherein the current user adjusts the position of a mouse pointer in the virtual scene by moving a mouse to control the orientation of the target virtual object;
The target virtual object facing the determination area includes:
The mouse pointer being located within the decision region, or
And the included angle between the target virtual object and the judging area is smaller than a preset angle threshold value.
7. The method of claim 1, wherein a periphery of the visual channel comprises a second virtual barrier, the second virtual barrier being non-breakable;
The method further comprises the steps of:
and in response to the step of performing the step of traversing the target virtual object, controlling the target virtual object to climb the second virtual obstacle when the target virtual object is not oriented to the determination area and the center of gravity axis is located on the left side of the first left edge longitudinal axis or the center of gravity axis is located on the right side of the first right edge longitudinal axis.
8. The method according to claim 1, wherein the method further comprises:
And responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area, the distance between the target virtual object and the judging area is smaller than a third distance threshold value and the position relation between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition.
9. The method according to claim 1, wherein the method further comprises:
And displaying a prompt identifier in the virtual scene under the condition that the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with the first preset condition or the position relationship between the center of gravity central axis of the target virtual object and the judging area and the visual channel accords with the second preset condition, wherein the prompt identifier is used for prompting to execute the overturning action.
10. The method of claim 1, wherein the visual channel is a virtual door, and the decision area corresponding to the visual channel comprises a virtual door frame, or
The visual channel is a virtual window, and the judging area corresponding to the visual channel comprises a virtual window frame.
11. A control apparatus for a virtual object, the apparatus comprising:
The display module is used for displaying a virtual scene, wherein the virtual scene comprises at least one target virtual object and at least one visual channel, the target virtual object is a virtual object controlled by a current user through a terminal, and the visual channel is used for the target virtual object to pass through from one side of the visual channel to reach the other side of the visual channel;
the control module is used for responding to the crossing action executed by the target virtual object, and controlling the target virtual object to pass through one side of the visual channel to reach the other side of the visual channel under the condition that the target virtual object faces the judging area and the position relationship between the center of gravity central axis of the target virtual object and the judging area accords with a first preset condition;
The first preset condition comprises any one of that the center of gravity central axis of the target virtual object is located between a first left edge longitudinal axis and a first right edge longitudinal axis which correspond to the judging area, the center of gravity central axis is located on the left side of the first left edge longitudinal axis and the distance between the center of gravity central axis and the first left edge longitudinal axis is smaller than a preset distance threshold, and the center of gravity central axis is located on the right side of the first right edge longitudinal axis and the distance between the center of gravity central axis and the first right edge longitudinal axis is smaller than a preset distance threshold.
12. An electronic device, comprising:
Processor, and
Memory for storing a data processing program, which, after powering on and running the program by means of said processor, performs the control method of a virtual object according to any one of claims 1-10.
13. A computer-readable storage medium, in which a data processing program is stored, the program being executed by a processor to perform the method of controlling a virtual object according to any one of claims 1-10.
CN202210723374.0A 2022-06-23 2022-06-23 A method, device and electronic device for controlling a virtual object Active CN115300909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210723374.0A CN115300909B (en) 2022-06-23 2022-06-23 A method, device and electronic device for controlling a virtual object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210723374.0A CN115300909B (en) 2022-06-23 2022-06-23 A method, device and electronic device for controlling a virtual object

Publications (2)

Publication Number Publication Date
CN115300909A CN115300909A (en) 2022-11-08
CN115300909B true CN115300909B (en) 2025-04-25

Family

ID=83854974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210723374.0A Active CN115300909B (en) 2022-06-23 2022-06-23 A method, device and electronic device for controlling a virtual object

Country Status (1)

Country Link
CN (1) CN115300909B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108635853A (en) * 2018-03-23 2018-10-12 腾讯科技(深圳)有限公司 The control method and device of object, storage medium, electronic device
CN110947174A (en) * 2019-11-27 2020-04-03 腾讯科技(深圳)有限公司 Method, device, storage medium and computer equipment for controlling virtual scene display

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108671545B (en) * 2018-05-24 2022-02-25 腾讯科技(深圳)有限公司 Method, device and storage medium for controlling interaction between virtual object and virtual scene
CN108744516B (en) * 2018-05-29 2020-09-29 腾讯科技(深圳)有限公司 Method and device for acquiring positioning information, storage medium and electronic device
CN111672102A (en) * 2020-06-05 2020-09-18 腾讯科技(深圳)有限公司 Virtual object control method, device, equipment and storage medium in virtual scene
CN113893546B (en) * 2021-09-30 2025-08-12 腾讯科技(深圳)有限公司 Object control method and device, storage medium and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108635853A (en) * 2018-03-23 2018-10-12 腾讯科技(深圳)有限公司 The control method and device of object, storage medium, electronic device
CN110947174A (en) * 2019-11-27 2020-04-03 腾讯科技(深圳)有限公司 Method, device, storage medium and computer equipment for controlling virtual scene display

Also Published As

Publication number Publication date
CN115300909A (en) 2022-11-08

Similar Documents

Publication Publication Date Title
JP7596010B2 (en) Method, apparatus and program for generating mark information in a virtual environment
US11613354B2 (en) Method and device for controlling flight, control terminal, flight system and processor
WO2023109328A1 (en) Game control method and apparatus
CN105607851A (en) Scene control method and device for touch terminal
US12361659B2 (en) Virtual scene display method and apparatus, device, storage medium, and program product
US20240278122A1 (en) Method and apparatus for constructing virtual scenario, and electronic device, medium and product
CN114307145B (en) Picture display method, device, terminal and storage medium
US9665232B2 (en) Information-processing device, storage medium, information-processing method, and information-processing system for enlarging or reducing an image displayed on a display device
US10599325B2 (en) Navigating virtual environments
CN108159692A (en) Information processing method, device, electronic equipment and storage medium
CN113041616A (en) Method and device for controlling jumping display in game, electronic equipment and storage medium
CN114053693B (en) Object control method, device and terminal equipment in virtual scene
CN115300909B (en) A method, device and electronic device for controlling a virtual object
JP2024522484A (en) Virtual scene-based graphic display method, device, equipment and computer program
CN116171187A (en) Optional indication of the presence of offscreen objects
CN115999153B (en) Virtual character control method, device, storage medium and terminal device
CN118161852A (en) Game control method, device, equipment and storage medium
WO2023226569A1 (en) Message processing method and apparatus in virtual scenario, and electronic device, computer-readable storage medium and computer program product
CN115661359A (en) Method, device, equipment and medium for generating air wall in virtual environment
CN115382211A (en) Control method and device for virtual object
CN117695648B (en) Virtual character movement and visual angle control method, device, electronic equipment and medium
CN115400420B (en) Game control method, device, storage medium and electronic device
CN115155060B (en) Methods, devices, terminal equipment, and storage media for controlling virtual characters in games
US7921382B2 (en) Method for smooth rotation
CN117942558A (en) Method and device for controlling display in game, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant