Virtual object control method and device, program product and electronic equipment
By setting up directional control logic under different perspectives in games such as shooting and MMORPGs, the problem of players losing their sense of direction after switching perspectives has been solved, improving the rationality of operation and the gaming experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-04-21
AI Technical Summary
In shooting and MMORPG games, unreasonable directional control logic from different perspectives can easily cause players to lose their sense of direction, leading to confusion and misoperations, which negatively impacts the gaming experience.
Different directional control logics are set for different perspectives. Touch operations are handled separately through the directional control logics in the first-person and second-person perspectives to adapt to the characteristics of each perspective and the player's operation needs, ensuring the rationality of directional control.
The rationality of directional control logic has been improved, reducing operational confusion and misoperation, thus enhancing the gaming experience.
Smart Images

Figure CN121891773A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of game technology, and more specifically, to a method, apparatus, program product, and electronic device for controlling virtual objects. Background Technology
[0002] In games such as shooting, MMORPGs (Massive Multiplayer Online Role-Playing Games), and naval battles, different perspective modes are typically available, such as a normal perspective and a shooting perspective in shooting games. However, in some games, the directional control logic under different perspectives is flawed, causing players to easily lose their sense of direction, leading to confusion, misoperations, and other issues that negatively impact the gaming experience. Summary of the Invention
[0003] This disclosure provides a method, apparatus, program product, and electronic device for controlling virtual objects, in order to at least partially solve the technical problem of unreasonable directional control logic in related technologies.
[0004] According to a first aspect of this disclosure, a method for controlling a virtual object is provided, the method being applied to a terminal, the terminal providing a graphical user interface (GUI) displaying a virtual scene and a first virtual object located in the virtual scene; the method comprising: when the virtual scene is presented from a first perspective, responding to a first touch operation acting on a mobile operation area, determining a first object control direction corresponding to the first touch operation based on first direction control logic; controlling the first virtual object to move and / or turn according to the first object control direction; switching the game screen presented in the GUI from the first perspective to a second perspective in response to satisfying a preset perspective switching condition; when the virtual scene is presented from the second perspective, responding to a second touch operation acting on the mobile operation area, determining a second object control direction corresponding to the second touch operation based on second direction control logic; controlling the first virtual object to move and / or turn according to the second object control direction.
[0005] According to a second aspect of this disclosure, a control device for a virtual object is provided. The device is configured on a terminal, the terminal providing a graphical user interface (GUI) displaying a virtual scene and a first virtual object located in the virtual scene. The device includes: a first direction determination module configured to, when the virtual scene is presented from a first perspective, determine a first object control direction corresponding to the first touch operation based on first direction control logic in response to a first touch operation applied to a movement operation area; a first control module configured to control the first virtual object to move and / or turn according to the first object control direction; a perspective switching module configured to, in response to satisfying a preset perspective switching condition, switch the game screen presented in the GUI from the first perspective to a second perspective; a second direction determination module configured to, when the virtual scene is presented from the second perspective, determine a second object control direction corresponding to the second touch operation based on second direction control logic in response to a second touch operation applied to the movement operation area; and a second control module configured to control the first virtual object to move and / or turn according to the second object control direction.
[0006] According to a third aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method of the first aspect described above and possible implementations thereof.
[0007] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of the first aspect and possible implementations thereof by executing the executable instructions.
[0008] The technical solution disclosed herein has the following beneficial effects: Different directional control logics are set for different perspectives to adapt to the characteristics of each perspective and the player's operation needs. This improves the rationality of the directional control logic, improves the problem of players losing their sense of direction during operation, especially after switching perspectives, reduces operation confusion and misoperation, and enhances the game experience. Attached Figure Description
[0009] Figure 1 A schematic diagram of a system architecture according to an embodiment of this disclosure is shown; Figure 2 A flowchart illustrating a method for controlling a virtual object according to an embodiment of this disclosure is shown. Figure 3 A schematic diagram of a game screen from a second perspective is shown in one embodiment of this disclosure. Figure 4A schematic diagram of a direction control area according to an embodiment of the present disclosure is shown; Figure 5 A schematic diagram of a control device for a virtual object according to an embodiment of the present disclosure is shown; Figure 6 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0010] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0011] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0012] In related technologies, there may be issues with illogical directional control logic under different game perspectives. For example, in a normal perspective, the game screen has a large field of view, allowing players relatively free control over the direction of virtual objects. When switching to a shooting perspective, the directional control logic of the normal perspective is usually retained. However, the shooting direction may not be consistent with the orientation of the virtual object, or the player may need to observe the target at close range. Since the operational requirements differ from those in the normal perspective, the directional control logic in the normal perspective can easily cause players to lose their sense of direction, leading to operational confusion, misoperations, and other issues that negatively impact the gaming experience.
[0013] In view of one or more of the above-mentioned problems, this disclosure provides a method for controlling virtual objects, aiming to solve the problem of unreasonable directional control logic from different perspectives in related technologies.
[0014] Figure 1A system architecture diagram of the operating environment of this embodiment is shown. This system architecture may include a terminal 110 and a server 120. The terminal 110 is a terminal device that has a game client program installed and running, such as a mobile phone, tablet computer, personal computer, smart wearable device, game console, etc. It has a display function and can display a graphical user interface, which may include the operating system interface or the application interface. In one embodiment, the terminal 110 includes a touch component, such as a touch screen or touchpad, for touch operation. The server 120 refers to the backend system providing the game service in this exemplary embodiment; it can be a single server or a cluster of multiple servers. A game server program is deployed on the server 120 to perform server-side game data processing. The terminal 110 and the server 120 can be connected via a wired or wireless communication link for data transmission.
[0015] In one implementation, the above method can be implemented and executed based on a cloud interaction system. The cloud interaction system can be based on the aforementioned system architecture. Various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program's execution and the game screen presentation are separated. The storage and execution of in-game control and interaction methods are completed on the cloud gaming server (such as the aforementioned server 120). The cloud gaming client (such as the aforementioned terminal 110) handles data reception, transmission, and game screen presentation. For example, the cloud gaming client can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; while the cloud gaming server in the cloud performs information processing. When playing or editing, the player operates the cloud gaming client to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the cloud gaming client via the network, and finally decodes and outputs the game screen through the cloud gaming client.
[0016] The game control method in this embodiment can be executed by any one or more of the terminal 110 and the server 120.
[0017] In one implementation, the flow reference of the game control method is as follows: Figure 2 As shown, it includes the following steps: S210, when presenting a virtual scene from a first-person perspective, responding to a first touch operation applied to the mobile operation area, the first object control direction corresponding to the first touch operation is determined based on the first direction control logic; S220, control the movement and / or turning of the first virtual object according to the first object control direction; S230, in response to meeting preset view switching conditions, switches the game screen presented in the graphical user interface from a first-person perspective to a second-person perspective; S240, when presenting a virtual scene from a second perspective, responding to a second touch operation applied to the mobile operation area, the second object control direction corresponding to the second touch operation is determined based on the second direction control logic; S250, control the movement and / or turning of the first virtual object according to the second object control direction.
[0018] based on Figure 2 The method involves setting different directional control logics for different perspectives to adapt to the characteristics of each perspective and the player's operational needs. This improves the rationality of the directional control logic, alleviates the problem of players losing their sense of direction during operation, especially after switching perspectives, reduces operational confusion and misoperation, and enhances the gaming experience.
[0019] The following describes, in conjunction with one or more embodiments and related accompanying drawings, [the following is a description of...]. Figure 2 Each step is explained in detail.
[0020] refer to Figure 2 In step S210, when the virtual scene is presented from a first perspective, in response to the first touch operation applied to the mobile operation area, the first object control direction corresponding to the first touch operation is determined based on the first direction control logic.
[0021] The terminal provides a graphical user interface (GUI) that displays a virtual scene and a first virtual object located within the virtual scene. This first virtual object is controlled by the terminal, meaning it is a virtual object controlled by the player. Additionally, the virtual scene may include other virtual objects, such as a second virtual object.
[0022] The game features at least two perspectives: a first-person perspective and a second-person perspective. These two perspectives differ in that the virtual camera's position and orientation differ between them. In one implementation, the first-person perspective is based on the entire first virtual object, and can be either a first-person view or a third-person view of the first virtual object. For example, if the first-person perspective is the first virtual object's view, the virtual camera can be positioned on the first virtual object, facing directly in front of it, and the frame may not include, or may only include, a small portion of, the first virtual object. If the third-person perspective is the first-person perspective, the virtual camera can be positioned outside the first virtual object, and its field of view includes, but is not entirely, part of, the first virtual object and its surrounding environment. In one implementation, in the first-person perspective, during overshoot caused by adjusting the perspective using perspective adjustment commands, the virtual camera and the first virtual object are not bound together; that is, they are controlled independently.
[0023] The movement control area is an interactive area used for controlling the movement or turning of the primary virtual object; it can be a virtual joystick within a touch component. From a first-person perspective, the player's actions within the movement control area constitute the primary touch operation.
[0024] In this embodiment, the directional control logic refers to the logic that converts the player's touch operation used to control direction into actual directional control commands. This can include a mapping relationship between the player's operation direction and the object's control direction. The first directional control logic is the directional control logic under a first-person perspective, which can match the characteristics of the first-person perspective and the player's operational needs, and may include a first directional mapping relationship. Based on the first directional control logic, the first object control direction corresponding to the first touch operation is determined; for example, the operation direction of the first touch operation can be mapped to the first object control direction according to the first directional mapping relationship.
[0025] Continue to refer to Figure 2 In step S220, the first virtual object is moved and / or turned according to the first object control direction.
[0026] For example, if the control direction of the first object matches the current orientation of the first virtual object, then the first virtual object is controlled to move only and not turn (the movement trajectory can be a straight line). If the control direction of the first object does not match the current orientation of the first virtual object, then the first virtual object is controlled to turn only and not move, or the first virtual object is controlled to move and turn (the movement trajectory can be an arc).
[0027] Continue to refer to Figure 2 In step S230, in response to the satisfaction of the preset view switching conditions, the game screen presented in the graphical user interface is switched from the first view to the second view.
[0028] The perspective switching condition is the condition that triggers the switch from a first-person perspective to a second-person perspective. In one implementation, the perspective switching condition includes, but is not limited to: detecting a first switching command, such as a player's trigger operation on the perspective switching control (e.g., clicking, long-pressing, etc.), which triggers the current game perspective to switch from the first-person perspective to the second-person perspective; or a player performing a specific skill release operation or a specific weapon attack operation, which requires the specific skill or weapon to be used in the second-person perspective, in which case the first switching command is generated based on the player's operation; detecting a specific game event, such as a specific plot event, a game mode switching event, encountering an enemy, entering a combat area, etc., in which case the game program can automatically trigger the switch of the game perspective.
[0029] In one implementation, a first virtual object is provided with one or more firing positions, and the second perspective is a perspective based on any one of these firing positions, which can be a first-person perspective or a third-person perspective of the firing position. For example, the first virtual object is a ship, and the ship is equipped with multiple cannons, each cannon being a firing position. The second perspective can be a first-person perspective or a third-person perspective of the cannon or its corresponding gunner. If the first-person perspective of the firing position is used as the second perspective, the virtual camera can be located at the firing position, facing directly in front of the firing position, and the image may not include or may only include a small portion of the firing position. If the third-person perspective of the firing position is used as the second perspective, the virtual camera can be located outside the firing position, and its shooting range includes the complete or partial firing position and the surrounding environment of the firing position (which may include the environment around the firing position in the first virtual object, or the environment outside the first virtual object).
[0030] In one implementation, in a first-view perspective, the virtual camera is moved and / or rotated in response to a first-view control operation. In a second-view perspective, the virtual camera is moved and / or rotated in response to a second-view control operation. The first-view and second-view control operations may differ in terms of operation method and range. For example, a player can freely rotate and move the virtual camera up and down using the first-view control operation, and can move and rotate the virtual camera along a predetermined track and move it up and down using the second-view control operation (moving the virtual camera up and down is equivalent to adjusting the virtual camera's offset relative to the predetermined track in the height direction).
[0031] In one implementation, the same virtual camera can be used to capture images from both a first-viewpoint and a second-viewpoint. For example, in the first-viewpoint, the first pose of the virtual camera is determined based on the position of a first virtual object, and the virtual camera is set up according to this first pose to capture the image from the first-viewpoint. In the second-viewpoint, the second pose of the virtual camera is determined based on the position of the shooting point, and the virtual camera is set up according to this second pose to capture the image from the second-viewpoint. When switching from the first-viewpoint to the second-viewpoint, the virtual camera is switched from the first pose to the second pose to achieve the image switching.
[0032] In one implementation, from a first perspective, a first virtual camera captures the game scene to form the image displayed in the graphical user interface. From a second perspective, a second virtual camera captures the game scene to form the image displayed in the graphical user interface. The first and second virtual cameras operate independently of each other. When switching from the first to the second perspective, the currently used virtual camera is switched from the first to the second virtual camera to achieve the image switching.
[0033] Continue to refer to Figure 2 In step S240, when the virtual scene is presented from a second perspective, in response to the second touch operation applied to the mobile operation area, the second object control direction corresponding to the second touch operation is determined based on the second direction control logic.
[0034] In a second-person perspective, player actions within the movement area constitute a second touch operation. The second-direction control logic is the directional control logic specific to the second-person perspective, tailored to the characteristics of the second viewpoint and player operational needs. This can include a second-direction mapping relationship. The second-direction control logic differs from the first-direction control logic. Based on the second-direction control logic, the corresponding second object control direction is determined; for example, the operation direction of the second touch operation can be mapped to the control direction of the second object based on the second-direction mapping relationship.
[0035] Continue to refer to Figure 2 In step S250, the first virtual object is moved and / or turned according to the second object control direction.
[0036] For example, if the control direction of the second object matches the current orientation of the first virtual object, then the first virtual object is controlled to move only and not turn (the movement trajectory can be a straight line). If the control direction of the second object does not match the current orientation of the first virtual object, then the first virtual object is controlled to turn only and not move, or the first virtual object is controlled to move and turn (the movement trajectory can be an arc).
[0037] In one implementation, a first object control direction corresponding to a first touch operation can be determined by a preset first direction mapping relationship; and a second object control direction corresponding to a second touch operation can be determined based on the current object orientation of the first virtual object.
[0038] In one implementation, a first coordinate system can be set for the mobile operation area. This first coordinate system is a two-dimensional coordinate system on the operation plane of the mobile operation area (such as the plane of a touchscreen). A second coordinate system can be set for the motion plane of the first virtual object (e.g., in a naval warfare game, the first virtual object travels on the sea surface, and the motion plane can be the sea surface). This second coordinate system can be the projection coordinate system of the camera coordinate system of the virtual camera onto the motion plane, or it can be the projection coordinate system of the reference coordinate system of the first virtual object itself onto the motion plane. The direction mapping relationship can include the transformation relationship between the first and second coordinate systems (which can mainly include rotation transformation relationships). Based on this transformation relationship, the operation direction of the first or second touch operation in the mobile operation area can be mapped to the object control direction on the motion plane, thereby controlling the first virtual object to move and / or turn.
[0039] The first direction mapping relationship can be a fixed direction mapping relationship, which does not change with the orientation of the first virtual object. That is, regardless of the object's orientation, the object control direction corresponding to each direction in the movement operation area is fixed. For example, the 0-point direction in the movement operation area always corresponds to the forward object control direction.
[0040] In the second-direction control logic, the current orientation of the first virtual object needs to be referenced to determine the second object control direction corresponding to the second touch operation. For example, the second-direction mapping relationship can be determined based on the current orientation of the first virtual object, and the second-direction control direction corresponding to the second touch operation can be determined based on the second-direction mapping relationship. The second-direction mapping relationship is a direction mapping relationship under the second perspective, characterized by its correspondence to the current orientation of the first virtual object. The current orientation of the first virtual object can be obtained in real time, and the second-direction mapping relationship can be determined based on this orientation, ensuring that the orientation at the time of creation is used as the reference when determining the second-direction mapping relationship. By distinguishing between the two different direction control logics, the first-direction control logic uses a fixed preset mapping relationship for parsing operations, while the second-direction control logic dynamically changes with the current orientation of the first virtual object. Each of the two direction control logics has its own characteristics, adapting to the characteristics of the first and second perspectives and the player's operational needs.
[0041] In one implementation, the method for controlling virtual objects further includes at least one of the following: When presenting a virtual scene from a first-person perspective, the view orientation of the game screen displayed by the graphical user interface is matched with the reference control direction in the first direction mapping relationship. When presenting a virtual scene from a first-person perspective, the control matches the orientation of the first virtual object with the reference control direction in the first direction mapping relationship.
[0042] In this context, the viewing angle refers to the positive direction of the field of view, which can be the optical axis direction of the virtual camera or the projection direction of that optical axis direction onto the motion plane of the first virtual object. The reference control direction is the direction in which the first virtual object moves forward in the first direction mapping relationship. In the first case, the viewing angle is matched with the reference control direction. In this case, the "front" of the first virtual object's forward movement is the viewing angle. Players can control the movement direction of the first virtual object by adjusting the orientation of the game screen. For example, when controlling the virtual object to move forward through the movement control area, dragging the screen to the right will cause the first virtual object to turn to the right. In the second case, the object's orientation is matched with the reference control direction. In this case, the "front" of the first virtual object's forward movement is its own orientation. When sliding in the movement control area, the movement direction of the first virtual object is adjusted in real time. For example, the first virtual object can be controlled to move towards the player outside the screen.
[0043] In one implementation, if the first perspective in the game is set to a camera perspective (or a third-person perspective), then corresponding to the first case described above, the view orientation matches the reference control direction. If the first perspective in the game is set to an object perspective (or a first-person perspective), then corresponding to the second case described above, the object orientation matches the reference control direction.
[0044] It should be understood that the game may only support one of the above camera view and object view. If only the camera view is supported, the view orientation will be matched with the reference control direction, but the object orientation will not be matched with the reference control direction.
[0045] In one implementation, the coordinate system of the movement operation area is an initial coordinate system. That is, the first coordinate system is determined by the initial direction reference within the movement operation area and does not change with the movement state of the first virtual object or the change in viewing angle. For example, in the first coordinate system, the X-axis is fixed at the width direction of the touchscreen, and the Y-axis is fixed at the height direction of the touchscreen. For instance, in a first viewing angle, the positive direction of the Y-axis in the first coordinate system (e.g., the upward direction in the screen height direction) is fixed as the reference operation direction, and this reference operation direction matches "forward," so that in the first viewing angle, regardless of how the viewing angle or the orientation of the first virtual object is adjusted, when the player drags the movement control area towards the top of the screen, they are controlling the first virtual object to move "forward."
[0046] In one implementation, determining the second object control direction corresponding to the second touch operation based on the current object orientation of the first virtual object includes at least one of the following: The orientation of the first virtual object within the mobile operation area is used as the reference operation direction. The control direction for the second object is determined based on the operation information of the second touch operation and the reference operation direction. The reference operation direction is used to control the first virtual object to move forward along its own orientation. For example, the terminal first obtains the current orientation of the first virtual object and sets the direction corresponding to that orientation within the mobile operation area as the reference operation direction (e.g., if the object's orientation is northeast, then the upper right direction within the mobile operation area is the reference operation direction). Then, the operation information of the second touch operation (including operation position or operation direction, e.g., the operation direction of the second touch operation is 30° to the right of the reference operation direction) is obtained. Based on the relative relationship between the operation information and the reference operation direction, the control direction for the second object is determined (e.g., 30° south of northeast). In an optional implementation, the method of obtaining the current object orientation of the first virtual object includes obtaining the operation direction initially applied to the movement operation area. For example, if it is necessary to control the movement of the first virtual object when there is no control of the movement control area, it is necessary to first apply an operation to the movement operation area to start the control of the first virtual object, and take the operation direction applied to the movement operation area at this time as the current object orientation of the first virtual object.
[0047] The reference operation direction of the mobile operation area is dynamically aligned with the object's orientation. The second object control direction is determined based on the operation information of the second touch operation and the dynamically aligned reference operation direction. Specifically, the terminal dynamically aligns the reference operation direction of the mobile operation area with the object's orientation. When the object's orientation changes, the reference operation direction deflects synchronously, always maintaining alignment with the object's orientation. For example, a coordinate system for the mobile control area is created, and one direction in this coordinate system is used as the reference operation direction, such as the positive direction of the Y-axis. After obtaining the current object orientation of the first virtual object, the coordinate system of the mobile control area is rotated so that the positive Y-axis is aligned with or nearly aligned with the object's orientation. This method allows for dynamic rotation and adjustment of the coordinate system of the mobile control area. It is important to note that although alignment with the current object orientation is performed each time the mobile operation area is accessed, this process is not always seamless.
[0048] The movement operation area is divided into multiple directional control areas based on the object's orientation or the operation direction relative to the movement area. The directional control area opposite to the object's orientation or operation direction is designated as the target directional control area. The control direction of the second object is determined based on the control direction corresponding to the directional control area where the second touch operation's operation information is located. These multiple directional control areas are used to implement different operation functions, such as controlling the first virtual object to move forward, decelerate, stop, or move backward, control the first virtual object to turn counter-clockwise (e.g., turn left), and control the first virtual object to turn clockwise (e.g., turn right). The movement operation area can be divided into multiple directional control areas (e.g., 4 or 8, depending on the game type and specific operation requirements) based on the object's orientation or the operation direction of the second touch operation. The area opposite to the object's orientation or operation direction is set as the target directional control area, which can be the directional control area controlling the first virtual object to move forward. The control direction of the second object is determined based on the control direction corresponding to the directional control area where the second touch operation is located. In this way, when the player drags the object within the interactive area or angle corresponding to the directional control area, the orientation of the first virtual object will not change, thus maintaining the stability of the operation.
[0049] The initial object control direction is adjusted based on the object orientation to obtain the second object control direction. For example, the terminal first parses the second touch operation based on the initial coordinate system to obtain the initial object control direction; then it calculates the direction offset based on the object orientation, such as the object orientation being 30° off from the forward direction (such as the positive Y-axis direction) in the initial coordinate system; the initial object control direction is adjusted according to this offset to obtain the second object control direction.
[0050] It should be noted that once an operation is performed on the movement control area, the second mapping relationship remains unchanged until the end of the operation. For example, if an operation on the movement control area is triggered when the ship is facing the 2 o'clock position, the mapping relationship established at this time with the 2 o'clock position as the reference operation direction will not change. For example, during the period when the player triggers the movement control area, the ship's orientation may change, or the ship's orientation may also change relatively by adjusting the view direction of the game screen. During this period, the 2 o'clock position of the ship's bow at the time of the initial operation on the movement joystick is used as the reference operation direction.
[0051] It should be noted that the orientation of the first virtual object mentioned above can be an absolute orientation or a relative orientation, such as the relative orientation with respect to the game screen. Therefore, during the process of adjusting the game view screen, the original 3 o'clock relative orientation may be changed to the 6 o'clock direction, and then the 6 o'clock direction will be used as the reference operation direction.
[0052] Other implementation methods are also subject to the foregoing description.
[0053] The above provides several methods for determining the control direction of the second object. In practical applications, any combination of one or more methods can be used to adapt to different types of games and the operating habits of corresponding player groups. Through the above implementation methods, it is possible to determine the second direction mapping relationship based on the current object orientation of the first virtual object. For example, the orientation can be used as the basic reference in the space corresponding to the movement control area, and the basic reference can be matched with the basic control direction. After receiving an operation applied to the movement control area, the relative relationship between the operation and the basic reference in the space can be obtained to determine the offset from the basic control direction (e.g., forward) in the game scene, thereby determining the final control direction.
[0054] In one implementation, the orientation of the object or the viewpoint can be matched with the reference operation direction or target direction control area of the movement operation area. For example, the reference operation direction can be determined in the movement operation area based on the object's orientation or the viewpoint, or the movement operation area can be divided into multiple direction control areas, with the area corresponding to the object's orientation or the viewpoint's direction being the target direction control area. For example, if the first virtual object is a ship, the orientation of the ship's bow can be used as the reference operation direction in the movement operation area. For instance, if the ship's bow is at the 2 o'clock position in the game scene, then the 2 o'clock position in the movement operation area can be used as the reference operation direction. The reference operation direction is then matched with the control to move along the ship's bow orientation. When the player drags along the 2 o'clock position in the movement operation area, the ship moves in the 2 o'clock direction. The difference between this method and the fixed reference operation direction is that, normally, the 0-point direction of the movement operation area (i.e., the positive Y-axis direction) is used as the reference operation direction. If this is matched with the control of moving along the bow of the ship, then when the bow of the ship is facing the 2 o'clock direction in the game scene, the player needs to drag the movement operation area along the 0-point direction to control the ship to move towards the 2 o'clock direction. If the movement operation area is dragged along the 2 o'clock direction, it may control the ship to move towards the 4 o'clock direction. Therefore, there will be a situation where the dragging direction and the ship's forward direction are not well matched.
[0055] In one implementation, the method for controlling virtual objects further includes the following steps: During the process of switching from the first perspective to the second perspective, if the first touch operation is performed continuously, the target motion state after the perspective switch is completed is determined based on the motion state of the first virtual object during the perspective switch. After switching to the second perspective, the movement of the first virtual object is controlled according to the target's motion state.
[0056] The perspective switching process can be instantaneous, and the motion state of the first virtual object during this process can be instantaneous. Alternatively, the perspective switching process can last for a period of time, and the motion state of the first virtual object during this process can be at any point in time, such as the motion state at the start of the switch or the motion state at the end of the switch. This motion state can include parameters such as motion direction and speed. The target motion state after the perspective switch is determined based on the motion state of the first virtual object during the perspective switch. This can be achieved by using the motion state during the perspective switch as the target motion state, or by adjusting the motion state during the perspective switch (such as fine-tuning the motion direction or reducing the motion speed). After switching to the second perspective, the movement of the first virtual object is controlled according to the target motion state, ensuring a certain continuity in the motion state of the first virtual object before and after the perspective switch. This guarantees a smooth transition between the two perspectives, preventing abrupt changes in the motion state of the first virtual object due to perspective switching, which could cause confusion in player perception and operation, and improving the smoothness of game control.
[0057] In one implementation, determining the target motion state after the switch is completed based on the state of the first virtual object during the switching process includes the following steps: Determine the object orientation of the first virtual object when switching from a first-person perspective to a second-person perspective; The direction of movement of the first virtual object is determined based on the object's orientation when the virtual scene is presented from a second perspective.
[0058] That is, after the perspective is switched, the first virtual object moves along its original orientation. This further ensures the consistency of direction before and after the perspective switch, avoiding sudden turning due to perspective changes, allowing the player to continue controlling the first virtual object according to the operation intention before the perspective switch, further improving the smoothness of movement and the continuity of operation. In this embodiment, the first virtual object is in a turning state in the first perspective, for example, turning clockwise, that is, rotating by changing the orientation of the first virtual object. During the turning process, the perspective is switched from the first perspective to the second perspective. At this time, the rotation stops in the second perspective, and instead moves towards the object's orientation at a specific moment before or after the perspective switch.
[0059] In other implementations, the rotation can continue in the direction it was in before the viewpoint switch.
[0060] In one implementation, the method for controlling virtual objects further includes the following steps: After switching from the first perspective to the second perspective, if the first touch operation is maintained, the control direction of the third object corresponding to the first touch operation is determined according to the third-party control logic. The movement and / or turning of the first virtual object is controlled by the direction of the third object.
[0061] If the player performs a first touch operation before the viewpoint switch, and this first touch operation continues during the viewpoint switch, then after the viewpoint switch, the control direction of the third object corresponding to the first touch operation can be determined according to the third-direction control logic. This third-direction control logic can be the same as or different from the first or second-direction control logic. Therefore, for the same first touch operation, different directional control logics can be used before and after the viewpoint switch.
[0062] In one implementation, determining the third object control direction corresponding to the first touch operation based on the third-party control logic includes the following steps: The third-party mapping relationship is determined based on the operation direction corresponding to the first touch operation, and the control direction of the third object corresponding to the first touch operation is determined based on the third-party mapping relationship.
[0063] The third-direction mapping relationship can differ from the first and second-direction mapping relationships mentioned above. For example, after switching to the second perspective, if the player maintains the first touch operation, the operation direction corresponding to the first touch operation is obtained (e.g., the operation direction when starting to switch perspectives, the operation direction during perspective switching, and the operation direction when completing the perspective switch). This operation direction can be matched with the baseline control direction to determine the third-direction mapping relationship. Then, based on the third-direction mapping relationship, the third object control direction corresponding to the first touch operation is determined. For example, if the player's continuous first touch operation shifts compared to the operation direction at the time of perspective switching after switching to the second perspective, the target object control direction in the third-direction mapping relationship is shifted according to the shift value to obtain the current third object control direction. Then, the first virtual object is controlled to move and / or turn according to the third object control direction. By generating the third-direction mapping relationship based on the operation direction of the first touch operation in the above way, the consistency between the direction control logic before and after perspective switching and the player's operation intention is ensured, avoiding operation confusion before and after perspective switching, and further optimizing the operation experience after perspective switching.
[0064] In one implementation, determining the third object control direction corresponding to the first touch operation based on the third-party control logic includes at least one of the following steps: The reference operation direction of the mobile operation area is dynamically aligned with the operation direction of the first touch operation. The control direction of the third object is determined based on the operation information of the first touch operation and the dynamically aligned reference operation direction. Furthermore, the control direction of the third object is determined based on the relative relationship between the operation information and the aligned reference operation direction. It should be noted that once the reference operation direction of the mobile operation area is dynamically aligned with the operation direction of the first touch operation, this reference operation direction will not change with changes in the operation direction during the current continuous operation. Instead, the control direction for the first virtual object will be determined in real-time based on the reference operation direction and the changed operation direction.
[0065] The direction of the first touch operation within the mobile operation area is used as the reference operation direction for the mobile operation area. The control direction for the third object is determined based on the operation information of the first touch operation and the reference operation direction. Specifically, the operation direction of the first touch operation can be set as the reference operation direction for the mobile operation area, and the control direction for the third object can be determined based on the operation information and the offset of the reference operation direction.
[0066] The movement operation area is divided into multiple directional control areas according to the operation direction of the first touch operation. The directional control area opposite to the operation direction is determined as the target directional control area. The third object control direction is determined according to the control direction corresponding to the directional control area where the operation information of the first touch operation is located.
[0067] Specifically, the orientation of the first virtual object, or the orientation of the game screen in the second perspective, matches the reference operation direction or the target direction control area. For example, in the game screen in the second perspective, if the first virtual object is facing right, then the reference operation direction is directly right, or the target direction control area is the right-hand area of the movement operation area. If the orientation of the game screen in the second perspective is directly forward, then the reference operation direction is directly upward, or the target direction control area is the directly upward area of the movement operation area.
[0068] The above implementation method is illustrated by taking the example of matching the reference operation direction with the object orientation.
[0069] In the first-person perspective, the object is facing at the 3 o'clock position. While dragging the movement area at the 10 o'clock position to control the first virtual object's direction, when the first virtual object turns to the 2 o'clock position, the perspective is switched to the second-person perspective. Upon completion of the perspective switch, the dragging operation remains at the 10 o'clock position, and the first virtual object's orientation is now at the 1 o'clock position. This direction is then used as the reference direction. Since the reference direction matches the object's orientation, it controls the first virtual object to move in the direction the object is facing. Therefore, after the perspective switch, dragging at the 10 o'clock position in the movement area controls the first virtual object to move towards the 2 o'clock position.
[0070] In one implementation, indicators corresponding to the reference operation direction or target direction control area can also be displayed in the graphical user interface. For example, in the movement operation area, the reference operation direction can be displayed (e.g., an arrow pointing to the reference operation direction is shown), or the target direction control area can be highlighted (e.g., the target direction control area is highlighted to distinguish it from other direction control areas, or an arrow pointing to the target direction control area is shown). This allows the player to intuitively see the reference operation direction or target direction control area, which is typically the operation direction or operation area controlling the forward movement of the first virtual object, making it easier for the player to understand the current direction control logic.
[0071] In one implementation, in response to a target event, the display pose of an indicator is adjusted according to the target event to indicate the reference operation direction or the target direction control area. The target event is an event that can trigger a change in the reference operation direction or the target direction control area, such as a viewpoint rotation event. When a target event occurs, the display pose of the indicator is adjusted according to the target event, such as adjusting the pointing direction of an arrow so that the adjusted arrow points to the changed reference operation direction or the target direction control area. By dynamically displaying the indicator, players can grasp the directional control logic in real time, reducing the likelihood of losing their sense of direction.
[0072] In one implementation, switching the game screen presented in the graphical user interface from a first-person perspective to a second-person perspective includes the following steps: Obtain the reference position indicated by the preset position in the game screen from the first-person perspective, or the view orientation corresponding to the game screen from the first-person perspective; The target position of the virtual camera is determined according to the second positional relationship control, wherein the second positional relationship corresponds to the second viewpoint; The control moves the virtual camera to the target location, and determines the virtual camera's viewing angle when switching to the second view based on the reference position or viewing angle.
[0073] The reference position is the virtual scene location corresponding to a preset position (such as the center of the screen, a designated marker point, etc.) in the game screen from the first-person perspective. The viewing orientation corresponding to the game screen from the first-person perspective refers to the orientation of the virtual camera (i.e., the direction the field of view is pointing) in the first-person perspective. The second positional relationship is the positional rule of the virtual camera adapted to the second-person perspective, such as the relative positional relationship between the virtual camera and the first virtual object in the second-person perspective, or the positional change relationship of the virtual camera when switching from the first-person perspective to the second-person perspective. Based on the second positional relationship, the target position of the virtual camera in the second-person perspective can be determined. After switching to the second-person perspective, the virtual camera is moved to the target position, and the viewing orientation of the virtual camera in the second-person perspective is determined based on the reference position or the viewing orientation in the first-person perspective. For example, if the first virtual object has multiple second views located at different positions on the first virtual object, the orientation corresponding to the position closest to the reference position can be used as the viewing orientation in the second-person perspective. Or, if the first virtual object has multiple second views facing different directions, the orientation closest to the viewing orientation in the first-person perspective can be used as the viewing orientation of the virtual camera in the second-person perspective. It should be understood that when switching to the second-person perspective, the virtual camera is moved to the target location and adjusted to the view orientation under that second-person perspective. Afterwards, the player can further adjust the position or orientation of the virtual camera through operation.
[0074] By employing the above methods, the virtual camera is adjusted to a suitable position when the viewpoint is switched, which to a certain extent ensures the continuity of direction before and after the viewpoint switch and reduces the chance of players losing their sense of direction.
[0075] In one implementation, from a second perspective, without any view control operation (i.e., the player actively adjusting the virtual camera's view, such as through the view control area on the right side of the touchscreen), the relative positional relationship between the orientation of the first virtual object and the view orientation corresponding to the game screen remains unchanged. This relative positional relationship can refer to the angular deviation or directional correspondence between the orientation of the first virtual object and the view orientation of the game screen in the second perspective. Maintaining this relative positional relationship in the second perspective, if the first virtual object turns, the view orientation will turn synchronously with the first virtual object. This ensures that the view orientation follows the movement trend of the first virtual object, improving the stability and consistency of the view.
[0076] In one implementation, during the process of switching the game screen presented in the graphical user interface from a first-person perspective to a second-person perspective, if a first touch operation is continuously performed, then after switching to the second-person perspective, the movement of a first virtual object is controlled based on the continuously performed first touch operation. This continuously performed first touch operation can control only the movement of the first virtual object without changing its direction of movement; that is, it is not used to control steering. In other words, if the player continuously performs the first touch operation while switching perspectives, after the switch is complete, the first touch operation is always used to control the forward movement of the first virtual object, even if the player changes the direction of operation during the operation (such as changing the direction of dragging the virtual joystick), it will not produce a steering effect. This further avoids the player blindly turning before and after perspective switching, thus preventing a loss of direction and ensuring the continuous movement direction of the first virtual object.
[0077] In one implementation, during the process of switching the game screen presented in the graphical user interface from a first perspective to a second perspective, if the first touch operation is continuously performed, after switching to the second perspective, the reference operation direction for moving the operation area in this first touch operation can be determined based on the operation direction of the first touch operation (the operation direction at the start of the switch, during the switch, or at the end of the switch). After this first touch operation ends, the reference operation direction for moving the operation area is determined based on the object orientation of the first virtual object.
[0078] Figure 3 This diagram illustrates a game screen from a second-person perspective. In this second-person perspective, the game screen is presented with the firing point (e.g., artillery) on the first virtual object 310 as the reference. Only a small portion of the first virtual object 310 is displayed, with the focus on the firing target. The first virtual object 310 faces right in the game screen, and the right side of the movement control area 320 is determined based on this orientation. Dragging the movement control area 320 to the right controls the first virtual object 310 to move forward along its current orientation. Dragging the movement control area 320 upwards controls the first virtual object 310 to turn left, dragging it downwards controls it to turn right, and dragging it to the left controls it to slow down, stop, or move backwards.
[0079] In one implementation, the above-mentioned response to a first touch operation acting on a mobile operation area, determining the first object control direction corresponding to the first touch operation based on the first direction control logic, may include the following steps: In response to a first touch operation applied to a mobile operation area, a first object control direction is determined based on a first direction control logic and according to the operation direction of the first touch operation and the reference operation direction of the mobile operation area. From a second perspective, the movement operation area is divided into multiple directional control areas; in response to a second touch operation acting on the movement operation area, the second object control direction corresponding to the second touch operation is determined based on the second directional control logic, including: In response to a second touch operation applied to the moving operation area, a second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
[0080] In the first-person perspective, the movement operation area offers high precision. For example, even if the deviation between the first touch operation and the reference operation direction is very small (e.g., only 10°), the terminal can detect this deviation and control the first virtual object to turn. This matches the player's primary need to control the movement of the first virtual object in the first-person perspective.
[0081] In the second-person perspective, the movement control area is divided into multiple directional control areas. Different positions within each directional control area produce the same operational effect, thus reducing the overall precision of the movement control area. For example, in the second-person perspective, the movement control area is divided into four directional control areas, including a target direction control area for controlling the first virtual object's forward movement. The two directional control areas adjacent to the target direction control area are turning control areas, used to control the first virtual object to turn left and right, respectively. The last directional control area is a stop control area, used to control the first virtual object to decelerate, stop, or move backward. This mode of movement control area does not support very precise operations, but by reducing operational precision, it avoids excessive player input, meeting the operational needs of players in the second-person perspective.
[0082] In one implementation, from a first perspective, the movement operation area is divided into M directional control areas; from a second perspective, the movement operation area is divided into N directional control areas; M>N; the above-mentioned response to a first touch operation acting on the movement operation area, determining the first object control direction corresponding to the first touch operation based on the first directional control logic, includes: In response to a first touch operation applied to a mobile operation area, a first object control direction is determined based on a first direction control logic and the direction control area where the operation information of the first touch operation is located. The above-mentioned response to a second touch operation acting on a moving operation area, determining the second object control direction corresponding to the second touch operation based on the second direction control logic, includes: In response to a second touch operation applied to the moving operation area, a second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
[0083] For example, refer to Figure 4 As shown, M is 8 and N is 4. In the first-person perspective, the movement control area is divided into 8 directional control areas. The top directional control area is the target direction control area, used to control the first virtual object to move forward. The top left and top right directional control areas are used to control the first virtual object to turn or move to the left and to the right, respectively. The left and right directional control areas are used to control the first virtual object to turn or move to the left and to the right, respectively. The bottom left and bottom right directional control areas are used to control the first virtual object to turn or move to the left and to the right, respectively. The bottom directional control area is used to control the first virtual object to decelerate, stop, or move backward. In the second-person perspective, the movement control area is divided into 4 directional control areas, the function of which can be found above. It is evident that the first-person perspective has a higher precision in the division of the movement control area, resulting in higher operational precision and meeting the operational needs of the first-person perspective. The second-person perspective has a lower precision in the division of the movement control area, resulting in lower operational precision, preventing players from over-controlling the movement of the first virtual object.
[0084] In one implementation, from a first perspective, the movement and / or turning of a first virtual object is controlled according to a first object control direction and a first motion parameter; from a second perspective, the movement and / or turning of the first virtual object is controlled according to a second object control direction and a second motion parameter; wherein the first motion parameter is greater than the second motion parameter; and the display magnification of the game screen in the first perspective is less than that in the second perspective. For example, the first motion parameter includes a first movement speed and a first turning speed, and the second motion parameter includes a second movement speed and a second turning speed. The first motion parameter being greater than the second motion parameter can include at least one of the following: the first movement speed is greater than the second movement speed, and the first turning speed is greater than the second turning speed. Thus, from the first perspective, the player can control the first virtual object to move or turn at a faster speed to quickly reach the desired state. From the second perspective, because the display magnification of the game screen is increased, i.e., objects in the game screen are magnified, reducing the movement or turning speed of the first virtual object allows it to move or turn at a lower speed, avoiding violent screen movement or shaking when moving or turning excessively. This further adapts to the characteristics of different perspectives and the player's operational needs, optimizing the operational experience.
[0085] In one implementation, in response to switching the game screen presented in the graphical user interface from a first-person perspective to a second-person perspective, the movement speed of the first virtual object is reduced; the display magnification of the game screen in the first-person perspective is lower than that in the second-person perspective. That is, when switching game perspectives, the movement speed of the first virtual object is automatically adjusted so that the adjusted movement speed adapts to the characteristics of the second-person perspective and the player's operational needs, improving the ease and accuracy of operation in close-range perspectives such as shooting.
[0086] In one implementation, a maximum movement speed is set under a first view and a maximum movement speed is set under a second view, wherein the maximum movement speed under the second view is less than the maximum movement speed under the first view. In response to switching from the first view to the second view, the movement speed of the first virtual object under the first view can be proportionally reduced based on the ratio of the maximum movement speeds under the two views. Alternatively, if the movement speed of the first virtual object under the first view exceeds the maximum movement speed under the second view, the movement speed of the first virtual object is reduced to the maximum movement speed under the second view.
[0087] In one implementation, controlling the movement and / or turning of the first virtual object according to the first object control direction may include the following steps: The first virtual object is controlled to reduce its movement speed and change direction based on the first object's control direction.
[0088] That is, during the process of controlling the first virtual object to turn, the movement speed of the first virtual object can be reduced, and a combined deceleration and turning command can be executed. This can reduce the turning radius, making it easier for the player's first touch operation to control the first virtual object to accurately reach the target position. At the same time, it conforms to the real-world turning experience of vehicles, ships, airplanes, etc., ensuring the realism of the game logic.
[0089] In one implementation, controlling the first virtual object to reduce its movement speed and change direction based on the first object control direction includes the following steps: The steering amplitude is determined based on the direction controlled by the first object or based on the first touch operation; Determine the deceleration parameters based on the steering amplitude; The first virtual object is controlled according to the first object control direction to reduce its movement speed and turn by the deceleration parameter.
[0090] The first object control direction can be a steering angle, which itself represents the steering amplitude. Alternatively, the first object control direction can be the direction after steering, and the steering amplitude is determined based on the difference between the directions before and after steering of the first virtual object. For example, it can be the first object control direction minus the angle value of the direction before steering. The steering amplitude can also be determined based on the first touch operation, such as the deviation between the operation direction of the first touch operation and the reference operation direction. The angle value between the operation direction and the reference operation direction can be used as the steering amplitude, or the angle value can be mapped to the steering amplitude based on a preset mapping relationship.
[0091] The deceleration parameter can be determined based on the steering angle; generally, the larger the steering angle, the larger the deceleration parameter. For example, the deceleration parameter includes deceleration, and a positive correlation is configured between the steering angle and the deceleration. If the steering angle does not reach a steering threshold, the deceleration corresponding to the steering angle is determined based on the positive correlation; the deceleration is less than a preset upper limit value. If the steering angle reaches the steering threshold, the deceleration is determined to be the preset upper limit value. Here, the steering threshold represents the steering angle corresponding to the maximum deceleration parameter, such as 60°. The preset upper limit value is the maximum value of the deceleration. The steering threshold, preset upper limit value, etc., can be preset by the game developer or automatically set by the game program. If the steering angle is greater than or equal to the steering threshold, the deceleration is determined to be the preset upper limit value. If the steering angle is less than the steering threshold, the deceleration corresponding to the steering angle is determined based on a positive correlation (such as a linear function relationship).
[0092] Given a set deceleration parameter, the first virtual object is controlled to reduce its movement speed and turn accordingly. For example, the first virtual object can be controlled to reduce its movement speed and turn within a preset time period based on its control direction. The preset time period can be preset by the game developer or set by the game program, such as 1 second.
[0093] By employing the above methods, slight deceleration is ensured during small-angle turns, as well as sufficient deceleration during large-angle turns, balancing operational flexibility and stability, and improving control precision and feel.
[0094] In one implementation, controlling the first virtual object to reduce its movement speed and change direction based on the first object control direction includes the following steps: Control the first virtual object to reduce its movement speed; During and / or after reducing movement speed, the first virtual object is controlled to turn according to the first object control direction.
[0095] As can be seen from the above, the process of controlling the first virtual object to turn is essentially a superposition of two processes: deceleration and turning. This disclosure does not limit the timing relationship between these two processes. For example, deceleration and turning can be performed simultaneously. If the turning process is not completed when the deceleration process is finished, then the turning process continues. Alternatively, deceleration can be performed first, and turning can begin after the deceleration process is completed. Or, deceleration can be performed first, and turning can begin when the deceleration reaches a certain level (at which point the deceleration process is not yet finished).
[0096] In one implementation, during the first touch operation, if the first object control direction determined by the first touch operation changes, the first virtual object is controlled to reduce its movement speed and turn in real time according to the real-time first object control direction. Specifically, the real-time first object control direction can be determined based on the first touch operation within each unit of time (e.g., each frame or 1 second), and a real-time deceleration parameter can be calculated. The first virtual object is then controlled to decelerate and turn in real time based on the real-time first object control direction and the deceleration parameter.
[0097] The above explains that when controlling the first virtual object to turn via the first touch operation, a deceleration and steering control method can be adopted to improve the accuracy of operation.
[0098] Furthermore, in the second perspective, when controlling the first virtual object to turn via the second touch operation, a deceleration and turning control method can also be used. The relevant logic can refer to the content under the first touch operation. Different parameters can be set for the two perspectives, such as different turning thresholds, preset upper limits, preset durations, etc. This allows for more precise turning control in the second perspective. Of course, in the second perspective, the deceleration and turning control method can also be omitted; when controlling the first virtual object to turn via the second touch operation, the current movement speed can be maintained during the turning process. The specific method used can be determined based on the specific game type, player operation requirements, etc.
[0099] This disclosure also provides a control device for a virtual object. The device is configured on a terminal that provides a graphical user interface (GUI) displaying a virtual scene and a first virtual object located within the virtual scene. (Reference) Figure 5 As shown, the virtual object control device 700 includes: The first direction determination module 710 is configured to, in the case of presenting the virtual scene from a first perspective, respond to a first touch operation acting on the mobile operation area and determine the first object control direction corresponding to the first touch operation based on the first direction control logic. The first control module 720 is configured to control the movement and / or turning of the first virtual object according to the first object control direction; The perspective switching module 730 is configured to switch the game screen presented in the graphical user interface from the first perspective to the second perspective in response to the satisfaction of preset perspective switching conditions. The second direction determination module 740 is configured to, in the case of presenting the virtual scene from the second perspective, respond to a second touch operation acting on the mobile operation area and determine the second object control direction corresponding to the second touch operation based on the second direction control logic. The second control module 750 is configured to control the movement and / or turning of the first virtual object according to the control direction of the second object.
[0100] In one implementation, determining the first object control direction corresponding to the first touch operation based on the first direction control logic includes: The first object control direction corresponding to the first touch operation is determined by a preset first direction mapping relationship; The step of determining the second object control direction corresponding to the second touch operation based on the second direction control logic includes: The second object control direction corresponding to the second touch operation is determined based on the current object orientation of the first virtual object.
[0101] In one implementation, determining the second object control direction corresponding to the second touch operation based on the current object orientation of the first virtual object includes: A second direction mapping relationship is determined based on the current object orientation of the first virtual object, and a second object control direction corresponding to the second touch operation is determined based on the second direction mapping relationship.
[0102] In one embodiment, the device is further configured to be at least one of the following: When the virtual scene is presented from the first perspective, the viewpoint orientation of the game screen displayed by the graphical user interface is controlled to match the reference control direction in the first direction mapping relationship. When the virtual scene is presented from the first perspective, the control matches the object orientation of the first virtual object with the reference control direction in the first direction mapping relationship.
[0103] In one embodiment, the coordinate system of the moving operation area is the initial coordinate system.
[0104] In one implementation, determining the second object control direction corresponding to the second touch operation based on the current object orientation of the first virtual object includes at least one of the following: The direction of the first virtual object's orientation in the mobile operation area is taken as the reference operation direction in the mobile operation area, and the second object control direction is determined based on the operation information of the second touch operation and the reference operation direction. The reference operation direction of the mobile operation area is dynamically aligned with the object orientation, and the second object control direction is determined based on the operation information of the second touch operation and the dynamically aligned reference operation direction. The mobile operation area is divided into multiple direction control areas according to the object orientation or the operation direction for the mobile operation area. The direction control area opposite to the object orientation or the operation direction is determined as the target direction control area. The second object control direction is determined according to the control direction corresponding to the direction control area where the operation information of the second touch operation is located. The second object control direction is obtained by adjusting the initial object control direction corresponding to the operation information of the second touch operation based on the object orientation.
[0105] In one embodiment, the device is further configured to: The control aligns the object's orientation or the viewing angle with the reference operation direction or target direction control area of the movement operation area.
[0106] In one embodiment, the device is further configured to: During the process of switching from the first viewpoint to the second viewpoint, if the first touch operation is continuously performed, the target motion state after the viewpoint switch is completed is determined based on the motion state of the first virtual object during the viewpoint switching process. After switching to the second perspective, the movement of the first virtual object is controlled according to the target's motion state.
[0107] In one implementation, determining the target motion state after the switch is completed based on the state of the first virtual object during the switching process includes: Determine the first orientation of the first virtual object when switching from the first viewpoint to the second viewpoint; The direction of movement of the first virtual object when the virtual scene is presented through the second perspective is determined based on the first orientation.
[0108] In one embodiment, the device is further configured to: After switching from the first perspective to the second perspective, if the first touch operation is maintained, the control direction of the third object corresponding to the first touch operation is determined according to the third-party control logic. The first virtual object is moved and / or turned according to the direction of the third object control.
[0109] In one implementation, determining the third object control direction corresponding to the first touch operation based on third-party direction control logic includes: A third-party mapping relationship is determined based on the operation direction corresponding to the first touch operation, and a third object control direction corresponding to the first touch operation is determined based on the third-party mapping relationship.
[0110] In one implementation, determining the third object control direction corresponding to the first touch operation based on third-party direction control logic includes at least one of the following steps: The reference operation direction of the mobile operation area is dynamically aligned with the operation direction of the first touch operation, and the control direction of the third object is determined based on the operation information of the first touch operation and the dynamically aligned reference operation direction. The direction of the first touch operation is taken as the reference operation direction of the mobile operation area, and the third object control direction is determined according to the operation information of the first touch operation and the reference operation direction. The moving operation area is divided into multiple direction control areas according to the operation direction of the first touch operation. The direction control area opposite to the operation direction is determined as the target direction control area. The control direction of the third object is determined according to the control direction corresponding to the direction control area where the operation information of the first touch operation is located. The orientation of the first virtual object or the orientation of the game screen in the second perspective matches the reference operation direction or target direction control area.
[0111] In one embodiment, the device is further configured to: The graphical user interface displays an indicator corresponding to the reference operating direction or the target direction control area.
[0112] In one embodiment, the device is further configured to: In response to a target event, the display pose of the indicator is adjusted according to the target event to indicate the reference operating direction or the target direction control area.
[0113] In one implementation, switching the game screen presented in the graphical user interface from the first perspective to the second perspective includes: Obtain the reference position indicated by the preset position in the game screen under the first perspective or the view orientation corresponding to the game screen under the first perspective; The target position of the virtual camera is determined according to the second positional relationship, wherein the second positional relationship corresponds to the second viewpoint; The system controls the movement of the virtual camera to the target position, and determines the viewing orientation of the virtual camera when switching to the second viewing angle based on the reference position or the viewing orientation.
[0114] In one embodiment, the device is further configured to: In the second perspective, without any view control operation, the relative positional relationship between the object orientation of the first virtual object and the view orientation corresponding to the game screen remains unchanged.
[0115] In one embodiment, the device is further configured to: During the process of switching the game screen presented in the graphical user interface from the first perspective to the second perspective, if the first touch operation is continuously performed, then after switching to the second perspective, the first virtual object is controlled to move according to the continuously performed first touch operation.
[0116] In one implementation, after switching to the second perspective, the continued first touch operation does not change the movement direction of the first virtual object.
[0117] In one embodiment, the device is further configured to: During the first touch operation, the reference operation direction of the moving operation area is determined according to the operation direction of the first touch operation; After the first touch operation ends, the reference operation direction of the movement operation area is determined based on the object orientation of the first virtual object.
[0118] In one implementation, the step of determining a first object control direction corresponding to the first touch operation based on a first direction control logic in response to a first touch operation on a mobile operation area includes: In response to a first touch operation applied to a mobile operation area, the first object control direction is determined based on the first direction control logic and according to the operation direction of the first touch operation and the reference operation direction of the mobile operation area. From the second perspective, the movement operation area is divided into multiple direction control areas; the process of determining the second object control direction corresponding to the second touch operation based on the second direction control logic in response to a second touch operation on the movement operation area includes: In response to a second touch operation applied to the mobile operation area, the second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
[0119] In one implementation, from the first perspective, the mobile operation area is divided into M directional control areas; from the second perspective, the mobile operation area is divided into N directional control areas; M>N; the step of determining the first object control direction corresponding to the first touch operation based on the first directional control logic in response to a first touch operation acting on the mobile operation area includes: In response to a first touch operation applied to a mobile operation area, the first object control direction is determined based on the first direction control logic and the direction control area where the operation information of the first touch operation is located. The response to a second touch operation applied to the mobile operation area, determining a second object control direction corresponding to the second touch operation based on second direction control logic, includes: In response to a second touch operation applied to the mobile operation area, the second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
[0120] In one implementation, controlling the movement and / or turning of the first virtual object according to the first object control direction includes: From the first perspective, the first virtual object is moved and / or turned according to the first object control direction and the first motion parameters. The step of controlling the movement and / or turning of the first virtual object according to the second object control direction includes: From the second perspective, the first virtual object is moved and / or turned according to the second object control direction and the second motion parameters; Wherein, the first motion parameter is greater than the second motion parameter; the display magnification of the game screen in the first viewpoint is less than the display magnification of the game screen in the second viewpoint.
[0121] In one embodiment, the device is further configured to: In response to switching the game screen presented in the graphical user interface from the first perspective to the second perspective, the movement speed of the first virtual object is reduced; the display magnification of the game screen in the first perspective is less than the display magnification of the game screen in the second perspective.
[0122] In one implementation, controlling the movement and / or turning of the first virtual object according to the first object control direction includes: Based on the first object's control direction, the first virtual object is controlled to reduce its movement speed and change direction.
[0123] In one implementation, controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: The steering amplitude is determined based on the direction controlled by the first object or based on the first touch operation; Determine the deceleration parameters based on the steering amplitude; Based on the first object control direction, the first virtual object is controlled to reduce its movement speed and turn using the deceleration parameters.
[0124] In one embodiment, the deceleration parameter includes deceleration, and the steering angle is positively correlated with the deceleration; determining the deceleration parameter based on the steering angle includes: If the steering angle does not reach the steering threshold, the deceleration corresponding to the steering angle is determined according to the positive correlation; the deceleration is less than a preset upper limit value. If the steering amplitude reaches the steering threshold, then the deceleration is determined to be the preset upper limit value.
[0125] In one implementation, the deceleration parameter includes deceleration; the step of controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: Based on the first object control direction, the first virtual object is controlled to reduce its movement speed by the deceleration within a preset time period and to turn.
[0126] In one implementation, controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: Control the first virtual object to reduce its movement speed; During and / or after reducing movement speed, the first virtual object is controlled to turn according to the first object control direction.
[0127] In one implementation, controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: During the first touch operation, if the control direction of the first object determined by the first touch operation changes, the first virtual object is controlled to reduce its movement speed and turn in real time according to the real-time control direction of the first object.
[0128] In one implementation, the first perspective is a perspective based on the entire first virtual object; one or more shooting points are provided on the first virtual object, and the second perspective is a perspective based on any one of the shooting points.
[0129] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0130] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0131] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the methods described above.
[0132] In one implementation, the computer program product can be a tangible product, such as a computer-readable storage medium storing a computer program. The readable storage medium can be based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, and includes, but is not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0133] In one implementation, the computer program product can be an intangible product. For example, the computer program product can be a virtual digital product, such as an executable file or installation package containing a computer program.
[0134] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0135] Computer programs can be carried or transmitted via signals such as electrical, magnetic, optical, electromagnetic, and infrared rays. Electronic devices can convert the signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to be executed by the processor of the electronic device) the method steps of various embodiments of this disclosure, such as... Figure 2 The steps are shown.
[0136] Implementing the above methods and steps through computer programs has the following technical effects: setting different directional control logics under different perspectives to adapt to the characteristics of each perspective and the player's operation needs improves the rationality of directional control logic, improves the problem of players losing their sense of direction during operation, especially after switching perspectives, reduces operation confusion, misoperation and other situations, and enhances the game experience.
[0137] Exemplary embodiments of this disclosure also provide an electronic device. The electronic device includes a processor and a memory. The memory stores executable instructions for the processor, such as computer programs. The processor executes these executable instructions to perform the method steps of various exemplary embodiments of this disclosure.
[0138] The following is for reference. Figure 6 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 6 The electronic device 800 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0139] like Figure 6 As shown, the electronic device 800 may include: a processor 810, a memory 820, a bus 830, an I / O (input / output) interface 840, and a network adapter 850.
[0140] The memory 820 may include volatile memory, such as RAM 821 and cache unit 822, and may also include non-volatile memory, such as ROM 823. The memory 820 may also include one or more program modules 824, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 824 may include the modules described above.
[0141] The processor 810 may include one or more processing units, such as an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit).
[0142] The processor 810 can be used to execute executable instructions stored in the memory 820 to perform method steps of various embodiments of this disclosure, such as... Figure 2 The steps are shown.
[0143] By executing the above method steps through processor 810, the following technical effects are achieved: different directional control logic is set under different perspectives to adapt to the characteristics of each perspective and the player's operation needs, thereby improving the rationality of the directional control logic, improving the problem of players losing their sense of direction during operation, especially after switching perspectives, reducing operation confusion, misoperation and other situations, and enhancing the game experience.
[0144] Bus 830 is used to connect different areas of electronic device 800 and may include a data bus, an address bus and a control bus.
[0145] Electronic device 800 can communicate with one or more external devices 900 (such as keyboard, mouse, external controller, etc.) through I / O interface 840.
[0146] Electronic device 800 can communicate with one or more networks via network adapter 850. For example, network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 850 can communicate with other modules of electronic device 800 via bus 830.
[0147] In one embodiment, the electronic device 800 further includes a display for displaying a graphical user interface.
[0148] although Figure 6As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.
[0149] As can be seen from the above, the technical solutions disclosed herein can be implemented as methods, apparatus, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be referred to as "circuit," "module," or "system," respectively.
[0150] It should be understood that this disclosure is not limited to the specific methods, steps, or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Those skilled in the art will readily conceive of other embodiments based on the specific implementations provided in this disclosure. Therefore, the specific implementations provided in this disclosure are merely exemplary, and the scope and spirit of this disclosure are indicated by the claims, and should cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary technical means in the art not disclosed in this disclosure.
Claims
1. A method for controlling a virtual object, characterized in that, The method is applied to a terminal that provides a graphical user interface (GUI) displaying a virtual scene and a first virtual object located within the virtual scene; the method includes: When the virtual scene is presented from a first-person perspective, in response to a first touch operation applied to the mobile operation area, the first object control direction corresponding to the first touch operation is determined based on the first direction control logic; Control the movement and / or turning of the first virtual object according to the control direction of the first object; In response to the fulfillment of preset perspective switching conditions, the game screen presented in the graphical user interface is switched from the first perspective to the second perspective; When the virtual scene is presented from the second perspective, in response to the second touch operation applied to the mobile operation area, the second object control direction corresponding to the second touch operation is determined based on the second direction control logic; The first virtual object is moved and / or turned according to the direction of the second object control.
2. The method according to claim 1, characterized in that, The step of determining the first object control direction corresponding to the first touch operation based on the first direction control logic includes: The first object control direction corresponding to the first touch operation is determined by a preset first direction mapping relationship; The step of determining the second object control direction corresponding to the second touch operation based on the second direction control logic includes: The second object control direction corresponding to the second touch operation is determined based on the current object orientation of the first virtual object.
3. The method according to claim 2, characterized in that, The step of determining the second object control direction corresponding to the second touch operation based on the current object orientation of the first virtual object includes: A second direction mapping relationship is determined based on the current object orientation of the first virtual object, and a second object control direction corresponding to the second touch operation is determined based on the second direction mapping relationship.
4. The method according to claim 2, characterized in that, The method further includes at least one of the following: When the virtual scene is presented from the first perspective, the viewpoint orientation of the game screen displayed by the graphical user interface is controlled to match the reference control direction in the first direction mapping relationship. When the virtual scene is presented from the first perspective, the control matches the object orientation of the first virtual object with the reference control direction in the first direction mapping relationship.
5. The method according to claim 4, characterized in that, The coordinate system of the moving operation area is the initial coordinate system.
6. The method according to claim 2, characterized in that, Determining the second object control direction corresponding to the second touch operation based on the current object orientation of the first virtual object includes at least one of the following: The direction of the first virtual object's orientation in the mobile operation area is taken as the reference operation direction in the mobile operation area, and the second object control direction is determined based on the operation information of the second touch operation and the reference operation direction. The reference operation direction of the mobile operation area is dynamically aligned with the object orientation, and the second object control direction is determined based on the operation information of the second touch operation and the dynamically aligned reference operation direction. The mobile operation area is divided into multiple direction control areas according to the object orientation or the operation direction for the mobile operation area. The direction control area opposite to the object orientation or the operation direction is determined as the target direction control area. The second object control direction is determined according to the control direction corresponding to the direction control area where the operation information of the second touch operation is located. The second object control direction is obtained by adjusting the initial object control direction corresponding to the operation information of the second touch operation based on the object orientation.
7. The method according to claim 6, characterized in that, The method further includes: The control aligns the object's orientation or the viewing angle with the reference operation direction or target direction control area of the movement operation area.
8. The method according to claim 6, characterized in that, The method further includes: The graphical user interface displays an indicator corresponding to the reference operating direction or the target direction control area.
9. The method according to claim 8, characterized in that, The method further includes: In response to a target event, the display pose of the indicator is adjusted according to the target event to indicate the reference operating direction or the target direction control area.
10. The method according to claim 1, characterized in that, Switching the game screen presented in the graphical user interface from the first perspective to the second perspective includes: Obtain the reference position indicated by the preset position in the game screen under the first perspective or the view orientation corresponding to the game screen under the first perspective; The target position of the virtual camera is determined according to the second positional relationship, wherein the second positional relationship corresponds to the second viewpoint; The system controls the movement of the virtual camera to the target position, and determines the viewing orientation of the virtual camera when switching to the second viewing angle based on the reference position or the viewing orientation.
11. The method according to claim 1, characterized in that, The method further includes: In the second perspective, without any view control operation, the relative positional relationship between the object orientation of the first virtual object and the view orientation corresponding to the game screen remains unchanged.
12. The method according to claim 1, characterized in that, The response to a first touch operation applied to a mobile operation area, determining a first object control direction corresponding to the first touch operation based on first direction control logic, includes: In response to a first touch operation applied to a mobile operation area, the first object control direction is determined based on the first direction control logic and according to the operation direction of the first touch operation and the reference operation direction of the mobile operation area. From the second perspective, the movement operation area is divided into multiple direction control areas; the process of determining the second object control direction corresponding to the second touch operation based on the second direction control logic in response to a second touch operation on the movement operation area includes: In response to a second touch operation applied to the mobile operation area, the second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
13. The method according to claim 1, characterized in that, From the first perspective, the movement operation area is divided into M directional control areas; from the second perspective, the movement operation area is divided into N directional control areas; M>N; The response to a first touch operation applied to a mobile operation area, determining a first object control direction corresponding to the first touch operation based on first direction control logic, includes: In response to a first touch operation applied to a mobile operation area, the first object control direction is determined based on the first direction control logic and the direction control area where the operation information of the first touch operation is located. The method of responding to a second touch operation applied to the mobile operation area, and determining a second object control direction corresponding to the second touch operation based on second direction control logic, includes: In response to a second touch operation applied to the mobile operation area, the second object control direction is determined based on the second direction control logic and the direction control area where the operation information of the second touch operation is located.
14. The method according to claim 1, characterized in that, The step of controlling the movement and / or turning of the first virtual object according to the first object control direction includes: From the first perspective, the first virtual object is moved and / or turned according to the first object control direction and the first motion parameters. The step of controlling the movement and / or turning of the first virtual object according to the second object control direction includes: From the second perspective, the first virtual object is moved and / or turned according to the second object control direction and the second motion parameters; Wherein, the first motion parameter is greater than the second motion parameter; the display magnification of the game screen in the first viewpoint is less than the display magnification of the game screen in the second viewpoint.
15. The method according to claim 1, characterized in that, The method further includes: In response to switching the game screen presented in the graphical user interface from the first perspective to the second perspective, the movement speed of the first virtual object is reduced; the display magnification of the game screen in the first perspective is less than the display magnification of the game screen in the second perspective.
16. The method according to any one of claims 1 to 15, characterized in that, The step of controlling the movement and / or turning of the first virtual object according to the first object control direction includes: Based on the direction control of the first object, the first virtual object is controlled to reduce its movement speed and change direction.
17. The method according to claim 16, characterized in that, The step of controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: The steering amplitude is determined based on the direction controlled by the first object or based on the first touch operation; Determine the deceleration parameters based on the steering amplitude; Based on the first object control direction, the first virtual object is controlled to reduce its movement speed and turn using the deceleration parameters.
18. The method according to claim 17, characterized in that, The deceleration parameters include deceleration, and the steering angle is positively correlated with the deceleration; determining the deceleration parameters based on the steering angle includes: If the steering angle does not reach the steering threshold, the deceleration corresponding to the steering angle is determined according to the positive correlation; the deceleration is less than a preset upper limit value. If the steering amplitude reaches the steering threshold, then the deceleration is determined to be the preset upper limit value.
19. The method according to claim 17, characterized in that, The deceleration parameters include deceleration; controlling the first virtual object to reduce its movement speed and turn according to the first object control direction using the deceleration parameters includes: Based on the first object control direction, the first virtual object is controlled to reduce its movement speed by the deceleration within a preset time period and to turn.
20. The method according to claim 16, characterized in that, The step of controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: Control the first virtual object to reduce its movement speed; During and / or after reducing movement speed, the first virtual object is controlled to turn according to the first object control direction.
21. The method according to claim 16, characterized in that, The step of controlling the first virtual object to reduce its movement speed and turn according to the first object control direction includes: During the first touch operation, if the control direction of the first object determined by the first touch operation changes, the first virtual object is controlled to reduce its movement speed and turn in real time according to the real-time control direction of the first object.
22. The method according to claim 1, characterized in that, The first perspective is a perspective based on the first virtual object as a whole; one or more shooting points are set on the first virtual object, and the second perspective is a perspective based on any one of the shooting points.
23. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 22.
24. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 22 by executing the executable instructions.