A method, device, equipment and medium for controlling virtual camera in game
By receiving the posture control operation data of the game control device and using the somatosensory control data to adjust the posture of the virtual lens, the problem of fixed speed of the lens control components is solved, and efficient virtual lens control and improved gaming experience are achieved.
Patent Information
- Application Number
- CN202211160187.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-09-22
AI Technical Summary
In the prior art, the rate at which the virtual lens is controlled by the lens control component of the game control device is relatively fixed, resulting in low efficiency in virtual lens control in emergency situations, affecting the gaming experience.
By receiving the posture control operation data of the game control device, using the body control data to adjust the posture of the virtual lens, and combining the trigger operation of the lens control component, efficient control of the virtual lens is achieved.
It improves the control efficiency of the virtual lens, prevents misoperation, and enhances the player's gaming experience.
Smart Images

Figure CN115445186B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and medium for controlling a virtual camera in a game. Background Art
[0002] In large-scale scrolling map games such as Multiplayer Online Battle Arena (MOBA), players often need to frequently control the movement of the virtual camera to observe the game scenes from different perspectives in order to cope with different in-game situations.
[0003] Currently, players can use game control devices to perform game operations. For example, players can control the virtual lens by manipulating the lens control component on the game control device. However, in this virtual lens control method, since the rate of controlling the virtual lens through the lens control component is relatively fixed, when encountering a crisis situation and requiring urgent and rapid control of the virtual lens, controlling the virtual lens through the lens control component will be relatively inefficient and will also reduce the player's gaming experience. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, device, and medium for controlling a virtual lens in a game, to address the problem in the prior art of low efficiency in controlling a virtual lens through a lens control component on a game control device, thereby affecting the gaming experience.
[0005] The technical solutions provided in the embodiments of this application are as follows:
[0006] In one aspect, an embodiment of the present application provides a method for controlling a virtual camera in a game. A graphical user interface is provided by a terminal device and the terminal device is connected to a game control device. The graphical user interface at least displays a game scene captured by the virtual camera. The method for controlling the virtual camera in the game includes:
[0007] Receiving a first lens control instruction sent by the game control device; wherein the first lens control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device;
[0008] Based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, the posture control data of the virtual lens is determined, and based on the posture control data of the virtual lens, the virtual lens is controlled to adjust the posture so as to display the game scene image captured after the virtual lens adjusts the posture in the graphical user interface.
[0009] In a possible implementation, before receiving the first lens control instruction sent by the game control device, the method further includes:
[0010] receiving a first mode control instruction sent by the game control device; wherein the first mode control instruction is sent by the game control device in response to a first trigger operation on the mode control component;
[0011] Based on the first mode control instruction, the current control mode of the virtual lens is set to the somatosensory control mode.
[0012] In a possible implementation, receiving a first lens control instruction sent by a game control device includes:
[0013] A simultaneous control instruction sent by the game control device is received as a first lens control instruction; wherein the simultaneous control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device that are simultaneously executed.
[0014] In a possible implementation, receiving a first lens control instruction sent by a game control device includes:
[0015] Receive a continuous control instruction sent by a game control device as a first lens control instruction; wherein the continuous control instruction is sent by the game control device in response to a first trigger operation on a lens control component and a posture control operation on the game control device that are continuously executed, and the posture control operation is a continuous operation after the first trigger operation.
[0016] In one possible implementation, determining the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction includes:
[0017] Determining a position offset of the virtual lens based on a position offset of the game control device in the somatosensory control data, and determining a movement speed of the virtual lens based on a movement speed of the game control device in the somatosensory control data;
[0018] and / or;
[0019] The direction offset of the virtual lens is determined based on the rotation offset of the game control device in the somatosensory control data, and the rotation speed of the virtual lens is determined based on the rotation speed of the game control device in the somatosensory control data.
[0020] In one possible implementation, the method for controlling a virtual camera in a game provided by the embodiment of the present application further includes:
[0021] receiving a second mode control instruction sent by the game control device; wherein the second mode control instruction is sent by the game control device in response to a second trigger operation on the mode control component;
[0022] Based on the second mode control instruction, the current control mode of the virtual lens is switched from the somatosensory control mode to the component control mode.
[0023] In one possible implementation, the method for controlling a virtual camera in a game provided by the embodiment of the present application further includes:
[0024] receiving a second lens control instruction sent by the game control device; wherein the second lens control instruction is sent by the game control device in response to a second trigger operation on the lens control component;
[0025] Based on the operation control data of the lens control component in the second lens control instruction, the posture control data of the virtual lens is determined, and based on the posture control data of the virtual lens, the virtual lens is controlled to adjust the posture to display the game scene image captured after the virtual lens adjusts the posture in the graphical user interface.
[0026] In one possible implementation, determining the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction includes:
[0027] Determining a direction offset of the virtual lens based on a control direction of the lens control component in the operation control data, and adjusting a rotation speed of the virtual lens according to a set multiple based on a control speed of the lens control component in the operation control data;
[0028] and / or;
[0029] Based on the operation duration of the lens control component in the operation control data, the displacement offset of the virtual lens is determined, and based on the operation speed of the lens control component in the operation control data, the movement speed of the virtual lens is adjusted according to the set multiple.
[0030] In one possible implementation, controlling the virtual lens to adjust its posture based on the posture control data of the virtual lens includes:
[0031] controlling the movement of the virtual lens according to the movement speed of the virtual lens in the posture control data of the virtual lens and based on the position offset of the virtual lens in the posture control data of the virtual lens;
[0032] and / or;
[0033] The rotation of the virtual lens is controlled according to the rotation speed of the virtual lens in the posture control data of the virtual lens and based on the direction offset of the virtual lens in the posture control data of the virtual lens.
[0034] In another aspect, an embodiment of the present application provides a virtual camera control device for a game. The virtual camera control device provides a graphical user interface and is connected to a game control device. The graphical user interface displays at least a game scene captured by a virtual camera. The virtual camera control device for the game includes:
[0035] A first receiving unit is configured to receive a lens control instruction sent by a game control device; wherein the lens control instruction is sent by the game control device in response to a first triggering operation on the lens control component and a posture control operation on the game control device;
[0036] A first determining unit is configured to determine the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the lens control instruction;
[0037] The lens control unit is used to control the virtual lens to adjust its posture based on the posture control data of the virtual lens, so as to display the game scene image captured after the virtual lens adjusts its posture in the graphical user interface.
[0038] In one possible implementation, the virtual camera control device in the game provided by the embodiment of the present application further includes:
[0039] a second receiving unit, configured to receive a first mode control instruction sent by the game control device, wherein the first mode control instruction is sent by the game control device in response to a first trigger operation on the mode control component;
[0040] The mode control unit is configured to set the current control mode of the virtual lens to the somatosensory control mode based on the first mode control instruction.
[0041] In a possible implementation, when receiving the first lens control instruction sent by the game control device, the first receiving unit is specifically configured to:
[0042] A simultaneous control instruction sent by the game control device is received as a first lens control instruction; wherein the simultaneous control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device that are simultaneously executed.
[0043] In a possible implementation, when receiving the first lens control instruction sent by the game control device, the first receiving unit is specifically configured to:
[0044] Receive a continuous control instruction sent by a game control device as a first lens control instruction; wherein the continuous control instruction is sent by the game control device in response to a first trigger operation on a lens control component and a posture control operation on the game control device that are continuously executed, and the posture control operation is a continuous operation after the first trigger operation.
[0045] In a possible implementation, when determining the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, the first determining unit is specifically configured to:
[0046] Determining a position offset of the virtual lens based on a position offset of the game control device in the somatosensory control data, and determining a movement speed of the virtual lens based on a movement speed of the game control device in the somatosensory control data;
[0047] and / or;
[0048] The direction offset of the virtual lens is determined based on the rotation offset of the game control device in the somatosensory control data, and the rotation speed of the virtual lens is determined based on the rotation speed of the game control device in the somatosensory control data.
[0049] In one possible implementation, the virtual camera control device in the game provided by the embodiment of the present application further includes:
[0050] a third receiving unit, configured to receive a second mode control instruction sent by the game control device; wherein the second mode control instruction is sent by the game control device in response to a second trigger operation on the mode control component;
[0051] The mode control unit is configured to switch the current control mode of the virtual lens from the somatosensory control mode to the component control mode based on the second mode control instruction.
[0052] In one possible implementation, the virtual camera control device in the game provided by the embodiment of the present application further includes:
[0053] a fourth receiving unit, configured to receive a second lens control instruction sent by the game control device; wherein the second lens control instruction is sent by the game control device in response to a second trigger operation on the lens control component;
[0054] a second determining unit, configured to determine the position and posture control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction;
[0055] The lens control unit is used to control the virtual lens to adjust its posture based on the posture control data of the virtual lens, so as to display the game scene image captured after the virtual lens adjusts its posture in the graphical user interface.
[0056] In a possible implementation, when determining the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction, the second determining unit is specifically configured to:
[0057] Determining a direction offset of the virtual lens based on a control direction of the lens control component in the operation control data, and adjusting a rotation speed of the virtual lens according to a set multiple based on a control speed of the lens control component in the operation control data;
[0058] and / or;
[0059] Based on the operation duration of the lens control component in the operation control data, the displacement offset of the virtual lens is determined, and based on the operation speed of the lens control component in the operation control data, the movement speed of the virtual lens is adjusted according to the set multiple.
[0060] In a possible implementation, when controlling the virtual lens to adjust its posture based on the posture control data of the virtual lens, the lens control unit is specifically configured to:
[0061] controlling the movement of the virtual lens according to the movement speed of the virtual lens in the posture control data of the virtual lens and based on the position offset of the virtual lens in the posture control data of the virtual lens;
[0062] and / or;
[0063] The rotation of the virtual lens is controlled according to the rotation speed of the virtual lens in the posture control data of the virtual lens and based on the direction offset of the virtual lens in the posture control data of the virtual lens.
[0064] On the other hand, an embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the virtual lens control method in the game provided by the embodiment of the present application is implemented.
[0065] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the virtual lens control method in the game provided by the embodiment of the present application is implemented.
[0066] The beneficial effects of the embodiments of the present application are as follows:
[0067] In an embodiment of the present application, by performing a posture control operation on the game control device, the virtual lens can be controlled based on the somatosensory control data corresponding to the posture control operation, thereby effectively solving the problem of low control efficiency of the virtual lens due to the relatively fixed rate at which the lens control component controls the virtual lens, thereby effectively improving the control efficiency of the virtual lens and the player's gaming experience. Moreover, in the process of performing a posture control operation on the game control device, by performing a first trigger operation on the lens control component, it is also possible to effectively prevent misoperation of the virtual lens, thereby further improving the player's gaming experience.
[0068] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description or be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0070] Figure 1 This is a schematic diagram of the system framework of the game control system in the embodiment of the present application;
[0071] Figure 2 This is a schematic diagram of an overview of a method for controlling a virtual camera in a game according to an embodiment of the present application;
[0072] Figure 3a This is a schematic diagram of the interactive process of the virtual camera control method in the game according to the embodiment of the present application;
[0073] Figure 3b This is a schematic diagram of pressing the right joystick of the handle in the embodiment of the present application;
[0074] Figure 3c This is a schematic diagram of rotating the handle while pressing the right joystick in the embodiment of the present application;
[0075] Figure 3d This is a schematic diagram of releasing the right joystick of the handle in an embodiment of the present application;
[0076] Figure 4 This is a functional structural diagram of a virtual camera control device in a game according to an embodiment of the present application;
[0077] Figure 5 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solutions and beneficial effects of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0079] To facilitate those skilled in the art to better understand the present application, the following is a brief introduction to the technical terms involved in the embodiments of the present application.
[0080] The terminal device is a front-end device that runs the game software and displays the game scene screen through a graphical user interface. In the embodiment of the present application, the terminal device can be but is not limited to: a laptop computer, a desktop computer, a smart TV, etc.
[0081] The game control device is an input device for controlling virtual characters and virtual lenses in the game. In the embodiment of the present application, the game control device can be but is not limited to: a game controller, a mouse and a keyboard, etc. The game control device is provided with multiple control components, and the functions of the multiple control components can be customized according to the player's operating habits. For example, taking the game controller as an example, the player can set the right joystick as the lens control component and the left remote control as the character control component, etc.
[0082] It should be noted that the terms "first", "second", "third", etc. mentioned in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "and / or" mentioned in this application describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0083] After introducing the technical terms involved in this application, the application scenarios and design concepts of the embodiments of this application are briefly introduced.
[0084] See Figure 1 As shown, game control devices 110 such as game controllers, mice, and keyboards, as external game devices, can establish communication connections with terminal devices 120 such as smart TVs, desktop computers, and laptops in a wired or wireless manner. After the communication connection between the game control device 110 and the terminal device 120 is established, the player can perform game operations through the game control device. For example, the player can control the position of the virtual character by manipulating the character control component on the game control device 110. For example, the player can also control the position of the virtual lens by manipulating the lens control component on the game control device 110. However, in the actual operation process, especially when controlling the virtual lens by manipulating the lens control component on the game control device 110, since the rate of controlling the virtual lens by the lens control component is relatively fixed, when encountering a crisis situation and requiring emergency and rapid control of the virtual lens, controlling the virtual lens by the lens control component will be relatively inefficient and will also reduce the player's gaming experience.
[0085] To this end, in an embodiment of the present application, in the process of executing game operations through a game control device, when it is determined that the virtual lens needs to be adjusted, a posture control operation can be performed on the game control device, so that the virtual lens can be controlled based on the somatosensory control data corresponding to the posture control operation, thereby effectively solving the problem of low control efficiency of the virtual lens due to the relatively fixed rate at which the lens control component controls the virtual lens, effectively improving the control efficiency of the virtual lens and the player's gaming experience. Moreover, in the process of executing the posture control operation on the game control device, a first trigger operation can also be performed on the lens control component, thereby effectively preventing misoperation of the virtual lens, thereby further improving the player's gaming experience.
[0086] After introducing the application scenarios and design concepts of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described in detail below.
[0087] The embodiment of the present application provides a method for controlling a virtual lens in a game. The method for controlling a virtual lens in a game can be applied to a terminal device. The terminal device can provide a graphical user interface and be connected to a game control device. The graphical user interface at least displays a game scene image captured by a virtual lens. Figure 2 As shown, the general process of the virtual camera control method in this game is as follows:
[0088] Step 201: receiving a first lens control instruction sent by a game control device; wherein the first lens control instruction is sent by the game control device in response to a first trigger operation on a lens control component and a posture control operation on the game control device.
[0089] In actual applications, players can select a control component from various control components on the game control device as a lens control component based on their operating habits. For example, using a game controller as an example, the player can set the right joystick as the lens control component. In addition, players can also select a control component from various control components on the game control device as a mode control component based on their operating habits. The mode control component can be the same as or different from the lens control component. For example, using a game controller as an example, the player can set the right joystick as both the lens control component and the mode control component. Furthermore, players can also set the control mode of the virtual lens through the mode control component based on their operating habits. Specifically, the player can perform a first trigger operation on the mode control component, for example, the player can perform a pressing operation on the mode control component; the game control device sends a first mode control instruction to the terminal device in response to the first trigger operation on the mode control component; upon receiving the first mode control instruction sent by the game control device, the terminal device sets the current control mode of the virtual lens to the somatosensory control mode based on the first mode control instruction.
[0090] Furthermore, after the player sets the current control mode of the virtual lens to the motion control mode, if the player determines that the virtual lens needs to be adjusted during game control, in one embodiment, the player can perform a first trigger operation on the lens control component and then perform a posture control operation on the game control device. That is, the posture control operation is a continuous operation after the first trigger operation. For example, the player can perform a pressing operation on the lens control component and then perform a rotation operation on the game control device. In response to the first trigger operation on the lens control component and the posture control operation on the game control device, the game control device sends a first lens control instruction to the terminal device. The terminal device receives the first lens control instruction sent by the game control device. In another embodiment, the player can also perform a posture control operation on the game control device while performing the first trigger operation on the lens control component. That is, the posture control operation is a concurrent operation of the first trigger operation. For example, the player can perform a pressing operation on the lens control component and then perform a rotation operation on the game control device. In response to the first trigger operation on the lens control component and the posture control operation on the game control device, the game control device sends a first lens control instruction to the terminal device. The terminal device receives the first lens control instruction sent by the game control device.
[0091] Step 202: Based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, determine the posture control data of the virtual lens, and based on the posture control data of the virtual lens, control the virtual lens to adjust the posture to display the game scene image captured after the virtual lens adjusts the posture in the graphical user interface.
[0092] In a specific implementation, when the terminal device determines the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, there may be but are not limited to the following three situations:
[0093] The first case: posture control operations include movement control operations.
[0094] In this case, the terminal device can determine the position offset of the virtual lens based on the position offset of the game control device in the somatosensory control data, and determine the movement speed of the virtual lens based on the movement speed of the game control device in the somatosensory control data.
[0095] The second case: the posture control operation includes the rotation control operation.
[0096] In this case, the terminal device can determine the direction offset of the virtual lens based on the rotation offset of the game control device in the somatosensory control data, and determine the rotation speed of the virtual lens based on the rotation speed of the game control device in the somatosensory control data.
[0097] The third case: the posture control operation includes movement control operation and rotation control operation.
[0098] In this case, the terminal device can determine the position offset of the virtual lens based on the position offset of the game control device in the somatosensory control data, and determine the movement speed of the virtual lens based on the movement speed of the game control device in the somatosensory control data; and determine the direction offset of the virtual lens based on the rotation offset of the game control device in the somatosensory control data, and determine the rotation speed of the virtual lens based on the rotation speed of the game control device in the somatosensory control data.
[0099] Furthermore, after the terminal device determines the virtual lens's posture control data based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, it can control the virtual lens to adjust its posture based on the virtual lens's posture control data. Accordingly, when the terminal device controls the virtual lens to adjust its posture based on the virtual lens's posture control data, the following three situations may exist, but are not limited to:
[0100] The first case: the pose control data of the virtual lens includes position offset and movement speed.
[0101] In this case, the terminal device can control the movement of the virtual lens according to the movement speed of the virtual lens in the virtual lens posture control data and based on the position offset of the virtual lens in the virtual lens posture control data.
[0102] The second case: the pose control data of the virtual lens includes direction offset and rotation speed.
[0103] In this case, the terminal device may control the rotation of the virtual lens according to the rotation speed of the virtual lens in the posture control data of the virtual lens and based on the direction offset of the virtual lens in the posture control data of the virtual lens.
[0104] The third case: the posture control data of the virtual lens includes position offset and movement speed, direction offset and rotation speed.
[0105] In this case, the terminal device can control the movement of the virtual lens according to the movement speed of the virtual lens in the virtual lens posture control data and based on the position offset of the virtual lens in the virtual lens posture control data, and control the rotation of the virtual lens according to the rotation speed of the virtual lens in the virtual lens posture control data and based on the direction offset of the virtual lens in the virtual lens posture control data.
[0106] Furthermore, after the terminal device controls the virtual lens to adjust its posture based on the posture control data of the virtual lens, the game scene image captured after the virtual lens adjusts its posture can be displayed in the graphical user interface.
[0107] In an embodiment of the present application, the player can effectively prevent misoperation of the virtual lens while realizing virtual lens control based on somatosensory control data by performing a first trigger operation on the lens control component and a posture control operation on the game control device. Of course, the player can also realize virtual lens control based on operation control data by performing a second trigger operation on the lens control component. Specifically, if the current control mode of the virtual lens is the somatosensory control mode, the player can first perform a second trigger operation on the mode control component. For example, the player can perform a second trigger operation such as a long press operation or a double-click operation on the mode control component; the game control device responds to the second trigger operation on the mode control component and sends a second mode control instruction to the terminal device; when the terminal device receives the second mode control instruction sent by the game control device, based on the second mode control instruction, the current control mode of the virtual lens is switched from the somatosensory control mode to the component control mode. Afterwards, the player can perform a second trigger operation on the lens control component. For example, the player can perform a second trigger operation on the lens control component, such as a long press operation, a push operation at any angle, etc.; the game control device responds to the second trigger operation on the lens control component and sends a second lens control instruction to the terminal device; when the terminal device receives the second lens control instruction sent by the game control device, it determines the posture control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction, and controls the virtual lens to adjust the posture based on the posture control data of the virtual lens, so as to display the game scene screen captured after the virtual lens adjusts the posture in the graphical user interface.
[0108] In actual applications, when the terminal device determines the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction, there may be but are not limited to the following three situations:
[0109] The first case: the operation control data includes the control direction and control speed of the lens control component.
[0110] In this case, the terminal device can determine the directional offset of the virtual lens based on the control direction of the lens control component in the operation control data, and adjust the rotation speed of the virtual lens according to the set multiple based on the control speed of the lens control component in the operation control data.
[0111] The second case: the operation control data includes the operation duration and operation speed of the lens control component.
[0112] In this case, the terminal device can determine the displacement offset of the virtual lens based on the operation duration of the lens control component in the operation control data, and adjust the movement speed of the virtual lens according to the set multiple based on the operation speed of the lens control component in the operation control data.
[0113] The second case: the operation control data includes the control direction, control duration and control speed of the lens control component.
[0114] In this case, the terminal device can determine the directional offset of the virtual lens based on the control direction of the lens control component in the operation control data, determine the displacement offset of the virtual lens based on the control duration of the lens control component in the operation control data, and adjust the control speed of the virtual lens according to the set multiple based on the control speed of the lens control component in the operation control data.
[0115] Furthermore, after the terminal device determines the virtual lens's pose control data based on the somatosensory control data corresponding to the pose control operation in the second lens control instruction, it can then control the virtual lens to adjust its pose based on the pose control data. The specific adjustment method is the same as described above, and any repetitions will not be repeated here.
[0116] In actual applications, a game controller is a common game control device that is equipped with multiple control components such as a cross key, a left joystick, a right joystick, and ABXY function keys. Players can control the game by manipulating the various control components on the game controller. For example, players can control the virtual camera to rotate 360 degrees by pushing the right joystick on the game controller in the 360-degree direction. However, during actual operation, since the speed of controlling the virtual camera through the lens control component is relatively fixed, when encountering a crisis situation and requiring urgent and rapid control of the virtual camera, controlling the virtual camera through the lens control component is relatively inefficient and also reduces the player's gaming experience. Therefore, the virtual camera control method provided in the embodiment of the present application can be used to achieve efficient virtual camera control.
[0117] Next, the virtual camera control method in the game provided by the embodiment of the present application is further described in detail with the specific application scenario of "the game control device is a game controller", see Figure 3a As shown, the interactive process of the virtual camera control method in the game provided by the embodiment of the present application is as follows:
[0118] Step 301: The game controller sends a first mode control instruction to the terminal device in response to the first mode trigger operation on the right joystick. The first mode trigger operation can be as follows: Figure 3b The operation of pressing the right joystick is shown.
[0119] Step 302: When the terminal device receives the first mode control instruction sent by the game controller, the terminal device sets the current control mode of the virtual lens to the somatosensory control mode based on the first mode control instruction.
[0120] Step 303: The game controller sends a first lens control instruction to the terminal device in response to the first lens control operation on the right joystick and the posture control operation on the game controller that are executed simultaneously. The first lens control operation and the posture control operation that are executed simultaneously can be as follows: Figure 3c As shown, long press the right joystick while rotating the game controller to the lower right.
[0121] Step 304: When the terminal device receives the first lens control command sent by the game controller, it determines the virtual lens's posture control data based on the somatosensory control data corresponding to the posture control operation in the first lens control command. The specific determination method is the same as described above, and the repeated parts are not repeated here.
[0122] Step 305: The terminal device controls the virtual lens to adjust its position based on the virtual lens position control data, so as to display the captured game scene image after the virtual lens adjusts its position in the graphical user interface. The specific control method is the same as described above, and the repeated parts are not repeated here.
[0123] Step 306: The game controller responds to the second mode trigger operation on the right joystick and sends a second mode control instruction to the terminal device. The second mode trigger operation can be as follows: Figure 3d The operation of releasing the right joystick is shown.
[0124] Step 307: When the terminal device receives the second mode control instruction sent by the game controller, the terminal device switches the current control mode of the virtual lens from the somatosensory control mode to the component control mode based on the second mode control instruction.
[0125] Step 308: The game controller sends a second lens control instruction to the terminal device in response to the second lens triggering operation on the right joystick, wherein the second lens triggering operation can be a push operation at any angle on the right joystick.
[0126] Step 309: When the terminal device receives the second lens control instruction sent by the game controller, it determines the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction. The specific determination method is the same as described above, and the repeated parts are not repeated here.
[0127] Step 310: The terminal device controls the virtual lens to adjust its posture based on the posture control data of the virtual lens, so as to display the game scene image captured after the virtual lens adjusts its posture in the graphical user interface.
[0128] Based on the above embodiments, the present application provides a virtual camera control device for a game, wherein the virtual camera control device provides a graphical user interface and is connected to a game control device, wherein the graphical user interface at least displays a game scene image captured by the virtual camera. Figure 4 As shown, the virtual camera control device 400 provided in the embodiment of the present application in the game includes at least:
[0129] A first receiving unit 401 is configured to receive a lens control instruction sent by a game control device; wherein the lens control instruction is sent by the game control device in response to a first triggering operation on the lens control component and a posture control operation on the game control device;
[0130] A first determining unit 402 is configured to determine the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the lens control instruction;
[0131] The lens control unit 403 is used to control the virtual lens to adjust its posture based on the posture control data of the virtual lens, so as to display the game scene image captured after the virtual lens adjusts its posture in the graphical user interface.
[0132] In a possible implementation, the virtual camera control device 400 in the game provided by the embodiment of the present application further includes:
[0133] A second receiving unit 404 is configured to receive a first mode control instruction sent by the game control device, wherein the first mode control instruction is sent by the game control device in response to a first trigger operation on the mode control component;
[0134] The mode control unit 405 is configured to set the current control mode of the virtual lens to the somatosensory control mode based on the first mode control instruction.
[0135] In a possible implementation, when receiving the first lens control instruction sent by the game control device, the first receiving unit 401 is specifically configured to:
[0136] A simultaneous control instruction sent by the game control device is received as a first lens control instruction; wherein the simultaneous control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device that are simultaneously executed.
[0137] In a possible implementation, when receiving the first lens control instruction sent by the game control device, the first receiving unit 401 is specifically configured to:
[0138] Receive a continuous control instruction sent by a game control device as a first lens control instruction; wherein the continuous control instruction is sent by the game control device in response to a first trigger operation on a lens control component and a posture control operation on the game control device that are continuously executed, and the posture control operation is a continuous operation after the first trigger operation.
[0139] In a possible implementation, when determining the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, the first determining unit 402 is specifically configured to:
[0140] Determining a position offset of the virtual lens based on a position offset of the game control device in the somatosensory control data, and determining a movement speed of the virtual lens based on a movement speed of the game control device in the somatosensory control data;
[0141] and / or;
[0142] The direction offset of the virtual lens is determined based on the rotation offset of the game control device in the somatosensory control data, and the rotation speed of the virtual lens is determined based on the rotation speed of the game control device in the somatosensory control data.
[0143] In a possible implementation, the virtual camera control device 400 in the game provided by the embodiment of the present application further includes:
[0144] A third receiving unit 406 is configured to receive a second mode control instruction sent by the game control device; wherein the second mode control instruction is sent by the game control device in response to a second trigger operation on the mode control component;
[0145] The mode control unit 405 is configured to switch the current control mode of the virtual lens from the somatosensory control mode to the component control mode based on the second mode control instruction.
[0146] In a possible implementation, the virtual camera control device 400 in the game provided by the embodiment of the present application further includes:
[0147] The fourth receiving unit 407 is configured to receive a second lens control instruction sent by the game control device; wherein the second lens control instruction is sent by the game control device in response to a second trigger operation on the lens control component;
[0148] A second determining unit 408 is configured to determine the position and posture control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction;
[0149] The lens control unit 403 is used to control the virtual lens to adjust its posture based on the posture control data of the virtual lens, so as to display the game scene image captured after the virtual lens adjusts its posture in the graphical user interface.
[0150] In a possible implementation, when determining the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction, the second determining unit 408 is specifically configured to:
[0151] Determining a direction offset of the virtual lens based on a control direction of the lens control component in the operation control data, and adjusting a rotation speed of the virtual lens according to a set multiple based on a control speed of the lens control component in the operation control data;
[0152] and / or;
[0153] Based on the operation duration of the lens control component in the operation control data, the displacement offset of the virtual lens is determined, and based on the operation speed of the lens control component in the operation control data, the movement speed of the virtual lens is adjusted according to the set multiple.
[0154] In a possible implementation, when controlling the virtual lens to adjust its posture based on the posture control data of the virtual lens, the lens control unit 403 is specifically configured to:
[0155] controlling the movement of the virtual lens according to the movement speed of the virtual lens in the posture control data of the virtual lens and based on the position offset of the virtual lens in the posture control data of the virtual lens;
[0156] and / or;
[0157] The rotation of the virtual lens is controlled according to the rotation speed of the virtual lens in the posture control data of the virtual lens and based on the direction offset of the virtual lens in the posture control data of the virtual lens.
[0158] It should be noted that the principle of solving the technical problem of the virtual lens control device 400 in the game provided by the embodiment of the present application is similar to the virtual lens control method in the game provided by the embodiment of the present application. Therefore, the implementation of the virtual lens control device 400 in the game provided by the embodiment of the present application can refer to the implementation of the virtual lens control method in the game provided by the embodiment of the present application, and the repeated parts will not be repeated.
[0159] After introducing the virtual camera control method and device in the game provided by the embodiment of the present application, the electronic device provided by the embodiment of the present application is briefly introduced next.
[0160] See Figure 5 As shown, the electronic device 500 provided in the embodiment of the present application includes at least: a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program, the virtual lens control method in the game provided in the embodiment of the present application is implemented.
[0161] The electronic device 500 provided in the embodiment of the present application may further include a bus 503 connecting different components (including the processor 501 and the memory 502). The bus 503 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, and the like.
[0162] The memory 502 may include a readable storage medium in the form of a volatile memory, such as a random access memory (RAM) 5021 and / or a cache memory 5022, and may further include a read-only memory (ROM) 5023. The memory 502 may also include a program tool 5025 having a set (at least one) of program modules 5024. The program modules 5024 include, but are not limited to, an operating subsystem, one or more application programs, other program modules, and program data. Each of these examples or some combination thereof may include the implementation of a network environment.
[0163] The processor 501 can be a single processing element or a collective term for multiple processing elements. For example, the processor 501 can be a central processing unit (CPU) or one or more integrated circuits configured to implement the in-game virtual camera control method provided in the embodiments of the present application. Specifically, the processor 501 can be a general-purpose processor, including but not limited to a CPU, an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0164] The electronic device 500 can communicate with one or more external devices 504 (e.g., keyboard, remote control, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 500 (e.g., mobile phone, computer, etc.), and / or communicate with any device that enables the electronic device 500 to communicate with one or more other electronic devices 500 (e.g., router, modem, etc.). Such communication can be performed through an input / output (I / O) interface 505. In addition, the electronic device 500 can 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) through a network adapter 506. Figure 5As shown, the network adapter 506 communicates with other modules of the electronic device 500 via the bus 503. Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) subsystems, tape drives, and data backup storage subsystems.
[0165] It should be noted that Figure 5 The electronic device 500 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0166] The following describes the computer-readable storage medium provided in the embodiments of the present application. The computer-readable storage medium provided in the embodiments of the present application stores computer instructions that, when executed by a processor, implement the in-game virtual camera control method provided in the embodiments of the present application. Specifically, the computer instructions may be built into or installed within the processor. Thus, the processor can implement the in-game virtual camera control method provided in the embodiments of the present application by executing the built-in or installed computer instructions.
[0167] In addition, the virtual lens control method for the game provided by the embodiment of the present application can also be implemented as a computer program product, which includes program code. When the program code runs on a processor, it implements the virtual lens control method for the game provided by the embodiment of the present application.
[0168] The computer program product provided in the embodiments of the present application may adopt one or more computer-readable storage media, and the computer-readable storage medium may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. Specifically, more specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, Erasable Programmable Read Only Memory (EPROM), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
[0169] The computer program product provided in the embodiments of the present application may use a CD-ROM and include program code, and may also be run on electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, virtual reality (VR) devices, augmented reality (AR) devices, etc. However, the computer program product provided in the embodiments of the present application is not limited thereto. In the embodiments of the present application, the computer-readable storage medium may be any tangible medium that contains or stores program code, and the program code may be used by or in combination with an instruction execution system, apparatus, or device.
[0170] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.
[0171] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0172] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0173] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include such modifications and variations.
Claims
1. A method for controlling a virtual camera in a game, characterized in that: A graphical user interface is provided by a terminal device and the terminal device is connected to a game control device, wherein the graphical user interface at least displays a game scene image captured by a virtual camera, and the virtual camera control method in the game includes: receiving a first lens control instruction sent by the game control device; wherein the first lens control instruction is sent by the game control device in response to a first trigger operation on a lens control component and a posture control operation on the game control device; Based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction, the posture control data of the virtual lens is determined, and based on the posture control data of the virtual lens, the virtual lens is controlled to adjust the posture so as to display the game scene image captured after the virtual lens adjusts the posture in the graphical user interface; the first trigger operation is used to prevent erroneous operation of the virtual lens while controlling the virtual lens based on the somatosensory control data.
2. The method for controlling a virtual camera in a game according to claim 1, wherein: Before receiving the first lens control instruction sent by the game control device, the method further includes: receiving a first mode control instruction sent by the game control device; wherein the first mode control instruction is sent by the game control device in response to a first trigger operation on a mode control component; Based on the first mode control instruction, the current control mode of the virtual lens is set to a somatosensory control mode.
3. The method for controlling a virtual camera in a game according to claim 1, wherein: Receiving a first lens control instruction sent by the game control device includes: A simultaneous control instruction sent by the game control device is received as the first lens control instruction; wherein the simultaneous control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device being executed simultaneously.
4. The method for controlling a virtual camera in a game according to claim 1, wherein: Receiving a first lens control instruction sent by the game control device includes: Receive a continuous control instruction sent by the game control device as the first lens control instruction; wherein the continuous control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device that are continuously executed, and the posture control operation is a continuous operation after the first trigger operation.
5. The method for controlling a virtual camera in a game according to claim 1, wherein: Determining the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the first lens control instruction includes: determining a position offset of the virtual lens based on a position offset of the game control device in the somatosensory control data, and determining a movement speed of the virtual lens based on a movement speed of the game control device in the somatosensory control data; and / or; The direction offset of the virtual lens is determined based on the rotation offset of the game control device in the somatosensory control data, and the rotation speed of the virtual lens is determined based on the rotation speed of the game control device in the somatosensory control data.
6. The method for controlling a virtual camera in a game according to claim 1, wherein: Also includes: receiving a second mode control instruction sent by the game control device; wherein the second mode control instruction is sent by the game control device in response to a second trigger operation on the mode control component; Based on the second mode control instruction, the current control mode of the virtual lens is switched from the body sensing control mode to the component control mode.
7. The method for controlling a virtual camera in a game according to claim 6, wherein: Also includes: receiving a second lens control instruction sent by the game control device; wherein the second lens control instruction is sent by the game control device in response to a second trigger operation on the lens control component; Based on the operation control data of the lens control component in the second lens control instruction, the posture control data of the virtual lens is determined, and based on the posture control data of the virtual lens, the virtual lens is controlled to adjust the posture so as to display the game scene picture captured after the virtual lens adjusts the posture in the graphical user interface.
8. The method for controlling a virtual camera in a game according to claim 7, wherein: Determining the position control data of the virtual lens based on the operation control data of the lens control component in the second lens control instruction includes: determining a direction offset of the virtual lens based on a control direction of the lens control component in the operation control data, and adjusting a rotation speed of the virtual lens according to a set magnification based on a control speed of the lens control component in the operation control data; and / or; The displacement offset of the virtual lens is determined based on the operation duration of the lens control component in the operation control data, and the movement speed of the virtual lens is adjusted according to a set multiple based on the operation speed of the lens control component in the operation control data.
9. The method for controlling a virtual camera in a game according to any one of claims 1 to 8, wherein: Controlling the virtual lens to adjust its posture based on the posture control data of the virtual lens includes: controlling the movement of the virtual lens according to the movement speed of the virtual lens in the posture control data of the virtual lens and based on the position offset of the virtual lens in the posture control data of the virtual lens; and / or; The rotation of the virtual lens is controlled according to the rotation speed of the virtual lens in the posture control data of the virtual lens and based on the direction offset of the virtual lens in the posture control data of the virtual lens.
10. A virtual camera control device in a game, characterized in that: The virtual camera control device in the game provides a graphical user interface and is connected to a game control device, wherein the graphical user interface at least displays a game scene image captured by the virtual camera. The virtual camera control device in the game includes: an instruction receiving unit, configured to receive a lens control instruction sent by the game control device; wherein the lens control instruction is sent by the game control device in response to a first trigger operation on the lens control component and a posture control operation on the game control device; A lens control unit is used to determine the posture control data of the virtual lens based on the somatosensory control data corresponding to the posture control operation in the lens control instruction, and control the virtual lens to adjust the posture based on the posture control data of the virtual lens so as to display the game scene image captured after the virtual lens adjusts the posture in the graphical user interface; the first trigger operation is used to prevent erroneous operation of the virtual lens while controlling the virtual lens based on the somatosensory control data.
11. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for controlling a virtual lens in a game as described in any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for controlling a virtual camera in a game according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Character of somatosensory handle with touch pad and lens control method
CN108854054A
Method and device for controlling virtual lens in game
CN109718548A