Method and device for observing virtual article in virtual environment, and readable storage medium
Patent Information
- Application Number
- AE20216001836
- Authority / Receiving Office
- AE · AE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-04-11
- Filing Date
- 2020-03-17
- Estimated Expiration
- 2040-03-17
AI Technical Summary
In the virtual environment, there is often a problem of low accuracy in perspective rotation during the picking up of virtual items.
By adjusting the rotation wheelbase, matching the parameters of the viewing angle rotation operation with the object observation conditions, and adjusting the distance between the observation point and the rotation center to improve rotation flexibility and breadth of the field of view, ensuring accurate observation of virtual items.
It improves the accuracy and flexibility of virtual item observation, avoids the problem of accidentally touching the rotation wheelbase adjustment, and provides a wider field of view to facilitate the observation of virtual items.
Smart Images

Figure ABST_ABST
Abstract
Description
Methods, apparatus, and readable storage media for observing virtual objects in a virtual environment
[0001] This application claims priority to Chinese Patent Application No. 201910290579.2, filed on April 11, 2019, entitled “Method, Apparatus and Readable Storage Medium for Observing Virtual Items in a Virtual Environment”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computers, and in particular to a method, apparatus, and readable storage medium for observing virtual items in a virtual environment. Background Technology
[0003] In applications that include virtual environments, it is often necessary to control virtual objects within the virtual environment to perform activities such as walking, driving, swimming, fighting, and picking up items. Picking up items refers to controlling virtual objects to pick up virtual items within the virtual environment.
[0004] In related technologies, during the process of picking up virtual items, the virtual object first needs to observe the position of the virtual item by looking down, and then move to the side of the virtual item according to its position. After selecting the target virtual item, the virtual item can be picked up.
[0005] However, the above methods often suffer from low accuracy in viewpoint rotation during virtual item pickup.
[0006] Summary of the Invention
[0007] According to various embodiments provided in this application, a method, apparatus, and readable storage medium for observing virtual items in a virtual environment are provided.
[0008] On the one hand, a method for observing virtual objects in a virtual environment is provided, executed by a computer device, the method comprising:
[0009] Display a first environment interface, which includes a view of the virtual environment being rotated and observed with a first rotation axis distance, where the first rotation axis distance is the distance between the observation point of the virtual object and the rotation center.
[0010] Receive viewpoint rotation operation, the viewpoint rotation operation being used to rotate the observation point around the rotation center;
[0011] When the operating parameters of the viewpoint rotation operation meet the object observation conditions, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center; and
[0012] The second environment interface is displayed, which includes a view of the virtual objects in the virtual environment being rotated and observed with the second rotation axis.
[0013] On the other hand, a device for observing virtual objects in a virtual environment is provided, the device comprising:
[0014] The display module is used to display a first environment interface, which includes a screen when the virtual environment is rotated and observed with a first rotation axis distance, where the first rotation axis distance is the distance between the observation point of the virtual object and the rotation center.
[0015] A receiving module is used to receive a viewpoint rotation operation, wherein the viewpoint rotation operation is used to rotate the observation point around the rotation center;
[0016] The adjustment module is used to adjust the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center when the operation parameters of the view rotation operation meet the object observation conditions.
[0017] and
[0018] The display module is also used to display a second environment interface, which includes a view of virtual objects in the virtual environment being rotated and observed with the second rotation axis.
[0019] On the other hand, a computer device is provided, including a memory and a processor, wherein the memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform a method for observing virtual items in a virtual environment as provided in the embodiments of this application.
[0020] On the other hand, one or more non-volatile storage media storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the observation method of virtual items in a virtual environment as provided in the embodiments of this application.
[0021] On the other hand, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to execute the observation method of virtual items in a virtual environment as provided in the above embodiments of this application.
[0022] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features, objects, and advantages of this application will become apparent from the specification, drawings, and claims. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 is a schematic diagram of the observation mode of a camera model provided in an exemplary embodiment of this application;
[0025] Figure 2 is a schematic diagram showing the correspondence between rotational axis distance and rotational range provided in an exemplary embodiment of this application;
[0026] Figure 3 is a structural block diagram of a terminal provided in an exemplary embodiment of this application;
[0027] Figure 4 is a schematic diagram of the implementation environment provided by an exemplary embodiment of this application;
[0028] Figure 5 is a flowchart of a method for observing virtual items in a virtual environment provided in an exemplary embodiment of this application;
[0029] Figure 6 is a schematic diagram of the interface for observing the items based on the embodiment shown in Figure 5;
[0030] Figure 7 is a schematic diagram of another article observation condition provided based on the embodiment shown in Figure 5;
[0031] Figure 8 is a schematic diagram of the interface of a method for observing virtual items in a virtual environment provided in an exemplary embodiment of this application;
[0032] Figure 9 is a flowchart of a method for observing virtual items in a virtual environment provided in another exemplary embodiment of this application;
[0033] Figure 10 is a schematic diagram showing the correspondence between the rotation axes of the virtual objects in the standing and driving states provided in the embodiment shown in Figure 9.
[0034] Figure 11 is a flowchart of a method for observing virtual items in a virtual environment provided in another exemplary embodiment of this application;
[0035] Figure 12 is a flowchart of a method for observing virtual items in a virtual environment provided in another exemplary embodiment of this application;
[0036] Figure 13 is a structural block diagram of an observation device for virtual items in a virtual environment provided in an exemplary embodiment of this application;
[0037] Figure 14 is a structural block diagram of an observation device for virtual items in a virtual environment provided in another exemplary embodiment of this application; and
[0038] Figure 15 is a structural block diagram of a terminal provided in another exemplary embodiment of this application. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0040] First, a brief introduction to the terms used in the embodiments of this application:
[0041] Rotation axis distance: This refers to the distance between the observation point and the rotation center when rotating to observe a virtual environment. Optionally, when observing a virtual environment, a camera model simulates shooting the virtual environment from the observation point, capturing images of the virtual environment to achieve observation. In this case, the rotation axis distance refers to the distance between the camera model and its rotation center. Optionally, the rotation axis distance can be changed by keeping the relative position of the camera model and the virtual object constant while adjusting the position of the rotation center. This change in rotation axis distance is mainly used to adjust the rotation flexibility of the camera model. Illustratively, when the rotation axis distance is smaller, the rotation flexibility is higher; under the same screen sliding operation, the camera model rotates a larger angle, resulting in a wider range of observation of the virtual environment.
[0042] Camera model: This refers to a 3D model located around virtual objects in a virtual environment. When observing the virtual environment from a first-person perspective, the camera model is located near or at the head of the virtual object. When observing the virtual environment from a third-person perspective, the camera model can be located behind the virtual object and bound to it, or it can be located at any position at a preset distance from the virtual object. The camera model allows observation of virtual objects in the 3D virtual environment from different angles. Optionally, when the third-person perspective is a first-person over-the-shoulder perspective, the camera model is located behind the virtual object (such as the head and shoulders of a virtual character). Optionally, the camera model is not actually displayed in the 3D virtual environment; that is, it cannot be recognized in the 3D virtual environment displayed in the user interface.
[0043] Taking the camera model located at an arbitrary position at a preset distance from the virtual object as an example, optionally, one camera model corresponds to one virtual object. The camera model can rotate around the virtual object as the rotation center, such as rotating the camera model around any point of the virtual object as the rotation center. During the rotation, the camera model not only rotates in angle but also shifts in displacement. The distance between the camera model and the rotation center remains unchanged during rotation, that is, the camera model is rotated on the surface of a sphere with the rotation center as the center. Here, any point of the virtual object can be the head, torso, or any point around the virtual object. This embodiment does not limit this. Optionally, when the camera model observes the virtual object, the viewing direction of the camera model is the direction from the perpendicular line on the tangent plane of the sphere where the camera model is located to the virtual object.
[0044] Optionally, the camera model can also observe the virtual object from different directions at preset angles.
[0045] Schematic illustration, referring to Figure 1, a point is defined within the virtual object 11 as the rotation center 12. The camera model rotates around this rotation center 12. Optionally, the camera model is configured with an initial position, which is located above and behind the virtual object (e.g., behind the head). Schematic illustration, as shown in Figure 1, this initial position is position 13. When the camera model rotates to position 14 or position 15, the camera model's viewing angle changes accordingly.
[0046] Referring to Figure 1, the adjustment of the rotation axis distance is explained as follows: As shown in Figure 2, the position of the nose of the virtual object 200 is the position of the camera model 210 (taking a first-person perspective as an example). The rotation center 221 is located as shown in Figure 2. The camera model 210 rotates around this rotation center 221. Before the axis distance adjustment, the first rotation axis distance of the camera model 210 is the distance between the camera model 210 and the rotation center 221. The rotation range of the camera model 210 before the axis distance adjustment is shown as the dashed spherical range in Figure 2. After adjusting the position of the rotation center 221 to the position of the rotation center 222, the second rotation axis distance is the distance between the camera model 210 and the rotation center 222. The rotation range of the camera model 210 after the axis distance adjustment is shown as the solid spherical range in Figure 2.
[0047] The terminal in this application can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, etc. The terminal has an application that supports virtual environments installed and running, such as an application that supports 3D virtual environments. This application can be any of the following: a virtual reality application, a 3D mapping application, a military simulation application, a TPS game, an FPS game, or a MOBA game. Optionally, the application can be a standalone application, such as a standalone 3D game application, or a network-based online application.
[0048] Figure 3 shows a structural block diagram of an electronic device provided in an exemplary embodiment of this application. The electronic device 300 includes an operating system 320 and an application program 322.
[0049] Operating system 320 is the foundational software that provides secure access to computer hardware for application program 322.
[0050] Application 322 is an application that supports a virtual environment. Optionally, application 322 is an application that supports a three-dimensional virtual environment. Application 322 can be any of the following: virtual reality application, 3D mapping application, military simulation application, third-person shooter (TPS) game, first-person shooter (FPS) game, MOBA game, or multiplayer shooting survival game. Application 322 can also be a standalone application, such as a standalone 3D game application.
[0051] Figure 4 shows a structural block diagram of a computer system provided in an exemplary embodiment of this application. The computer system 400 includes: a first device 420, a server 440, and a second device 460.
[0052] The first device 420 has an application installed and running that supports a virtual environment. This application can be any of the following: a virtual reality application, a 3D mapping application, a military simulation application, a TPS game, an FPS game, a MOBA game, or a multiplayer shooting survival game. The first device 420 is the device used by the first user, who uses the first device 420 to control a first virtual object located in the virtual environment to perform activities, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, or throwing at least one of these. Illustratively, the first virtual object is a first virtual character, such as a realistic or anime character.
[0053] The first device 420 is connected to the server 440 via a wireless network or a wired network.
[0054] Server 440 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 440 is used to provide background services for applications supporting a three-dimensional virtual environment. Optionally, server 440 undertakes the primary computing work, and the first device 420 and the second device 460 undertake secondary computing work; or, server 440 undertakes secondary computing work, and the first device 420 and the second device 460 undertake primary computing work; or, server 440, the first device 420, and the second device 460 collaborate on computing using a distributed computing architecture.
[0055] The second device 460 has an application installed and running that supports a virtual environment. This application can be any of the following: a virtual reality application, a 3D mapping application, a military simulation application, an FPS game, a MOBA game, or a multiplayer shooting survival game. The second device 460 is a device used by a second user, who uses the second device 460 to control a second virtual object located in the virtual environment to perform activities, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up items, shooting, attacking, and throwing at least one of these. Illustratively, the second virtual object is a second virtual character, such as a realistic or anime character.
[0056] Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character can belong to the same team, the same organization, have a friend relationship, or have temporary communication permissions. Optionally, the first virtual character and the second virtual character can also belong to different teams, different organizations, or two hostile groups.
[0057] Optionally, the applications installed on the first device 420 and the second device 460 are the same, or the applications installed on the two devices are the same type of application from different control system platforms. The first device 420 can refer to one of multiple devices, and the second device 460 can refer to one of multiple devices; this embodiment only uses the first device 420 and the second device 460 as examples. The device types of the first device 420 and the second device 460 may be the same or different, and these device types include at least one of the following: game console, desktop computer, smartphone, tablet computer, e-book reader, MP3 player, MP4 player, and laptop computer. The following embodiment uses a desktop computer as an example.
[0058] Those skilled in the art will understand that the number of the aforementioned devices can be more or less. For example, there may be only one device, or there may be dozens or hundreds of devices, or even more. This application does not limit the number or type of devices.
[0059] Based on the above brief introduction of terms and description of the implementation environment, the method for observing virtual items in a virtual environment provided in this application embodiment will be described, taking the application of this method in a terminal as an example. As shown in Figure 5, the method includes:
[0060] Step 501: Display the first environment interface, which includes a view of the virtual environment being rotated and observed with a first rotation axis.
[0061] Optionally, the first rotation axis distance is the distance between the observation point of the virtual object and the rotation center. Optionally, the observation point is achieved by capturing images of the virtual environment through a camera model, that is, the first rotation axis distance is the distance between the camera model and the rotation center.
[0062] Optionally, during the process of rotating and observing the virtual environment through the camera model, the virtual environment can be observed by means of synchronous rotation of the camera model and the virtual object. That is, the position of the camera model is bound to the position of the virtual object, and the virtual object rotates synchronously with the rotation of the camera model. Alternatively, the camera model can be observed by rotating independently. That is, the virtual object keeps its position and facing direction unchanged, and the camera model observes the virtual environment by rotating.
[0063] Optionally, the first rotational axis is the default axis when observing the virtual environment.
[0064] Optionally, the motion state of the virtual object includes any one of the following: standing, running, walking, driving, riding, or swimming. Optionally, the length of the first rotation axis varies depending on the motion state of the virtual object. The driving and riding states can also be combined into a single state, for example, the riding and driving states can be combined into a single driving state.
[0065] Optionally, the perspective when observing the virtual environment can be either a first-person perspective or a third-person perspective. Optionally, the first rotation axis length corresponds to different perspectives.
[0066] Optionally, considering the motion state of the virtual object and the perspective of the observer when viewing the virtual environment, the length of the first rotation axis varies for different combinations of motion states and perspectives. For an illustrative representation of the correspondence between perspective, motion state, and the length of the first rotation axis, please refer to Table 1 below:
[0067] Table 1
[0068]
[0069] Where x1 represents the horizontal axis distance when the virtual object is standing and viewed from a first-person perspective; y1 represents the vertical axis distance when the virtual object is standing and viewed from a first-person perspective; x2 represents the horizontal axis distance when the virtual object is standing and viewed from a third-person perspective; y3 represents the horizontal axis distance when the virtual object is driving and viewed from a first-person perspective; and y4 represents the vertical axis distance when the virtual object is driving and viewed from a first-person perspective. The distances are as follows: x4 represents the horizontal axis distance when the virtual object is in driving mode and viewing the virtual environment from a third-person perspective; y4 represents the vertical axis distance when the virtual object is in driving mode and viewing the virtual environment from a third-person perspective; x5 represents the horizontal axis distance when the virtual object is in swimming mode and viewing the virtual environment from a first-person perspective; y5 represents the vertical axis distance when the virtual object is in swimming mode and viewing the virtual environment from a first-person perspective; x6 represents the horizontal axis distance when the virtual object is in swimming mode and viewing the virtual environment from a third-person perspective; y6 represents the vertical axis distance when the virtual object is in swimming mode and viewing the virtual environment from a third-person perspective.
[0070] Step 502: Receive view rotation operation.
[0071] Optionally, this viewpoint rotation operation is used to rotate the observation point around the rotation center.
[0072] Optionally, the view rotation operation can be implemented in at least one of the following ways:
[0073] First, the method is applied to mobile terminals including touch screens, and the view rotation operation is achieved by sliding on the touch screen;
[0074] Optionally, the sliding operation on the touch screen can be performed on the left half of the touch screen, the right half of the touch screen, or any position on the touch screen. The specific position of the sliding operation is determined according to the setting parameters that control the rotation of the viewing angle.
[0075] Second, this method is applied to mobile terminals that include gyroscopes. By swinging the terminal to control the rotation of the gyroscope, the rotation of the viewpoint can be achieved.
[0076] Third, when this method is applied to desktop computers and portable laptops, the view rotation operation is achieved by inputting through external input devices, such as by inputting direction control signals through the keyboard.
[0077] Step 503: When the operation parameters of the viewpoint rotation operation meet the conditions for observing the object, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center.
[0078] Optionally, the item observation condition is used to represent the conditions corresponding to observing virtual items in a virtual environment.
[0079] Optionally, the operating parameter includes the operating angle. When the operating angle is within the target angle range, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center.
[0080] Optionally, the operating parameters also include the operating distance. When the operating angle is within the target angle range and the operating distance reaches the target distance, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center.
[0081] Optionally, the operation parameters also include the presence of virtual items within a preset distance range of the virtual object in the virtual environment. When the operation angle is within the preset angle range and a virtual item exists within the preset distance range of the virtual object in the virtual environment, the first rotation axis is adjusted to the second rotation axis by adjusting the position of the rotation center. Optionally, the virtual item is located within a preset distance range in the direction the virtual object is facing. That is, when the operation angle is within the preset angle range, and a virtual item exists within the direction the virtual object is facing and the preset distance range of the virtual object, the first rotation axis is adjusted to the second rotation axis by adjusting the position of the rotation center. Here, the virtual item is the virtual item to be picked up. For illustrative purposes, please refer to Figure 6. The first environment interface 600 includes a virtual object 610. When the terminal receives a view rotation operation and the operation angle of the view rotation operation is within a preset angle range, it is determined whether there is a virtual item within the direction range 620 facing the virtual object 610 and the preset distance range 630 of the virtual object 610. As shown in Figure 6, there is a virtual item 640 at the intersection of the direction range 620 and the preset distance range 630. This virtual item 640 is an item to be picked up. Then, the position of the rotation center is adjusted according to the view rotation operation.
[0082] Optionally, when the above observation point observes the virtual environment through the camera model, the operation parameters also include the rotation termination position of the camera model. When the operation angle is within the target angle range and the rotation termination position is within the preset position range, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center. Optionally, the preset position range is the range above the horizontal position corresponding to the rotation center. When observing within this range, it indicates that the camera model is in a state of observing from top to bottom, that is, it indicates that the camera model is in a state of observing virtual objects. Therefore, when the operation angle is within the target angle range and the rotation termination position is within the range above the horizontal position corresponding to the rotation center, the first rotation axis distance is adjusted to the second rotation axis distance by adjusting the position of the rotation center. For illustrative purposes, please refer to Figure 7. The first environment interface 700 includes a virtual object 710. When the terminal receives a view rotation operation and the operation angle of the view rotation operation is within the preset angle range, the rotation termination position of the camera model 720 is determined. As shown in Figure 7, the horizontal position corresponding to the rotation center point 730 of the camera model 720 is plane 740. The rotation termination position of the camera model 720 is located on plane 740. Then, the position of the rotation center is adjusted according to the view rotation operation.
[0083] Step 504: Display the second environment interface, which includes a view of the virtual objects in the virtual environment being rotated and observed with a second rotation axis.
[0084] Optionally, the second rotation axis distance is the distance between the observation point and the adjusted rotation center. Optionally, the second rotation axis distance is the distance between the camera model and the adjusted rotation center.
[0085] In summary, the method for observing virtual objects in a virtual environment provided in this embodiment matches the operation parameters of the view rotation operation with the object observation conditions to determine whether the observation view after the view rotation operation is the view for observing virtual objects. When the observation view after the view rotation operation is the view for observing virtual objects, the rotation axis distance between the observation point and the rotation center is adjusted by adjusting the position of the rotation center, thereby adjusting the rotation flexibility of the observation point. The rotation flexibility matching the observation of virtual objects is switched in real time by monitoring the view rotation operation, distinguishing between the normal axis distance and the axis distance when observing virtual objects, so as to observe virtual objects in a more flexible and wider field of view.
[0086] The method provided in this embodiment determines whether the view rotation operation meets the object observation conditions by measuring the operation angle of the view rotation operation. Meeting the object observation conditions includes at least one of the following: the operation angle is within the target angle range, the operation distance reaches the target distance, the rotation termination position is within the preset position range, or the virtual object exists within the preset distance range in the virtual environment. This avoids the problem of users accidentally adjusting the rotation axis due to operation displacement in the vertical direction when performing view rotation operations in the horizontal or oblique direction.
[0087] The method provided in this embodiment determines whether there are virtual items to be picked up within a preset distance range of the virtual object, and triggers the adjustment of the rotation axis when there are virtual items within the preset distance range of the virtual object. This avoids the problem of accidental triggering of the adjustment to observe virtual items when there are no virtual items around the virtual object.
[0088] Schematic, Figure 8 is a schematic diagram of the interface of a virtual object observation method in a virtual environment provided by an exemplary embodiment of this application, illustrated from a third-person perspective. As shown in Figure 8, the first environment interface 810 includes a virtual object 811. Currently, the virtual environment is observed in the first environment interface 810 with a first rotation axis distance. After sliding horizontally a first distance on the terminal display screen, the first environment interface 820 is displayed, which shows half of a cabinet 821. After sliding vertically on the terminal display screen, and the vertical sliding operation conforms to the object observation... Under certain conditions, such as when the vertical sliding operation is within a preset angle range 812, the position of the rotation center 822 is adjusted to change the first rotation axis distance 823 (the distance between the camera model 825 and the rotation center 826) to the second rotation axis distance 824, and the second environment interface 830 is displayed. This second environment interface 830 is the view when observing the virtual object 831 in the virtual environment from the second rotation axis distance. After sliding horizontally a first distance on the terminal display screen, the second environment interface 840 is displayed, which shows the complete cabinet 821. As shown in Figure 8 and the above description, after adjusting the first rotation axis distance to the second rotation axis distance, the viewing angle rotation angle is different under the same sliding operation, that is, the flexibility of the viewing angle rotation is different. As shown in Figure 8, after adjusting the first rotation axis distance to the second rotation axis distance, the flexibility of the viewing angle rotation is improved, and the field of view during viewing angle rotation is wider. That is, adjusting the first rotation axis distance to the second rotation axis distance is used to adjust the flexibility of the viewing angle rotation. Optionally, adjusting the first rotation axis to the second rotation axis can be used to increase the flexibility of the viewpoint rotation from low to high, or to decrease the flexibility of the viewpoint rotation from high to low.
[0089] In an optional embodiment, the second rotation axis distance varies depending on the motion state of the virtual object. Figure 9 is a flowchart of a method for observing virtual items in a virtual environment provided by another exemplary embodiment of this application. Taking the application of this method in a terminal as an example, as shown in Figure 9, the method includes:
[0090] Step 901: Display a first environment interface, which includes a view of the virtual environment being rotated and observed with a first rotation axis.
[0091] Optionally, the first rotation axis distance is the distance between the observation point of the virtual object and the rotation center. Optionally, the observation point is achieved by capturing images of the virtual environment through a camera model, that is, the first rotation axis distance is the distance between the camera model and the rotation center.
[0092] Optionally, the observation method of rotating and observing the virtual environment through the first rotation axis has been described in detail in step 501 above, and will not be repeated here.
[0093] Step 902: Receive view rotation operation.
[0094] Optionally, this viewpoint rotation operation is used to rotate the observation point around the rotation center.
[0095] Optionally, the implementation of this view rotation operation has been described in detail in step 502 above, and will not be repeated here.
[0096] Step 903: When the operation parameters of the view rotation operation meet the object observation conditions, determine the motion state of the virtual object.
[0097] Optionally, the movement state includes any one of the following: standing, running, walking, driving, riding, or swimming.
[0098] Optionally, the method for determining whether the view rotation operation meets the conditions for observing the object has been described in detail in step 503 above, and will not be repeated here.
[0099] Step 904: Determine the axis length corresponding to the motion state of the virtual object.
[0100] Optionally, the wheelbase length corresponding to the motion state can be determined in any of the following ways:
[0101] First, obtain the correspondence between motion state and wheelbase length, and determine the corresponding wheelbase length based on the motion state within this correspondence. Optionally, this correspondence can be stored in the terminal or obtained by the terminal from the server. An illustrative example of this correspondence is shown in Table 2 below:
[0102] Table 2
[0103] Second rotational wheelbase in motion
[0104] Standing state (p1, q1) Driving state (p2, q2) Swimming state (p3, q3)
[0105] Where p1 represents the horizontal wheelbase in the standing position, q1 represents the vertical wheelbase in the standing position, p2 represents the horizontal wheelbase in the driving position, q2 represents the vertical wheelbase in the driving position, p3 represents the horizontal wheelbase in the swimming position, and q3 represents the vertical wheelbase in the swimming position.
[0106] Second, using the wheelbase length corresponding to the target state as the baseline wheelbase length, determine the wheelbase coefficient corresponding to the motion state of the virtual object and the target state, and then determine the wheelbase length corresponding to the motion state of the virtual object by multiplying the wheelbase coefficient by the baseline wheelbase length. Optionally, the motion state of the virtual object includes any one of standing, driving, or swimming states. Taking the standing state as an example, when the virtual object is in a driving state, determine the first wheelbase coefficient corresponding to the driving state, and then determine the wheelbase length corresponding to the driving state by multiplying the first wheelbase coefficient by the baseline wheelbase length; or, when the virtual object is in a swimming state, determine the second wheelbase coefficient corresponding to the swimming state, and then determine the wheelbase length corresponding to the useful state by multiplying the second wheelbase coefficient by the baseline wheelbase length. Optionally, the terminal can store the correspondence between wheelbase coefficients and motion states, or it can obtain the correspondence from the server. Illustratively, this correspondence is shown in Table 3 below:
[0107] Table 3
[0108] Wheelbase coefficients for different motion states: Standing (1, 1), Driving (1.25, 0.8), Swimming (1.5, 1.2).
[0109] Specifically, when the second rotational wheelbase in the standing state is (x, y), the second rotational wheelbase in the driving state is (0.7x, 0.8y), and the second rotational wheelbase in the swimming state is (1.5x, 1.2y).
[0110] For illustrative purposes, please refer to Figure 10. When the virtual object 1010 is in a standing state, the lateral rotation axis 1011 corresponding to the virtual object 1010 has a distance of x (the distance between the rotation center 1013 and the camera model 1014), and the lateral rotation axis 1012 has a distance of y (the distance between the rotation center 1013 and the ground). When the virtual object 1010 is in a driving state, the lateral rotation axis 1021 corresponding to the driving state has a distance of 1.25x (the distance between the rotation center 1023 and the camera model 1024), and the lateral rotation axis 1022 has a distance of 0.8y (the distance between the rotation center 1023 and the ground).
[0111] Step 905: Adjust the position of the rotation center according to the wheelbase length, and adjust the first rotation wheelbase to the second rotation wheelbase.
[0112] Optionally, the second rotation axis distance is the distance between the observation point and the adjusted rotation center. Optionally, the second rotation axis distance is the distance between the camera model and the adjusted rotation center.
[0113] Step 906: Display a second environment interface, which includes a view of the virtual objects in the virtual environment being rotated and observed with a second rotation axis.
[0114] In summary, the method for observing virtual objects in a virtual environment provided in this embodiment matches the operation parameters of the view rotation operation with the object observation conditions to determine whether the observation view after the view rotation operation is the view for observing virtual objects. When the observation view after the view rotation operation is the view for observing virtual objects, the rotation axis distance between the observation point and the rotation center is adjusted by adjusting the position of the rotation center, thereby adjusting the rotation flexibility of the observation point. The rotation flexibility matching the observation of virtual objects is switched in real time by monitoring the view rotation operation, distinguishing between the normal axis distance and the axis distance when observing virtual objects, so as to observe virtual objects in a more flexible and wider field of view.
[0115] The method provided in this embodiment sets different second rotation axis distances for different motion states of virtual objects. Different second rotation axis distances are adapted to different motion states. For example, in driving state, the virtual object moves at a faster speed and requires less flexibility in the rotation of the viewpoint. Therefore, the corresponding second rotation axis distance is adapted according to the flexibility requirements of the driving state to avoid the problem that the second rotation axis distance in the standing state is not compatible with the driving state.
[0116] In an optional embodiment, the second rotation axis distance varies depending on the viewpoint. Figure 11 is a flowchart of a method for observing virtual objects in a virtual environment provided by another exemplary embodiment of this application. Taking the application of this method in a terminal as an example, the method includes:
[0117] Step 1101: Display the first environment interface, which includes a view of the virtual environment being rotated and observed with a first rotation axis.
[0118] Optionally, the first rotation axis distance is the distance between the observation point of the virtual object and the rotation center. Optionally, the observation point is achieved by capturing images of the virtual environment through a camera model, that is, the first rotation axis distance is the distance between the camera model and the rotation center.
[0119] Optionally, the observation method of rotating and observing the virtual environment through the first rotation axis has been described in detail in step 501 above, and will not be repeated here.
[0120] Step 1102: Receive view rotation operation.
[0121] Optionally, this viewpoint rotation operation is used to rotate the observation point around the rotation center.
[0122] Optionally, the implementation of this view rotation operation has been described in detail in step 502 above, and will not be repeated here.
[0123] Step 1103: When the operation parameters of the view rotation operation meet the observation conditions of the object, determine the motion state of the virtual object.
[0124] Optionally, the movement state includes any one of the following: standing, running, walking, driving, riding, or swimming.
[0125] Optionally, the method for determining whether the view rotation operation meets the conditions for observing the object has been described in detail in step 503 above, and will not be repeated here.
[0126] Step 1104: Using the axis length corresponding to the target state as the baseline axis length, determine the axis length coefficient corresponding to the human perspective and the motion state of the virtual object.
[0127] Optionally, any state in the motion state can be realized as the target state, schematically using the wheelbase length corresponding to the standing state as the reference wheelbase length.
[0128] Optionally, the wheelbase length corresponding to the target state in the target person's viewpoint can be used as the reference wheelbase length, such as using the wheelbase length in the standing state and in the first person's viewpoint as the reference wheelbase length.
[0129] Optionally, the terminal stores the correspondence between the first-person perspective, motion state, and wheelbase coefficient; alternatively, the terminal obtains this correspondence from the server. An illustrative example of this correspondence is shown in Table 4 below:
[0130] Table 4
[0131]
[0132] Step 1105: Determine the wheelbase length corresponding to the motion state of the virtual object by multiplying the wheelbase coefficient by the reference wheelbase length.
[0133] Based on Table 4 above, when the second rotation axis distance in the standing position and the first-person perspective is (x, y), the second rotation axis distance in the standing position and the third-person perspective is (0.5x, 0.85y), the second rotation axis distance in the driving position and the first-person perspective is (0.75x, 0.8y), the second rotation axis distance in the driving position and the third-person perspective is (2.25x, 0.85y), the second rotation axis distance in the swimming position and the first-person perspective is (0.5x, 0.65y), and the second rotation axis distance in the swimming position and the third-person perspective is (x, 1.2y).
[0134] Optionally, the wheelbase length can also be customized through the interface display, that is, the terminal displays a wheelbase adjustment interface, which includes a preview of the wheelbase. Users can adjust the length of the wheelbase by dragging or inputting values. Users can also adjust the wheelbase length under different motion states and different perspectives by selecting motion states and perspectives.
[0135] Step 1106: Adjust the position of the rotation center according to the wheelbase length, and adjust the first rotation wheelbase to the second rotation wheelbase.
[0136] Optionally, the second rotation axis distance is the distance between the observation point and the adjusted rotation center. Optionally, the second rotation axis distance is the distance between the camera model and the adjusted rotation center.
[0137] Step 1107: Display the second environment interface, which includes a view of the virtual objects in the virtual environment being rotated and observed with a second rotation axis.
[0138] Optionally, when a view rotation operation is received on the second environmental interface, and the view rotation operation meets the rotation axis distance recovery condition, the second rotation axis distance is restored to the first rotation axis distance by adjusting the position of the rotation center. For example, when an upward sliding operation is received on the terminal display screen, and the upward sliding operation is within a preset angle range, the second rotation axis distance is restored to the first rotation axis distance by adjusting the position of the rotation center.
[0139] In summary, the method for observing virtual objects in a virtual environment provided in this embodiment matches the operation parameters of the view rotation operation with the object observation conditions to determine whether the observation view after the view rotation operation is the view for observing virtual objects. When the observation view after the view rotation operation is the view for observing virtual objects, the rotation axis distance between the observation point and the rotation center is adjusted by adjusting the position of the rotation center, thereby adjusting the rotation flexibility of the observation point. The rotation flexibility matching the observation of virtual objects is switched in real time by monitoring the view rotation operation, distinguishing between the normal axis distance and the axis distance when observing virtual objects, so as to observe virtual objects in a more flexible and wider field of view.
[0140] The method provided in this embodiment adapts the second rotation axis distance under different perspectives to avoid the axis distance mismatch caused by the different immersion levels of the virtual environment under the third-person perspective and the first-person perspective, while the second rotation axis distance is the same.
[0141] For illustrative purposes, please refer to Figure 12, which is an overall flowchart of a method for observing virtual items in a virtual environment provided in an exemplary embodiment of this application. Taking the application of this method in a terminal as an example, as shown in Figure 12, the method includes:
[0142] Step 1201: Determine whether the angle p of the sliding operation in the horizontal direction is not greater than a.
[0143] Optionally, this judgment operation is to determine whether the sliding operation meets the conditions for observing the object.
[0144] Step 1202: When p > a, the fast camera pickup scheme is not enabled, the viewing angle rotation direction is p, and the rotation axis is fixed.
[0145] Optionally, when p > a, that is, the sliding operation does not meet the conditions for observing the object, the rotation of the viewpoint does not indicate that it is necessary to observe the virtual object in the virtual environment.
[0146] Step 1203: When p≤a, enable the fast camera pickup scheme, with the viewpoint rotation direction being p, and determine the state of the virtual object.
[0147] Optionally, determining the state of a virtual object includes determining the motion state of the virtual object, which may include any one of standing, driving, or swimming states.
[0148] Step 1204: When the virtual object is in a standing state, the rotation axis value is determined to be (x1, y1) in the first-person view and (x2, y2) in the third-person view.
[0149] Step 1205: When the virtual object is in driving mode, determine the rotation axis value in the first-person view as (x3, y3) and the rotation axis value in the third-person view as (x4, y4).
[0150] Step 1206: When the virtual object is in a swimming state, the rotation axis value is determined to be (x5, y5) in the first-person view and (x6, y6) in the third-person view.
[0151] Step 1207: Detect the rotation value and rotate the corresponding viewing angle range on the corresponding rotation axis.
[0152] Optionally, the viewing angle is rotated according to the viewing angle rotation operation under the rotation axis value of the adjusted rotation axis.
[0153] In summary, the method for observing virtual objects in a virtual environment provided in this embodiment matches the operation parameters of the view rotation operation with the object observation conditions to determine whether the observation view after the view rotation operation is the view for observing virtual objects. When the observation view after the view rotation operation is the view for observing virtual objects, the rotation axis distance between the observation point and the rotation center is adjusted by adjusting the position of the rotation center, thereby adjusting the rotation flexibility of the observation point. The rotation flexibility matching the observation of virtual objects is switched in real time by monitoring the view rotation operation, distinguishing between the normal axis distance and the axis distance when observing virtual objects, so as to observe virtual objects in a more flexible and wider field of view.
[0154] It should be understood that the steps in the various embodiments of this application are not necessarily executed sequentially according to the order indicated by the step numbers. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0155] Figure 13 is a structural block diagram of an observation device for virtual items in a virtual environment provided in an exemplary embodiment of this application. The device can be implemented in a terminal. As shown in Figure 13, the device includes: a display module 1310, a receiving module 1320, and an adjustment module 1330.
[0156] Display module 1310 is used to display a first environment interface, the first environment interface including a screen when the virtual environment is rotated and observed with a first rotation axis distance, the first rotation axis distance being the distance between the observation point of the virtual object and the rotation center.
[0157] The receiving module 1320 is used to receive a view rotation operation, wherein the view rotation operation is used to rotate the observation point around the rotation center;
[0158] The adjustment module 1330 is used to adjust the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center when the operation parameters of the view rotation operation meet the object observation conditions.
[0159] The display module 1310 is also used to display a second environment interface, which includes a screen showing the virtual objects in the virtual environment being rotated and observed with the second rotation axis.
[0160] In an optional embodiment, as shown in FIG14, the adjustment module 1330 includes:
[0161] Determining unit 1331 is used to determine the motion state of the virtual object;
[0162] The determining unit 1331 is further configured to determine the axis length corresponding to the motion state of the virtual object, wherein the axis length is the axis length of the second rotation axis.
[0163] The adjustment unit 1332 is used to adjust the position of the rotation center according to the wheelbase length, and adjust the first rotation wheelbase to the second rotation wheelbase.
[0164] In an optional embodiment, the determining unit 1331 is further configured to determine the axis distance coefficient between the motion state of the virtual object and the target state, using the axis distance length corresponding to the target state as the reference axis distance length;
[0165] The determining unit 1331 is further configured to determine the product of the wheelbase coefficient and the reference wheelbase length as the wheelbase length corresponding to the motion state of the virtual object.
[0166] In an optional embodiment, the motion state is any one of a standing state, a driving state, or a swimming state, and the standing state is the target state;
[0167] The determining unit 1331 is further configured to determine a first wheelbase coefficient corresponding to the driving state when the virtual object is in the driving state; and to determine the product of the first wheelbase coefficient and the reference wheelbase length as the wheelbase length corresponding to the driving state.
[0168] or,
[0169] The determining unit 1331 is further configured to determine a second wheelbase coefficient corresponding to the swimming state when the virtual object is in the swimming state; and to determine the product of the second wheelbase coefficient and the reference wheelbase length as the wheelbase length corresponding to the swimming state.
[0170] In an optional embodiment, the determining unit 1331 is further configured to determine the perspective when observing the virtual environment; and to determine the axis distance coefficient corresponding to the perspective and the motion state of the virtual object.
[0171] In an optional embodiment, the operating parameters include the operating angle;
[0172] The adjustment module 1330 is further configured to adjust the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center when the operating angle is within the target angle range.
[0173] In an optional embodiment, the operation parameters further include the presence of virtual items within a preset distance range of the virtual object in the virtual environment;
[0174] The adjustment module 1330 is further configured to adjust the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center when the operation angle is within the target angle range and the virtual object exists within the preset distance range in the virtual environment.
[0175] In an optional embodiment, the observation point observes the virtual environment through a camera model, and the operation parameters further include the rotation termination position of the camera model;
[0176] The adjustment module 1330 is further configured to adjust the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center when the operating angle is within the target angle range and the rotation termination position is within the preset position range.
[0177] In summary, the observation method and apparatus for virtual objects in a virtual environment provided in this embodiment matches the operation parameters of the view rotation operation with the object observation conditions to determine whether the observation view after the view rotation operation is the view for observing virtual objects. When the observation view after the view rotation operation is the view for observing virtual objects, the rotation axis distance between the observation point and the rotation center is adjusted by adjusting the position of the rotation center, thereby adjusting the rotation flexibility of the observation point. The rotation flexibility matching the observation of virtual objects is switched in real time by monitoring the view rotation operation, distinguishing between the normal axis distance and the axis distance when observing virtual objects, so as to observe virtual objects in a more flexible and wider field of view.
[0178] Figure 15 shows a structural block diagram of a terminal 1500 provided in an exemplary embodiment of the present invention. The terminal 1500 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1500 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0179] Typically, terminal 1500 includes a processor 1501 and a memory 1502.
[0180] Processor 1501 may include one or more processing cores; "multiple" means at least two. For example, a 4-core processor, an 8-core processor, etc. Processor 1501 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0181] Memory 1502 may include one or more computer-readable storage media, which may be non-transitory. Memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 1502 is used to store at least one instruction, which is executed by processor 1501 to implement the method for observing virtual items in a virtual environment provided in the method embodiments of this application.
[0182] In some embodiments, the terminal 1500 may also optionally include: a peripheral device interface 1503 and at least one peripheral device. The processor 1501, memory 1502, and peripheral device interface 1503 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1503 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1504, a touch display screen 1505, a camera 1506, an audio circuit 1507, a positioning component 1508, and a power supply 1509.
[0183] Peripheral interface 1503 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1501 and memory 1502. In some embodiments, processor 1501, memory 1502 and peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1501, memory 1502 and peripheral interface 1503 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0184] The radio frequency (RF) circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1504 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1504 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1504 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0185] Display screen 1505 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1505 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1501 for processing. In this case, display screen 1505 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1505, which serves as the front panel of terminal 1500; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of terminal 1500 or in a folded design; in still other embodiments, display screen 1505 may be a flexible display screen, disposed on a curved or folded surface of terminal 1500. Furthermore, display screen 1505 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0186] The camera assembly 1506 is used to acquire images or videos. Optionally, the camera assembly 1506 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0187] The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1501 for processing, or input to the radio frequency circuit 1504 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1500. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1507 may also include a headphone jack.
[0188] The positioning component 1508 is used to determine the current geographic location of the terminal 1500 in order to enable navigation or LBS (Location Based Service). The positioning component 1508 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, or Russia's Galileo system.
[0189] Power supply 1509 is used to power the various components in terminal 1500. Power supply 1509 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1509 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0190] In some embodiments, the terminal 1500 further includes one or more sensors 1510. The one or more sensors 1510 include, but are not limited to: an accelerometer 1511, a gyroscope 1512, a pressure sensor 1513, a fingerprint sensor 1514, an optical sensor 1515, and a proximity sensor 1516.
[0191] Accelerometer 1511 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1500. For example, accelerometer 1511 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1501 can control touchscreen 1505 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1511. Accelerometer 1511 can also be used for games or for acquiring user motion data.
[0192] The gyroscope sensor 1512 can detect the orientation and rotation angle of the terminal 1500. The gyroscope sensor 1512, in conjunction with the accelerometer sensor 1511, can collect 3D motion data from the user on the terminal 1500. Based on the data collected by the gyroscope sensor 1512, the processor 1501 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0193] The pressure sensor 1513 can be disposed on the side bezel of the terminal 1500 and / or on the lower layer of the touch display screen 1505. When the pressure sensor 1513 is disposed on the side bezel of the terminal 1500, it can detect the user's grip signal on the terminal 1500, and the processor 1501 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1513. When the pressure sensor 1513 is disposed on the lower layer of the touch display screen 1505, the processor 1501 can control the operable controls on the UI interface based on the user's pressure operation on the touch display screen 1505. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0194] The fingerprint sensor 1514 is used to collect a user's fingerprint. The processor 1501 identifies the user based on the fingerprint collected by the fingerprint sensor 1514, or vice versa. When the user's identity is identified as trusted, the processor 1501 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 1514 can be located on the front, back, or side of the terminal 1500. When the terminal 1500 has physical buttons or a manufacturer's logo, the fingerprint sensor 1514 can be integrated with the physical buttons or manufacturer's logo.
[0195] An optical sensor 1515 is used to collect ambient light intensity. In one embodiment, the processor 1501 can control the display brightness of the touch screen 1505 based on the ambient light intensity collected by the optical sensor 1515. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1505 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1505 is decreased. In another embodiment, the processor 1501 can also dynamically adjust the shooting parameters of the camera assembly 1506 based on the ambient light intensity collected by the optical sensor 1515.
[0196] The proximity sensor 1516, also known as a distance sensor, is typically located on the front panel of the terminal 1500. The proximity sensor 1516 is used to detect the distance between the user and the front of the terminal 1500. In one embodiment, when the proximity sensor 1516 detects that the distance between the user and the front of the terminal 1500 is gradually decreasing, the processor 1501 controls the touchscreen display 1505 to switch from a screen-on state to a screen-off state; when the proximity sensor 1516 detects that the distance between the user and the front of the terminal 1500 is gradually increasing, the processor 1501 controls the touchscreen display 1505 to switch from a screen-off state to a screen-on state.
[0197] Those skilled in the art will understand that the structure shown in FIG15 does not constitute a limitation on the terminal 1500, and may include more or fewer components than shown, or combine certain components, or employ different component arrangements.
[0198] This application also provides a computer device, which includes a memory and a processor. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads the at least one instruction, at least one program, code set, or instruction set to implement the observation method of virtual items in the virtual environment as described in any of Figures 5, 9, and 11.
[0199] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the observation method of virtual items in the virtual environment as shown in any of Figures 5, 9, and 11.
[0200] This application also provides a computer program product that, when run on a computer, causes the computer to execute the observation method for virtual items in a virtual environment provided in the above-described method embodiments.
[0201] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may be a computer-readable storage medium included in the memory of the above embodiments; or it may be a standalone computer-readable storage medium not assembled into the terminal. The computer-readable storage medium stores at least one instruction, at least one program segment, a code set, or an instruction set. The at least one instruction, the at least one program segment, the code set, or the instruction set is loaded and executed by the processor to implement the method for observing virtual items in the virtual environment as described in any of Figures 5, 9, and 11.
[0202] Optionally, the computer-readable storage medium may include: read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0203] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0204] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0205] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
A method for observing a virtual item in a virtual environment, performed by a computer device, the method comprising:displaying a first environment interface, the first environment interface comprising a picture of a virtual environment when performing rotation observation by using a first rotation axis distance, the first rotation axis distance being a distance between an observation point of a virtual object and a rotation center;receiving a viewing angle rotation operation, the viewing angle rotation operation being configured for rotating the observation point about the rotation center;adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center, wherein the adjusting comprising: determining a motion status of the virtual object; determining an axis distance length corresponding to the motion status of the virtual object, the axis distance length being an axis distance length of the second rotation axis distance; and adjusting the position of the rotation center according to the axis distance length, to adjust the first rotation axis distance to the second rotation axis distance; anddisplaying a second environment interface, the second environment interface comprising a picture of the virtual environment when performing rotation observation on a virtual item in the virtual environment by using the second rotation axis distance;wherein the determining an axis distance length corresponding to the motion status of the virtual object comprises:using an axis distance length corresponding to a target status as a reference axis distance length, and determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object; anddetermining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object; andwherein the determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object comprises:determining a personal viewing angle at which the virtual environment is observed; anddetermining the axis distance coefficient corresponding to personal viewing angle and the motion status of the virtual object.The method according to claim 1, characterized in that the motion status is any one of a driving status and a swimming status, and the target status is a standing status; andthe determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object, and the determining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object comprises:determining, when the virtual object is in the driving status, a first axis distance coefficient corresponding to the driving status, and determining a product of the first axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the driving status; or determining, when the virtual object is in the swimming status, a second axis distance coefficient corresponding to the swimming status, and determining a product of the second axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the swimming status.The method according to claim 1 or 2, characterized in that the operation parameter comprises an operation angle; andthe adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center comprises:adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The method according to claim 3, characterized in that the operation parameter further comprises a virtual item existence status in a preset distance range of the virtual object in the virtual environment; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and a virtual item exists in the preset distance range of the virtual object in the virtual environment, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The method according to claim 3, characterized in that the virtual environment is observed by using a camera model at the observation point, and the operation parameter further comprises a rotation ending position of the camera model; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and the rotation ending position falls within a preset position range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.An apparatus for observing a virtual item in a virtual environment, comprising:a display module, configured to display a first environment interface, the first environment interface comprising a picture of a virtual environment when performing rotation observation by using a first rotation axis distance, the first rotation axis distance being a distance between an observation point of a virtual object and a rotation center;a receiving module, configured to receive a viewing angle rotation operation, the viewing angle rotation operation being configured for rotating the observation point about the rotation center; andan adjustment module, configured to adjust, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center, wherein the adjustment module is configured to: determine a motion status of the virtual object; determine an axis distance length corresponding to the motion status of the virtual object, the axis distance length being an axis distance length of the second rotation axis distance; and adjust the position of the rotation center according to the axis distance length, to adjust the first rotation axis distance to the second rotation axis distance;the display module being further configured to display a second environment interface, the second environment interface comprising a picture of the virtual environment when performing rotation observation on a virtual item in the virtual environment by using the second rotation axis distance;wherein determining the axis distance length corresponding to the motion status of the virtual object comprises:using an axis distance length corresponding to a target status as a reference axis distance length, and determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object; anddetermining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object; andwherein the determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object comprises:determining a personal viewing angle at which the virtual environment is observed; anddetermining the axis distance coefficient corresponding to personal viewing angle and the motion status of the virtual object.A computer device includes a memory and a processor, the memory storing computer-readable instructions, the computer-readable instructions, when executed by the processor, causing the processor to perform the following operations:displaying a first environment interface, the first environment interface comprising a picture of a virtual environment when performing rotation observation by using a first rotation axis distance, the first rotation axis distance being a distance between an observation point of a virtual object and a rotation center;receiving a viewing angle rotation operation, the viewing angle rotation operation being configured for rotating the observation point about the rotation center;adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center, wherein the adjusting comprising: determining a motion status of the virtual object; determining an axis distance length corresponding to the motion status of the virtual object, the axis distance length being an axis distance length of the second rotation axis distance; and adjusting the position of the rotation center according to the axis distance length, to adjust the first rotation axis distance to the second rotation axis distance; anddisplaying a second environment interface, the second environment interface comprising a picture of the virtual environment when performing rotation observation on a virtual item in the virtual environment by using the second rotation axis distance;wherein the determining an axis distance length corresponding to the motion status of the virtual object comprises:using an axis distance length corresponding to a target status as a reference axis distance length, and determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object; anddetermining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object; andwherein the determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object comprises:determining a personal viewing angle at which the virtual environment is observed; anddetermining the axis distance coefficient corresponding to personal viewing angle and the motion status of the virtual object.The computer device according to claim 7, characterized in that the motion status is any one of a driving status and a swimming status, and the target status is a standing status; andthe determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object, and the determining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object comprises:determining, when the virtual object is in the driving status, a first axis distance coefficient corresponding to the driving status, and determining a product of the first axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the driving status; or determining, when the virtual object is in the swimming status, a second axis distance coefficient corresponding to the swimming status, and determining a product of the second axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the swimming status.The computer device according to claim 7 or 8, characterized in that the operation parameter comprises an operation angle; andthe adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center comprises:adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The computer device according to claim 9, characterized in that the operation parameter further comprises a virtual item existence status in a preset distance range of the virtual object in the virtual environment; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and a virtual item exists in the preset distance range of the virtual object in the virtual environment, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The computer device according to claim 9, characterized in that the virtual environment is observed by using a camera model at the observation point, and the operation parameter further comprises a rotation ending position of the camera model; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and the rotation ending position falls within a preset position range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.One or more non-volatile storage media storing computer-readable instructions, the computer-readable instructions, when executed by one or more processors, causing the one or more processors to perform the following operations:displaying a first environment interface, the first environment interface comprising a picture of a virtual environment when performing rotation observation by using a first rotation axis distance, the first rotation axis distance being a distance between an observation point of a virtual object and a rotation center;receiving a viewing angle rotation operation, the viewing angle rotation operation being configured for rotating the observation point about the rotation center;adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center, wherein the adjusting comprising: determining a motion status of the virtual object; determining an axis distance length corresponding to the motion status of the virtual object, the axis distance length being an axis distance length of the second rotation axis distance; and adjusting the position of the rotation center according to the axis distance length, to adjust the first rotation axis distance to the second rotation axis distance; anddisplaying a second environment interface, the second environment interface comprising a picture of the virtual environment when performing rotation observation on a virtual item in the virtual environment by using the second rotation axis distance;wherein the determining an axis distance length corresponding to the motion status of the virtual object comprises:using an axis distance length corresponding to a target status as a reference axis distance length, and determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object; anddetermining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object; andwherein the determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object comprises:determining a personal viewing angle at which the virtual environment is observed; anddetermining the axis distance coefficient corresponding to personal viewing angle and the motion status of the virtual object.The storage medium according to claim 12, characterized in that the motion status is any one of a driving status and a swimming status, and the target status is a standing status; andthe determining an axis distance coefficient corresponding to the motion status and the target status of the virtual object, and the determining a product of the axis distance coefficient and the reference axis distance length as the axis distance length corresponding to the motion status of the virtual object comprises:determining, when the virtual object is in the driving status, a first axis distance coefficient corresponding to the driving status, and determining a product of the first axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the driving status; or determining, when the virtual object is in the swimming status, a second axis distance coefficient corresponding to the swimming status, and determining a product of the second axis distance coefficient and the reference axis distance length as an axis distance length corresponding to the swimming status.The storage medium according to claim 12 or 13, characterized in that the operation parameter comprises an operation angle; andthe adjusting, when an operation parameter of the viewing angle rotation operation satisfies an item observation condition, the first rotation axis distance to a second rotation axis distance by adjusting a position of the rotation center comprises:adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The storage medium according to claim 14, characterized in that the operation parameter further comprises a virtual item existence status in a preset distance range of the virtual object in the virtual environment; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and a virtual item exists in the preset distance range of the virtual object in the virtual environment, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.The storage medium according to claim 14, characterized in that the virtual environment is observed by using a camera model at the observation point, and the operation parameter further comprises a rotation ending position of the camera model; andthe adjusting, when the operation angle falls within a target angle range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center comprises:adjusting, when the operation angle falls within the target angle range and the rotation ending position falls within a preset position range, the first rotation axis distance to the second rotation axis distance by adjusting the position of the rotation center.