Method and apparatus for adjusting virtual lens, and storage medium and electronic apparatus
By automatically adjusting the orientation of the virtual lens, the problem of difficulty in adjusting the orientation of the virtual lens in virtual three-dimensional electronic games is solved, improving the game experience and saving hardware resources.
Patent Information
- Application Number
- PCT/CN2023/117086
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-26
- Filing Date
- 2023-09-05
- Publication Date
- 2024-10-31
AI Technical Summary
In virtual three-dimensional electronic games running on mobile devices, it is difficult to adjust the direction of the virtual camera, which reduces the player's gaming experience.
By obtaining the initial orientation of the virtual game character and the orientation area of the virtual lens, it detects orientation changes and responds to touch operations, automatically adjusting the orientation of the virtual lens to assist players in controlling the virtual lens.
It reduces the difficulty of controlling the direction of the virtual camera, improves the gaming experience, and saves computing resources of hardware devices.
Smart Images

Figure CN2023117086_31102024_PF_FP_ABST
Abstract
Description
Method, device, storage medium and electronic device for adjusting virtual lens
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 202310494541.3, filed on April 26, 2023, entitled “Method, device, storage medium and electronic device for adjusting a virtual lens”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of computer technology, and in particular to a method, device, storage medium, and electronic device for adjusting a virtual lens. Background Art
[0004] For mobile devices running virtual 3D electronic games, players often rely on dragging virtual camera controls to adjust the viewing angle (i.e., the virtual camera's orientation). When the game scene is complex, such as in action or fighting games, this method increases the player's operational difficulty and reduces the gaming experience.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field.
[0007] Summary of the Invention
[0008] At least some embodiments of the present disclosure provide a method, device, storage medium, and electronic device for adjusting a virtual lens, so as to at least solve the technical problem in the related art that the virtual lens orientation adjustment operation is difficult, resulting in a poor gaming experience for players.
[0009] According to a first aspect of the present disclosure, a method for adjusting a virtual lens is provided, wherein a graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface at least partially includes a game scene and multiple controls, and the display content of the game scene at least partially includes a virtual game character. The method comprises: obtaining a first orientation of the virtual game character and a first orientation area of the virtual lens in the game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation; in response to the virtual game character changing from the first orientation to the second orientation, detecting whether the second orientation exceeds the first orientation area, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene; in response to the second orientation exceeding the first orientation area, detecting whether a touch operation performed on a target control is received, wherein the target control is any one of the multiple controls, and the target control is used to control the virtual game character to perform a target action; in response to the touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation.
[0010] According to a second aspect of the present disclosure, a device for adjusting a virtual lens is also provided, wherein a graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface at least partially includes a game scene and multiple controls, and the displayed content of the game scene at least partially includes a virtual game character. The device includes: an acquisition module, used to obtain a first orientation of the virtual game character and a first orientation area of the virtual lens in the game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation; a first detection module, used to detect whether the second orientation exceeds the first orientation area in response to the virtual game character changing from the first orientation to the second orientation, wherein the second orientation is the adjusted orientation of the virtual game character in the game scene; a second detection module, used to detect whether a touch operation performed on a target control is received in response to the second orientation exceeding the first orientation area, wherein the target control is any control among multiple controls, and the target control is used to control the virtual game character to perform a target action; and an adjustment module, used to adjust the orientation of the virtual lens based on the second orientation in response to the touch operation performed on the target control.
[0011] According to a third aspect of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the method for adjusting a virtual lens according to the first aspect when running.
[0012] According to a fourth aspect of the present disclosure, an electronic device is further provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for adjusting a virtual lens according to the first aspect.
[0013] The present disclosure first obtains a first orientation of a virtual game character and a first orientation region of a virtual lens in a game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation region is the initial orientation region corresponding to the first orientation. Further, in response to the virtual game character changing from the first orientation to a second orientation, it is detected whether the second orientation exceeds the first orientation region, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene. Further, in response to the second orientation exceeding the first orientation region, it is detected whether a touch operation is received on a target control, wherein the target control is any control among a plurality of controls, and the target control is used to control the virtual game character to perform a target action. Based on this, in response to the touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation. Thus, the method for adjusting the virtual lens provided by the present disclosure achieves the purpose of automatically assisting the virtual lens orientation based on the orientation of the virtual game character, the orientation of the virtual lens, and the touch operation, thereby achieving the technical effect of reducing the difficulty of controlling the virtual lens orientation in the game and improving the gaming experience, thereby solving the technical problem in the related art that the difficulty of adjusting the virtual lens orientation operation leads to a poor gaming experience for players, and reduces the response frequency of the hardware device, which helps to save computing resources of the hardware device. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG1 is a hardware structure block diagram of a mobile terminal according to a method for adjusting a virtual lens according to one embodiment of the present disclosure;
[0015] FIG2 is a flow chart of a method for adjusting a virtual lens according to one embodiment of the present disclosure;
[0016] FIG3 is a schematic diagram of an optional initial game scene according to one embodiment of the present disclosure;
[0017] FIG4 is a schematic diagram of an optional change in the orientation of a virtual game character according to one embodiment of the present disclosure;
[0018] FIG5 is a schematic diagram of an optional game scene after the virtual camera orientation is adjusted according to one embodiment of the present disclosure;
[0019] FIG6 is a structural block diagram of an apparatus for adjusting a virtual lens according to one embodiment of the present disclosure;
[0020] FIG7 is a structural block diagram of an optional device for adjusting a virtual lens according to one embodiment of the present disclosure;
[0021] FIG8 is a structural block diagram of another optional device for adjusting a virtual lens according to one embodiment of the present disclosure;
[0022] FIG9 is a structural block diagram of another optional device for adjusting a virtual lens according to one embodiment of the present disclosure;
[0023] FIG10 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In the prior art, players adjust the virtual camera's direction in virtual three-dimensional electronic games by using a single finger to control a virtual camera control, for example, in mobile touch-screen games. This method presents drawbacks: It makes game operation difficult, as the finger used to control the virtual camera control is occupied, preventing other operations. Conversely, it's difficult to free up a finger to control the virtual camera control while performing other game operations. Furthermore, controlling the virtual camera's direction relies heavily on player experience, resulting in a poor gaming experience. Prior to this disclosure, no effective solution to these existing issues had been proposed.
[0025] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should be noted that, in the specification of the present disclosure, the word "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present disclosure is not necessarily to be construed as being more preferred or advantageous than other embodiments. In order to enable any person skilled in the art to implement and use the present disclosure, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present disclosure can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present disclosure with unnecessary details. Therefore, the present disclosure is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present disclosure.
[0028] The above-mentioned method embodiments involved in the present disclosure can be executed in a terminal device (e.g., a mobile terminal, a computer terminal, or a similar computing device). Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone, tablet computer, PDA, mobile Internet device, PAD, game console, or other terminal device.
[0029] FIG1 is a hardware block diagram of a mobile terminal for a method of adjusting a virtual lens according to one embodiment of the present disclosure. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102, a memory 104, a transmission device 106, an input / output device 108, and a display device 110. Taking the method of adjusting a virtual lens as an example of applying the method to an electronic game scene through the mobile terminal, the processor 102 calls and runs a computer program stored in the memory 104 to execute the method of adjusting the virtual lens. The adjustment result of the virtual lens orientation in the generated electronic game scene is transmitted to the input / output device 108 and / or the display device 110 via the transmission device 106, and the adjustment result of the virtual lens orientation is provided to the player.
[0030] Still as shown in Figure 1, the processor 102 may include but is not limited to: a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and other processing devices.
[0031] Those skilled in the art will appreciate that the structure shown in FIG1 is merely illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may include more or fewer components than shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0032] In some optional embodiments mainly based on gaming scenarios, the above-mentioned terminal device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0033] The above-mentioned method embodiments involved in the present disclosure can also be executed in a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Taking the method of adjusting the virtual lens as an example of applying it to an electronic game scene through an electronic game server, the electronic game server can generate an adjustment result of the virtual lens orientation in the electronic game scene based on the method of adjusting the virtual lens, and provide the adjustment result of the virtual lens orientation to the player (for example, it can be rendered and displayed on the display screen of the player's terminal, or provided to the player through holographic projection, etc.).
[0034] According to one embodiment of the present disclosure, an embodiment of a method for adjusting a virtual lens is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] In this embodiment, a method for adjusting a virtual lens running on the mobile terminal is provided. A graphical user interface is provided by the terminal device. The content displayed by the graphical user interface at least partially includes a game scene and multiple controls. The displayed content of the game scene at least partially includes a virtual game character. FIG2 is a flow chart of a method for adjusting a virtual lens according to one embodiment of the present disclosure. As shown in FIG2 , the method includes the following steps:
[0036] Step S21, obtaining a first orientation of the virtual game character and a first orientation area of the virtual camera in the game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation;
[0037] Step S22, in response to the virtual game character changing from the first orientation to the second orientation, detecting whether the second orientation exceeds the first orientation region, wherein the second orientation is the orientation of the virtual game character after adjustment within the game scene;
[0038] Step S23, in response to the second orientation exceeding the first orientation area, detecting whether a touch operation performed on a target control is received, wherein the target control is any control among the multiple controls, and the target control is used to control the virtual game character to perform a target action;
[0039] Step S24 , in response to the touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation.
[0040] The terminal device may be a computer (PC) or a mobile terminal (such as a smart phone, tablet computer, game console, or smart wearable device). The graphical user interface provided by the terminal device may be a user interface (UI) corresponding to the game scene. The graphical user interface includes at least the game scene and the plurality of controls, and the plurality of controls are used to control the scene parameters of the game scene or to control the virtual game character in the game scene. The virtual game character displayed in the game scene is the game character currently controlled by the player.
[0041] The game types corresponding to the above game scenarios can be: action (for example: first-person or third-person shooting games, two-dimensional or three-dimensional fighting games, war action games and sports action games, etc.), adventure (for example: exploration games, collection games, puzzle games, etc.), simulation (for example: simulation sandbox games, simulation development games, strategy simulation games, city building simulation games, business simulation games, etc.), role-playing and casual (for example: chess and card table games, casual competitive games, music rhythm games, dress-up development games, etc.), etc.
[0042] The first orientation is the initial orientation of the virtual game character within the game scene. Virtual game characters often need to change orientation within the game scene. For example, when walking, running, turning while driving a vehicle, or looking left or right, the virtual game character's orientation changes. The first orientation is the orientation of the virtual game character before the orientation change. Correspondingly, the second orientation is the orientation of the virtual game character after the orientation change within the game scene.
[0043] The virtual camera is a pre-configured viewing lens within the game scene. The game scene area captured by the virtual camera (including the scene and the virtual game character, virtual prop models, etc. displayed within the scene) is displayed within the graphical user interface. The first orientation area is the orientation area of the virtual camera within the game scene when the virtual game character is in the first orientation, i.e., the initial orientation area corresponding to the first orientation.
[0044] In the disclosed embodiment, the virtual camera's orientation corresponds to the virtual game character's orientation. An optional implementation is to align the virtual camera's orientation with the virtual game character's orientation and follow its orientation changes. When the virtual game character's display is set to always be displayed at the center of the graphical user interface (GUI), the virtual camera's orientation within the game scene corresponds to the central fan-shaped area of the current GUI.
[0045] When the virtual game character is detected to change from a first orientation to a second orientation, the second orientation is monitored to see whether it exceeds the first orientation area of the virtual lens. If the second orientation of the virtual game character after the change does not exceed the first orientation area of the virtual lens, it indicates that the orientation of the virtual lens does not need to be adjusted.
[0046] If the virtual game character's transformed second orientation exceeds the first orientation of the virtual camera, a touch operation on a target control is detected. The target control is any control designated by the aforementioned multiple controls for controlling the virtual game character to perform a target action. The target action can be an action pre-set as a "core action," for example, including normal attack, movement, jump, and skill release. Correspondingly, the multiple controls include a normal attack button, a movement joystick, a jump button, a skill button, and the like.
[0047] When the second orientation of the virtual game character exceeds the first orientation area and a touch operation is received on the target control, indicating that the orientation of the virtual camera needs to be adjusted, the orientation of the virtual camera is adjusted based on the second orientation. In an optional embodiment, the orientation of the virtual camera is adjusted to be consistent with the second orientation.
[0048] The method provided by the disclosed embodiments reduces the difficulty of controlling the virtual camera's orientation in games by providing virtual camera orientation assistance. During gameplay, the virtual camera orientation assistance is triggered based on whether the virtual game character's current orientation leaves the virtual camera orientation area and whether the virtual game character performs a core key operation.
[0049] In at least some embodiments of the present disclosure, a first orientation of a virtual game character and a first orientation area of a virtual lens in a game scene are first obtained, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation. Further, in response to the virtual game character changing from the first orientation to the second orientation, it is detected whether the second orientation exceeds the first orientation area, wherein the second orientation is the adjusted orientation of the virtual game character in the game scene. Further, in response to the second orientation exceeding the first orientation area, it is detected whether a touch operation performed on a target control is received, wherein the target control is any one of a plurality of controls, and the target control is used to control the virtual game character to perform a target action. On this basis, in response to the touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation. Therefore, the method for adjusting the virtual lens provided by the present invention achieves the purpose of automatically assisting in pulling the virtual lens direction based on the direction of the virtual game character, the direction of the virtual lens and the touch operation, thereby achieving the technical effect of reducing the difficulty of controlling the virtual lens direction in the game and improving the gaming experience, thereby solving the technical problem in the related art that the virtual lens direction adjustment operation is difficult and leads to poor gaming experience for players, and reduces the response frequency of the hardware device, which helps to save the computing resources of the hardware device.
[0050] The following further illustrates the technical solution of the disclosed embodiment by taking the automatic adjustment of the virtual camera orientation for a virtual character in a free perspective scene in a role-playing game as an example.
[0051] Optionally, in step S21, obtaining the first direction area of the virtual camera in the game scene may include the following steps:
[0052] Step S211, obtaining a third orientation of the virtual lens, wherein the third orientation is an initial orientation of the virtual lens in the game scene, and the third orientation corresponds to the first orientation;
[0053] Step S212: determining a first orientation area based on a preset angle range with the third orientation as a reference line.
[0054] The third orientation corresponds to the first orientation. The third orientation is the initial orientation of the virtual lens in the game scene, and the first orientation is the initial orientation of the virtual game character in the game scene. That is to say, in an optional embodiment, in a default state, the initial orientations of the virtual lens and the virtual game character in the game scene correspond to each other, which is manifested as the center of the virtual game character's field of view is at the center of the screen of the graphical user interface displaying the game scene.
[0055] The first orientation region of the virtual lens is determined based on the third orientation of the virtual lens and the preset angle range. The preset angle range is determined by a preset angle parameter and a preset range parameter. For example, when the preset angle range is a sector-shaped region, the preset angle parameter is the central angle of the sector-shaped region, and the preset range parameter is the radius of the sector-shaped region. The direction of the perpendicular bisector of the chord of the sector-shaped region is the orientation of the virtual lens.
[0056] Figure 3 is a schematic diagram of an optional initial game scene according to one embodiment of the present disclosure. As shown in Figure 3, the orientation of the virtual character (as shown by the black arrow in Figure 3, equivalent to the above-mentioned first orientation) is consistent with the orientation of the scene virtual lens (equivalent to the above-mentioned third orientation), and the orientation area of the virtual lens (equivalent to the above-mentioned first orientation area) is a fan-shaped area in the center of the graphical user interface, and the area boundary is determined by the two radii of the fan-shaped area. The orientation of the above-mentioned virtual lens is the direction of the perpendicular bisector of the chord corresponding to the fan-shaped area. In the free perspective scene, the orientation of the above-mentioned virtual lens is set to always be adsorbed on the center of the screen. When the virtual character is in the initial orientation shown in Figure 3, the game scene displayed in the graphical user interface is recorded as scene image 1.
[0057] During the game, when the virtual character is detected to turn right by 90 degrees, it is monitored whether the adjusted direction of the virtual character exceeds the fan-shaped area shown in FIG3 .
[0058] Optionally, the method for adjusting the virtual lens may further include the following steps:
[0059] Step S25 : In response to the second orientation not exceeding the first orientation range, controlling the virtual lens to maintain at a third orientation.
[0060] Still taking the example of automatically adjusting the virtual lens orientation for a virtual character in a free-viewing scene in a role-playing game, when the adjusted orientation of the virtual character does not exceed the fan-shaped area as shown in Figure 3, it means that the scene image currently displayed on the graphical user interface does not need to be adjusted, and the orientation of the virtual lens is maintained at its original orientation, which is the orientation of the virtual lens corresponding to the orientation of the virtual character before the orientation adjustment.
[0061] FIG4 is a schematic diagram of an optional change in the orientation of a virtual game character according to one embodiment of the present disclosure. As shown in FIG4 , during the game, the virtual character performs game tasks in the game scene, which often involves the situation where the orientation of the virtual character changes. At this time, when the adjusted orientation of the virtual character exceeds the fan-shaped area shown in FIG3 , as shown in FIG4 , the black arrow moves out of the fan-shaped area (in FIG4 , the virtual character model turns 90 degrees to the right as an example). At this time, the graphical user interface still displays the scene image 1. However, according to the objective laws of the real world, the scene image observed after the virtual character turns 90 degrees to the right should also be deflected 90 degrees to the right with the virtual character as the center. Therefore, it is necessary to adjust the virtual lens orientation so that the player can obtain the game scene image that can be observed by the adjusted orientation of the virtual character from the graphical user interface.
[0062] Optionally, in step S24, in response to the touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation may include the following execution steps:
[0063] Step S241 : In response to receiving a touch operation on a target control within a preset time period, adjusting the orientation of the virtual lens based on a second orientation.
[0064] Optionally, in step S241, adjusting the orientation of the virtual lens based on the second orientation may include the following steps:
[0065] Step S2411: Control the virtual lens to rotate at a preset rate based on the second orientation until the virtual lens rotates to a fourth orientation, wherein the fourth orientation is the orientation of the virtual lens after adjustment in the game scene, and the fourth orientation corresponds to the second orientation.
[0066] The fourth orientation is determined by the adjusted orientation of the virtual game character (i.e., the second orientation). In an optional embodiment, the fourth orientation corresponds to the second orientation and points to a location in the game scene corresponding to the center of the graphical user interface, such that the orientation area corresponding to the virtual camera is located at the center of the area displayed in the graphical user interface. The preset rate is the angular rate at which the virtual camera changes its orientation. This preset rate can be specified by a technician or set by the player through game preferences.
[0067] Optionally, the method for adjusting the virtual lens may further include the following steps:
[0068] Step S26: determining a second orientation region based on a preset angle range with the fourth orientation as a reference line, so as to update the first orientation region based on the second orientation region.
[0069] The fourth orientation is the adjusted virtual lens orientation. A preset angle range is determined based on the fourth orientation to obtain the second orientation region. For example, if the preset angle range is a sector-shaped region centered on the fourth orientation, the sector-shaped region corresponding to the pre-adjusted virtual lens orientation is adjusted according to the fourth orientation to obtain the second orientation region. The perpendicular bisector of the chord of the sector-shaped region corresponding to the second orientation region is aligned with the fourth orientation.
[0070] It is easy to understand that in the process of updating the first orientation area based on the second orientation area, the visual expression on the graphical user interface changes as follows: the central area displayed by the graphical user interface switches from the first orientation area of the game scene to the second orientation area.
[0071] Still taking the example of automatically adjusting the virtual lens orientation for a virtual character in a free perspective scene in a role-playing game, FIG5 is a schematic diagram of a game scene after an optional virtual lens orientation adjustment according to one embodiment of the present disclosure. As shown in FIG5 , at this time, if the player controlling the virtual character performs a touch operation on the core control displayed on the graphical user interface, the orientation area of the virtual lens will change at a slow rate and be re-adsorbed to the transformed virtual character model orientation (i.e., the black arrow). As shown in FIG5 , the result of the adjustment of the virtual lens orientation is reflected in the graphical user interface as follows: the currently displayed scene screen changes from scene screen 1 to scene screen 2, wherein scene screen 2 is a scene screen obtained by deflecting scene screen 1 90 degrees to the right with the virtual character as the center. For example, after the virtual character turns from facing due north to facing due east, the scene screen displayed in the graphical user interface should switch from the due north scene screen to the due east scene screen.
[0072] In this example, the core controls may include skill release controls and attack controls displayed in the graphical user interface, and the skill release controls include: skill 1 button, skill 2 button, and skill 3 button. That is, when the player controls the avatar to turn so that the adjusted direction exceeds the fan-shaped area shown in Figure 3, and then further touches at least one of the skill 1 button, skill 2 button, skill 3 button, and attack control, the direction of the virtual camera is adjusted according to the above-mentioned method provided in the embodiment of the present disclosure.
[0073] Similarly, when the virtual character in the game scene is deflected to any angle (usually between 0 and 360 degrees), the above method can be used to adjust the virtual lens direction to an angle corresponding to the adjusted direction of the virtual character, that is, adjust the scene picture currently displayed on the graphical user interface to the scene picture corresponding to the adjusted direction of the virtual character.
[0074] Optionally, in the above method for adjusting the virtual lens, during the process of adjusting the orientation of the virtual lens based on the second orientation, the height of the virtual lens remains unchanged.
[0075] In the process of the virtual lens's orientation following the virtual game character's orientation change, in order to ensure the smoothness of the change of the scene screen displayed in the graphical user interface, in the process of adjusting the virtual lens's orientation based on the adjusted orientation of the virtual game character (i.e., the second orientation), the height of the virtual lens remains unchanged, that is, the virtual game character's line of sight height remains unchanged. Correspondingly, in the scene screen displayed in the graphical user interface, the virtual models displayed at the same height have the same game space height coordinates in the game scene.
[0076] Optionally, the method for adjusting the virtual lens may further include the following steps:
[0077] Step S27 , in response to not receiving a touch operation on the target control within a preset time period, controlling the virtual game character to remain in the second orientation, and controlling the virtual camera to remain in the first orientation area.
[0078] Still taking the example of automatically adjusting the virtual camera orientation for a virtual character in a free-viewing scene in a role-playing game, as shown in FIG4 , when it is detected that the virtual character's adjusted orientation exceeds the fan-shaped area shown in FIG3 and the player performs a touch operation on a target control among the multiple controls displayed in the graphical user interface, the orientation of the virtual camera is adjusted, resulting in the scene screen shown in FIG5 . However, when it is detected that the virtual character's adjusted orientation exceeds the fan-shaped area shown in FIG3 , but the player does not perform a touch operation on the target control among the multiple controls displayed in the graphical user interface within a preset time period, the display content of the graphical user interface remains as the scene screen shown in FIG4 , that is, the orientation of the virtual character model remains in the adjusted orientation (equivalent to the second orientation described above), and the virtual camera remains in the orientation area before adjustment (equivalent to the first orientation area described above).
[0079] Thus, the technical solution provided by the embodiment of the present disclosure achieves automatic auxiliary traction of the virtual camera direction, thereby avoiding the problem of players having to allocate fingers to control the virtual camera direction while operating the game during the game.
[0080] It's easy to notice that in virtual three-dimensional game scenes, especially free-viewing game scenes, the virtual camera orientation change judgment conditions provided by the disclosed embodiments can be applied to most game operations, thereby providing auxiliary guidance on the virtual camera orientation in the game scene and improving the smoothness of player operations. Furthermore, for mobile games, the virtual camera adjustment method provided by the disclosed embodiments can achieve synchronization between virtual camera orientation control and game operations. This reduces the difficulty of controlling the virtual camera orientation while the player is engaged in game operations, reduces the player's operating costs, and provides a more immersive experience for the player during the game.
[0081] It is easy to understand that the focus of the technical solution provided by the embodiment of the present disclosure is to trigger automatic adjustment of the virtual lens orientation through the positional relationship between the orientation of the virtual game character and the virtual lens orientation area, as well as the touch operation of multiple controls corresponding to the virtual game character.
[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a disk or optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present disclosure.
[0083] This embodiment also provides a device for adjusting a virtual lens, which is used to implement the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0084] FIG6 is a block diagram of a device for adjusting a virtual lens according to one embodiment of the present disclosure. A graphical user interface is provided via a terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene and multiple controls, and the displayed content of the game scene at least partially includes a virtual game character. As shown in FIG6 , the device includes: an acquisition module 601, configured to acquire a first orientation of the virtual game character and a first orientation region of the virtual lens within the game scene, wherein the first orientation is the initial orientation of the virtual game character within the game scene, and the first orientation region is the initial orientation region corresponding to the first orientation; a first detection module 602, configured to detect, in response to the virtual game character changing from the first orientation to the second orientation, whether the second orientation exceeds the first orientation region, wherein the second orientation is the adjusted orientation of the virtual game character within the game scene; a second detection module 603, configured to detect, in response to the second orientation exceeding the first orientation region, whether a touch operation is received on a target control, wherein the target control is any one of multiple controls and is used to control the virtual game character to perform a target action; and an adjustment module 604, configured to adjust the orientation of the virtual lens based on the second orientation in response to the touch operation performed on the target control.
[0085] The device first obtains a first orientation of a virtual game character and a first orientation area of a virtual lens in a game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation. Further, in response to the virtual game character changing from the first orientation to the second orientation, it detects whether the second orientation exceeds the first orientation area, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene. Further, in response to the second orientation exceeding the first orientation area, it detects whether a touch operation is received on a target control, wherein the target control is any control among a plurality of controls, and the target control is used to control the virtual game character to perform a target action. On this basis, in response to the touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation. Thus, the method for adjusting the virtual lens provided by the present disclosure achieves the purpose of automatically assisting the virtual lens orientation based on the orientation of the virtual game character, the orientation of the virtual lens, and the touch operation, thereby achieving the technical effect of reducing the difficulty of controlling the virtual lens orientation in the game and improving the gaming experience, thereby solving the technical problem in the related art that the difficulty of adjusting the virtual lens orientation operation leads to a poor gaming experience for players, and reduces the response frequency of the hardware device, which helps to save the computing resources of the hardware device.
[0086] Optionally, the acquisition module 601 is further used to: acquire a third orientation of the virtual lens, wherein the third orientation is the initial orientation of the virtual lens in the game scene, and the third orientation corresponds to the first orientation; and determine the first orientation area based on a preset angle range with the third orientation as a reference line.
[0087] Optionally, Figure 7 is a structural block diagram of an optional device for adjusting a virtual lens according to one embodiment of the present disclosure. As shown in Figure 7, in addition to all the modules shown in Figure 6, the device also includes: a maintaining module 605, which is used to control the virtual lens to remain in a third orientation in response to the second orientation not exceeding the first orientation area.
[0088] Optionally, the adjustment module 604 is further configured to: in response to receiving a touch operation on the target control within a preset time period, adjust the orientation of the virtual lens based on the second orientation.
[0089] Optionally, the above-mentioned adjustment module 604 is also used to: control the virtual lens to rotate at a preset rate based on the second orientation until the virtual lens rotates to a fourth orientation, wherein the fourth orientation is the orientation of the virtual lens after adjustment in the game scene, and the fourth orientation corresponds to the second orientation.
[0090] Optionally, Figure 8 is a structural block diagram of another optional device for adjusting a virtual lens according to one embodiment of the present disclosure. As shown in Figure 8, in addition to all the modules shown in Figure 7, the device also includes: a determination module 606, which is used to determine a second orientation area based on a preset angle range with the fourth orientation as a baseline, so as to update the first orientation area based on the second orientation area.
[0091] Optionally, in the device for adjusting the virtual lens, during the process of adjusting the orientation of the virtual lens based on the second orientation, the height of the virtual lens remains unchanged.
[0092] Optionally, Figure 9 is a structural block diagram of another optional device for adjusting the virtual lens according to one embodiment of the present disclosure. As shown in Figure 9, in addition to all the modules shown in Figure 8, the device also includes: a touch module 607, which is used to control the virtual game character to remain in the second orientation and control the virtual lens to remain in the first orientation area in response to not receiving a touch operation performed on the target control within a preset time period.
[0093] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0094] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0095] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0096] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0097] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0098] S1, obtaining a first orientation of the virtual game character and a first orientation area of the virtual camera in the game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation;
[0099] S2, in response to the virtual game character changing from a first orientation to a second orientation, detecting whether the second orientation exceeds the first orientation region, wherein the second orientation is the orientation of the virtual game character after adjustment within the game scene;
[0100] S3, in response to the second orientation exceeding the first orientation area, detecting whether a touch operation performed on a target control is received, wherein the target control is any control among the multiple controls, and the target control is used to control the virtual game character to perform a target action;
[0101] S4, in response to the touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation.
[0102] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: obtaining a third orientation of the virtual lens, wherein the third orientation is the initial orientation of the virtual lens in the game scene, and the third orientation corresponds to the first orientation; and determining the first orientation area based on a preset angle range with the third orientation as a baseline.
[0103] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: in response to the second orientation not exceeding the first orientation range, controlling the virtual lens to remain at a third orientation.
[0104] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: in response to receiving a touch operation on a target control within a preset time period, adjusting the orientation of the virtual lens based on the second orientation.
[0105] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: controlling the virtual lens to rotate at a preset rate based on the second orientation until the virtual lens rotates to a fourth orientation, wherein the fourth orientation is the orientation of the virtual lens after adjustment in the game scene, and the fourth orientation corresponds to the second orientation.
[0106] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: determining a second orientation area based on a preset angle range with the fourth orientation as a reference line, so as to update the first orientation area based on the second orientation area.
[0107] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: in the process of adjusting the orientation of the virtual lens based on the second orientation, the height of the virtual lens remains unchanged.
[0108] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: in response to not receiving a touch operation performed on the target control within a preset time period, controlling the virtual game character to remain in the second orientation, and controlling the virtual lens to remain in the first orientation area.
[0109] In the computer-readable storage medium of the above embodiment, a technical solution for implementing a method for adjusting a virtual lens is provided. First, a first orientation of a virtual game character and a first orientation area of a virtual lens in a game scene are obtained, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation. Further, in response to the virtual game character changing from the first orientation to a second orientation, whether the second orientation exceeds the first orientation area is detected, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene. Further, in response to the second orientation exceeding the first orientation area, whether a touch operation performed on a target control is received is detected, wherein the target control is any control among multiple controls, and the target control is used to control the virtual game character to perform a target action. On this basis, in response to the touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation. Therefore, the method for adjusting the virtual lens provided by the present invention achieves the purpose of automatically assisting in pulling the virtual lens direction based on the direction of the virtual game character, the direction of the virtual lens and the touch operation, thereby achieving the technical effect of reducing the difficulty of controlling the virtual lens direction in the game and improving the gaming experience, thereby solving the technical problem in the related art that the virtual lens direction adjustment operation is difficult and leads to poor gaming experience for players, and reduces the response frequency of the hardware device, which helps to save the computing resources of the hardware device.
[0110] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0111] In exemplary embodiments of the present disclosure, a computer-readable storage medium stores a program product capable of implementing the aforementioned method of the present embodiment. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Method" section of the present embodiment according to various exemplary embodiments of the present disclosure.
[0112] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited thereto. In the embodiment of the present disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0113] The program product may be implemented in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0114] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any appropriate combination of the above.
[0115] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0116] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0117] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0118] S1, obtaining a first orientation of the virtual game character and a first orientation area of the virtual camera in the game scene, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation;
[0119] S2, in response to the virtual game character changing from a first orientation to a second orientation, detecting whether the second orientation exceeds the first orientation region, wherein the second orientation is the orientation of the virtual game character after adjustment within the game scene;
[0120] S3, in response to the second orientation exceeding the first orientation area, detecting whether a touch operation performed on a target control is received, wherein the target control is any control among the multiple controls, and the target control is used to control the virtual game character to perform a target action;
[0121] S4, in response to the touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation.
[0122] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtaining a third orientation of the virtual lens, wherein the third orientation is the initial orientation of the virtual lens in the game scene, and the third orientation corresponds to the first orientation; and determining the first orientation area based on a preset angle range with the third orientation as the baseline.
[0123] Optionally, the processor may be further configured to execute the following steps through a computer program: in response to the second orientation not exceeding the first orientation area, controlling the virtual lens to remain at a third orientation.
[0124] Optionally, the processor may be further configured to execute the following steps through a computer program: in response to receiving a touch operation on a target control within a preset time period, adjusting the orientation of the virtual lens based on the second orientation.
[0125] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: controlling the virtual lens to rotate at a preset rate based on the second direction until the virtual lens rotates to a fourth direction, wherein the fourth direction is the direction of the virtual lens after adjustment in the game scene, and the fourth direction corresponds to the second direction.
[0126] Optionally, the processor may be configured to execute the following steps through a computer program: determining a second orientation area based on a preset angle range with the fourth orientation as a reference line, and updating the first orientation area based on the second orientation area.
[0127] Optionally, the processor may be further configured to execute the following steps through a computer program: during the process of adjusting the orientation of the virtual lens based on the second orientation, the height of the virtual lens remains unchanged.
[0128] Optionally, the processor may also be configured to execute the following steps through a computer program: in response to not receiving a touch operation on a target control within a preset time period, controlling the virtual game character to remain in the second orientation, and controlling the virtual lens to remain in the first orientation area.
[0129] In the electronic device of the above embodiment, a technical solution for implementing a method for adjusting a virtual lens is provided. First, a first orientation of a virtual game character and a first orientation area of a virtual lens in a game scene are obtained, wherein the first orientation is the initial orientation of the virtual game character in the game scene, and the first orientation area is the initial orientation area corresponding to the first orientation. Further, in response to the virtual game character changing from the first orientation to the second orientation, whether the second orientation exceeds the first orientation area is detected, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene. Further, in response to the second orientation exceeding the first orientation area, whether a touch operation performed on a target control is received is detected, wherein the target control is any control among multiple controls, and the target control is used to control the virtual game character to perform a target action. On this basis, in response to the touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation. Therefore, the method for adjusting the virtual lens provided by the present invention achieves the purpose of automatically assisting in pulling the virtual lens direction based on the direction of the virtual game character, the direction of the virtual lens and the touch operation, thereby achieving the technical effect of reducing the difficulty of controlling the virtual lens direction in the game and improving the gaming experience, thereby solving the technical problem in the related art that the virtual lens direction adjustment operation is difficult and leads to poor gaming experience for players, and reduces the response frequency of the hardware device, which helps to save the computing resources of the hardware device.
[0130] Figure 10 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. As shown in Figure 10, the electronic device 1000 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0131] As shown in Figure 10, electronic device 1000 is implemented as a general-purpose computing device. Components of electronic device 1000 may include, but are not limited to, at least one processor 1010, at least one memory 1020, a bus 1030 connecting various system components (including memory 1020 and processor 1010), and a display 1040.
[0132] The memory 1020 stores program codes, which can be executed by the processor 1010, so that the processor 1010 executes the steps described in the method section of the embodiment of the present disclosure according to various exemplary embodiments of the present disclosure.
[0133] The memory 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 10201 and / or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0134] In some examples, the memory 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205. Such program modules 10205 include, but are 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. The memory 1020 may further include a memory remotely located relative to the processor 1010. These remote memories may be connected to the electronic device 1000 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] The bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus to the processor 1010, or any of a variety of bus architectures.
[0136] The display 1040 may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the electronic device 1000 .
[0137] Optionally, the electronic device 1000 may also communicate with one or more external devices 1100 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown in FIG10 , the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that although not shown in Figure 10, other hardware and / or software modules can be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0138] The electronic device 1000 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0139] Those skilled in the art will appreciate that the structure shown in FIG10 is merely illustrative and does not limit the structure of the electronic device described above. For example, the electronic device 1000 may include more or fewer components than those shown in FIG10 , or may have a configuration different from that shown in FIG10 . Memory 1020 may be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the method for adjusting a virtual lens in the embodiments of the present disclosure. Processor 1010 executes the computer program stored in memory 1020 to perform various functional applications and data processing, thereby implementing the method for adjusting a virtual lens described above.
[0140] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0141] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0142] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0143] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0144] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0146] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.
Claims
1. A method for adjusting a virtual lens, wherein a graphical user interface is provided through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene and a plurality of controls, and the displayed content of the game scene at least partially includes a virtual game character, and the method comprises: Acquire a first orientation of the virtual game character and a first orientation area of the virtual camera in the game scene, wherein the first orientation is an initial orientation of the virtual game character in the game scene, and the first orientation area is an initial orientation area corresponding to the first orientation; In response to the virtual game character changing from the first orientation to a second orientation, detecting whether the second orientation exceeds the first orientation area, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene; In response to the second orientation exceeding the first orientation area, detecting whether a touch operation performed on a target control is received, wherein the target control is any control among the multiple controls, and the target control is used to control the virtual game character to perform a target action; In response to a touch operation performed on the target control, the orientation of the virtual lens is adjusted based on the second orientation.
2. The method according to claim 1, wherein: Acquiring the first direction area of the virtual camera in the game scene includes: Acquire a third orientation of the virtual lens, wherein the third orientation is an initial orientation of the virtual lens in the game scene, and the third orientation corresponds to the first orientation; The first orientation area is determined based on a preset angle range with the third orientation as a reference line.
3. The method according to claim 2, wherein: The method further comprises: In response to the second orientation not exceeding the first orientation range, the virtual lens is controlled to remain in the third orientation.
4. The method according to claim 1, wherein: In response to a touch operation performed on the target control, adjusting the orientation of the virtual lens based on the second orientation includes: In response to receiving a touch operation on the target control within a preset time period, adjusting the orientation of the virtual lens based on the second orientation.
5. The method according to claim 1, wherein: Adjusting the orientation of the virtual lens based on the second orientation includes: Based on the second direction, the virtual lens is controlled to rotate at a preset rate until the virtual lens rotates to a fourth direction, wherein the fourth direction is the direction of the virtual lens after adjustment in the game scene, and the fourth direction corresponds to the second direction.
6. The method according to claim 5, wherein: The method further comprises: Based on a preset angle range with the fourth orientation as a reference line, a second orientation area is determined, so as to update the first orientation area based on the second orientation area.
7. The method according to claim 2, wherein: In the process of adjusting the orientation of the virtual lens based on the second orientation, the height of the virtual lens remains unchanged.
8. A device for adjusting a virtual lens, providing a graphical user interface through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a game scene and a plurality of controls, and the displayed content of the game scene at least partially includes a virtual game character, the device comprising: An acquisition module, used to acquire a first orientation of the virtual game character and a first orientation area of the virtual camera in the game scene, wherein the first orientation is an initial orientation of the virtual game character in the game scene, and the first orientation area is an initial orientation area corresponding to the first orientation; A first detection module, configured to detect, in response to the virtual game character changing from the first orientation to a second orientation, whether the second orientation exceeds the first orientation area, wherein the second orientation is the orientation of the virtual game character after adjustment in the game scene; A second detection module, configured to detect whether a touch operation performed on a target control is received in response to the second direction exceeding the first direction area, wherein the target control is any control among the multiple controls, and the target control is used to control the virtual game character to perform a target action; An adjustment module is used to respond to a touch operation performed on the target control and adjust the orientation of the virtual lens based on the second orientation.
9. A computer-readable storage medium having a computer program stored therein, wherein: The computer program is configured to execute the method for adjusting a virtual lens as claimed in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method for adjusting a virtual lens as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Viewing angle switching method and device in game scene and electronic equipment
CN110215690A
Method and device for controlling virtual object in game and touch terminal
CN112791404A
Information processing method and device in game, electronic equipment and storage medium
CN112933592A
Method and device for adjusting virtual lens, storage medium and electronic device
CN116549966A
Cited By
Model control method and device for non-contact motion sensing game
CN122399333A
Method and apparatus for detecting abnormal situation in game, and electronic device and storage medium
WO2026194681A1
