Virtual element display method and apparatus, device, medium, and program product
By combining long press and swipe operations with a rotation control in a virtual scene, rapid and precise rotation of virtual elements is achieved, solving the problem of inflexible angle adjustment in existing technologies, improving operational efficiency and reducing resource waste.
Patent Information
- Application Number
- PCT/CN2025/082990
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2025-03-17
- Publication Date
- 2025-10-30
AI Technical Summary
In existing technologies, users lack flexibility when adjusting the angle of objects placed in a virtual scene, resulting in low operational efficiency and wasted computer resources.
This invention provides a method for displaying virtual elements, which combines rapid and precise rotation through a rotation control, and allows for flexible control of the transformation range using long press and swipe operations, including displaying editing controls and transformation animations in response to different trigger operations.
It improves the flexibility and efficiency of virtual element rotation operations, reduces the waste of computer resources, and simplifies various rotation operation steps.
Smart Images

Figure CN2025082990_30102025_PF_FP_ABST
Abstract
Description
Methods, devices, equipment, media, and program products for displaying virtual elements
[0001] This application claims priority to Chinese Patent Application No. 202410520276.6, filed on April 26, 2024, entitled “Method, Apparatus, Device, Medium and Program Product for Displaying Virtual Elements”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of human-computer interaction, and in particular to a method, apparatus, device, medium, and program product for displaying virtual elements. Background Technology
[0003] In games with a build mode, when users create custom scenes, they usually need to set the placement status of objects, such as adjusting the current placement angle of objects in the virtual scene. Summary of the Invention
[0004] This application provides a method, apparatus, device, medium, and program product for displaying virtual elements. The technical solution is as follows:
[0005] On the one hand, a method for displaying virtual elements is provided, the method comprising:
[0006] Display a first virtual element in a virtual scene, and display an editing control for editing the first virtual element in the virtual scene;
[0007] In response to a first trigger operation on the editing control, a first transformation animation of the first virtual element is displayed, the first transformation animation including an animation effect in which the first virtual element transforms with a preset transformation amplitude;
[0008] In response to a second trigger operation on the editing control, a second transformation animation of the first virtual element is displayed in real time following the second trigger operation. The second transformation animation includes an animation effect in which the first virtual element transforms with a dynamic transformation amplitude corresponding to the second trigger operation; wherein the first trigger operation and the second trigger operation are different.
[0009] On the other hand, a display device for virtual elements is provided, the device comprising:
[0010] A first display module is used to display a first virtual element in a virtual scene and to display an editing control, wherein the editing control is used to edit the first virtual element in the virtual scene;
[0011] The second display module is configured to respond to a first trigger operation on the editing control and display a first transformation animation of the first virtual element, wherein the first transformation animation includes an animation effect in which the first virtual element transforms with a preset transformation amplitude;
[0012] The second display module is further configured to respond to a second trigger operation on the editing control and display a second transformation animation of the first virtual element in real time following the second trigger operation. The second transformation animation includes an animation effect in which the first virtual element transforms with a dynamic transformation amplitude corresponding to the second trigger operation; wherein the first trigger operation and the second trigger operation are different.
[0013] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement any of the above-described methods for displaying virtual elements.
[0014] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for displaying virtual elements as described above.
[0015] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the above-described methods for displaying virtual elements.
[0016] The beneficial effects of the technical solutions provided in this application include at least the following:
[0017] Users can customize virtual elements in a virtual scene by triggering an editing control. When the editing control is triggered for the first time, the virtual element will change according to a preset transformation range, without requiring the user to manually set or adjust the transformation range, thus achieving rapid transformation control of the virtual element. When the editing control is triggered for the second time, the virtual element will follow the second trigger operation and change according to the dynamic transformation range corresponding to the second trigger operation. Therefore, by controlling the second trigger operation, the transformation range of the virtual element can be precisely controlled, thus achieving precise transformation control of the virtual element. Therefore, by integrating rapid transformation control and precise transformation control of virtual elements into a single editing control, users can complete multiple transformation controls of virtual elements with a single editing control, improving the flexibility of transformation control of virtual elements and simplifying the operation steps for implementing multiple transformation controls. This improves the efficiency of user operation in controlling virtual element transformations and reduces the waste of computer operating resources. Attached Figure Description
[0018] Figure 1 is a schematic diagram of a computer system provided in an exemplary embodiment of this application;
[0019] Figure 2 is a schematic diagram of a virtual element display method provided in an exemplary embodiment of this application;
[0020] Figure 3 is a flowchart of a method for displaying virtual elements provided in an exemplary embodiment of this application;
[0021] Figure 4 is a flowchart of a method for displaying virtual elements provided in another exemplary embodiment of this application;
[0022] Figure 5 is a schematic diagram of a first triggering operation provided in an exemplary embodiment of this application;
[0023] Figure 6 is a schematic diagram of a rotating scale provided in an exemplary embodiment of this application;
[0024] Figure 7 is a schematic diagram of a counterclockwise rotation scale provided in an exemplary embodiment of this application;
[0025] Figure 8 is a schematic diagram of a clockwise rotation scale provided in an exemplary embodiment of this application;
[0026] Figure 9 is a schematic diagram of a second triggering operation provided in an exemplary embodiment of this application;
[0027] Figure 10 is a schematic diagram of the horizontal coordinate distance provided in an exemplary embodiment of this application;
[0028] Figure 11 is a flowchart illustrating the implementation of a rotation control provided in an exemplary embodiment of this application;
[0029] Figure 12 is a flowchart of a method for displaying virtual elements provided in yet another exemplary embodiment of this application;
[0030] Figure 13 is a schematic diagram of a rotating scale provided in another exemplary embodiment of this application;
[0031] Figure 14 is a flowchart illustrating the implementation of rotation control provided in another exemplary embodiment of this application;
[0032] Figure 15 is a structural block diagram of a virtual element display device provided in an exemplary embodiment of this application;
[0033] Figure 16 is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0034] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0035] First, a brief introduction to the terms used in the embodiments of this application:
[0036] Virtual scene: This refers to a virtual scene displayed or provided by the client when running on the terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional three-dimensional world, or a purely fictional three-dimensional world. A virtual scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional.
[0037] Response: Used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which multiple operations are performed.
[0038] Figure 1 shows a structural block diagram of a computer system 100 provided in an exemplary embodiment of this application. The computer system 100 can implement a system architecture for displaying virtual elements. The computer system 100 includes a terminal 110 and a server 120.
[0039] Terminal 110 can be an electronic device such as a mobile phone, tablet computer, vehicle terminal (vehicle system), wearable device, or PC (Personal Computer). A client for the target application can be installed and run on Terminal 110. This target application can be any of the following: Virtual Reality (VR) client, Augmented Reality (AR) program, 3D mapping program, Virtual Reality game, Augmented Reality game, First-Person Shooter (FPS) game, Third-Person Shooter (TPS) game, Multiplayer Online Battle Arena (MOBA) game, Simulation Game (SLG), Party Game, Building Game, etc. Furthermore, this application does not limit the form of the target application, including but not limited to Apps (Applications), applets, etc., installed on Terminal 110, and can also be in web page form.
[0040] Terminal 110 is connected to server 120 via wireless or wired network.
[0041] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0042] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing. Optionally, server 120 can also function as a node in a blockchain system.
[0043] For example, server 120 includes processor 124 and memory 122. Memory 122 further includes receiving module 1221, control module 1222, and sending module 1223. Receiving module 1221 is used to receive requests sent by terminal 110; control module 1222 is used to control the rendering of virtual scene images; and sending module 1223 is used to send responses to terminal 110. Server 120 is used to provide background services for terminal 110.
[0044] Optionally, server 120 undertakes the main computing work and terminal 110 undertakes the secondary computing work; or, server 120 undertakes the secondary computing work and terminal 110 undertakes the main computing work; or, server 120 and terminal 110 adopt a distributed computing architecture for collaborative computing.
[0045] The virtual element display method provided in this application can be executed by a computer device, which refers to an electronic device with data computing, processing, and storage capabilities. Taking the implementation environment of the scheme shown in FIG1 as an example, the virtual element display method can be executed by the terminal 110 (for example, the target application installed and running on the terminal 110 executes the virtual element display method), or it can be executed by the server 120, or it can be executed by the interaction between the terminal 110 and the server 120. This application does not limit this.
[0046] Those skilled in the art will understand that the number of terminals 110 described above can be more or less. For example, there may be only one terminal 110, or there may be dozens or hundreds of terminals 110, or even more. This application does not limit the number or type of terminals 110 in its embodiments.
[0047] In games with a build mode, when users create custom scenes, they often need to configure the placement of objects, such as adjusting the current angle of an object within the virtual scene. In related technologies, to adjust the angle of an object, one can select the object and click the rotation control button. After clicking the rotation control button, the object will rotate by a fixed angle. However, this method of adjusting the angle by clicking the rotation control button lacks flexibility. Users need to frequently click the button to adjust the angle to achieve the desired placement effect, resulting in low user efficiency and wasted computer resources.
[0048] Based on this, this application provides a method for displaying virtual elements. The following description uses rotation transformation as an example of the transformation control involved in this application. Figure 2 shows a schematic diagram of a virtual element display method provided by an exemplary embodiment of this application. The method is described using a computer device as an example. This computer device can be the terminal 110 shown in Figure 1. The method includes the following steps 1 to 3.
[0049] Step 1: Display the first virtual element 201 in the virtual scene, and display the rotation control 202.
[0050] In a schematic representation, a target application with a build mode is running on a computer device. After entering the build mode of the target application, a virtual scene is displayed in interface 200. The user can add a first virtual element 201 to the virtual scene and perform custom editing on the first virtual element 201, such as rotation, movement, scaling, etc.
[0051] Taking rotation as an example, when the first virtual element 201 is selected, a rotation control 202 can be displayed on the interface 200. The rotation control 202 is used to control the first virtual element 201 to rotate in the virtual scene 200.
[0052] Step 2: In response to a click on the rotation control 202, display the first rotation animation of the first virtual element 201.
[0053] For illustrative purposes, this click operation refers to a single click operation. When the user clicks the rotation control 202, the computer device will respond to the click operation and display the first rotation animation on the interface 210. The first rotation animation refers to the animation effect of the first virtual element 201 rotating at a preset rotation angle and a preset rotation direction, such as the first virtual element 201 rotating 90° clockwise, thereby realizing the rapid rotation of the first virtual element.
[0054] Step 3: After detecting a long press operation on the rotation control 202, in response to the sliding operation that follows the long press operation, the second rotation animation of the first virtual element 201 is displayed in real time following the sliding operation.
[0055] The long press operation refers to pressing the rotation control 202, and the position of the press operation remains unchanged. The slide operation following the long press operation refers to the slide operation performed within a preset time after the long press operation.
[0056] For example, after performing a long press, release your finger and perform a swipe operation within a preset time after releasing your finger.
[0057] For example, after performing a long press, maintaining the press state while continuing with a swipe operation. This can be understood as follows: a press operation where the position remains unchanged is a long press operation; a press operation where the position changes is a swipe operation. For instance, if a user presses on the rotation control 202 and maintains the press position, this is considered a long press operation on the rotation control 202. If the user moves the pressed area while maintaining the press state, this is considered a swipe operation that follows the long press operation.
[0058] To illustrate, if precise rotation of the first virtual element 201 is required, the user can long press the rotation control 202. At this time, the scale and rotation degree will be displayed above the rotation control 202 in the interface 220. Long press the rotation control 202 and slide it to the left to control the first virtual element 201 to rotate clockwise, and long press the rotation control 202 and slide it to the right to control the first virtual element 201 to rotate counterclockwise. The rotation is performed in 1° increments, according to the rotation degree displayed on the scale (e.g., 30°).
[0059] In summary, the virtual element display method provided in this application integrates rapid and precise rotation of virtual elements into a single rotation control. Users can perform multiple rotation operations on virtual elements using a single rotation control on one interface. This provides high flexibility in rotation operations and simplifies the steps for implementing multiple rotation operations, thereby improving the efficiency of users controlling the rotation of virtual elements and reducing the waste of computer operating resources.
[0060] Next, the process of displaying virtual elements provided in this application will be introduced.
[0061] Figure 3 shows a flowchart of a virtual element display method provided by an exemplary embodiment of this application. Taking the application of the method to a computer device as an example, the computer device may be the terminal 110 shown in Figure 1. The method includes steps 310 to 330.
[0062] Step 310: Display the first virtual element in the virtual scene and display the editing controls.
[0063] In some embodiments, the virtual scene mentioned above refers to a virtual scene that can be customized and edited.
[0064] To illustrate, a target application is run on a computer device. This target application provides the ability to create custom virtual content, such as building a new virtual scene or editing and modifying the content displayed in an existing virtual scene.
[0065] Optionally, a scene editing interface is displayed, which includes a first virtual element in the virtual scene and editing controls.
[0066] In illustrative purposes, the above-mentioned scene editing interface can be an editing interface for game levels (e.g., shooting games, puzzle games, music games, survival games, racing games, speed games, etc.), an editing interface for virtual props, an editing interface for virtual characters, an editing interface for custom houses, an editing interface for virtual buildings, etc., and this application embodiment does not limit it in this way.
[0067] The first virtual element is a customizable element within the virtual scene. The number of first virtual elements can be one or more; this embodiment does not limit the number.
[0068] In illustrative purposes, the first virtual element mentioned above can be any editable display element in the virtual scene, such as: characters, props, scenes (such as various terrains, buildings, vegetation, etc.).
[0069] In some embodiments, the first virtual element is an element newly added to the virtual scene by the user. Optionally, in response to the addition operation of the first virtual element, the first virtual element is displayed in the virtual scene, and an editing control is displayed.
[0070] Schematic illustration: The above-described addition operation can be dragging a template element of the first virtual element into the virtual scene. After dragging, the first virtual element is displayed in the virtual scene based on the template element. Alternatively, the above-described addition operation can be a trigger operation for adding a control to the element of the first virtual element. The element addition control for the first virtual element is displayed in the scene editing interface, and in response to the trigger operation for adding the element control, the first virtual element in the virtual scene is displayed. This application embodiment does not limit the operation of adding virtual elements to the virtual scene. After adding the first virtual element, the user can edit and modify the first virtual element through the editing control.
[0071] In the above embodiments, in response to the addition operation of the first virtual element, the first virtual element and editing control are displayed in the virtual scene, thereby allowing the first virtual element to be edited and modified, realizing the rapid creation of the first virtual element and improving the creation efficiency of the first virtual element.
[0072] In some embodiments, the first virtual element can be an element that already exists in the virtual scene. Illustratively, in the scene editing interface, the virtual scene to be edited includes default virtual elements, which the user can directly edit and modify. Here, default virtual elements refer to elements that already exist in the virtual scene to be edited, rather than elements manually added to the virtual scene by the user.
[0073] The aforementioned editing controls are used to edit the first virtual element in the virtual scene, that is, to customize the first virtual element based on user operations.
[0074] Indicatively, the editing control includes at least one of the following: rotation control, scaling control, position adjustment control, transparency adjustment control, and layer adjustment control; this embodiment does not limit the specific type of control. The rotation control controls the rotation of the virtual element to change its rotation angle within the virtual scene; the scaling control adjusts the scaling ratio of the virtual element to achieve a magnification or reduction effect; the position adjustment control adjusts the position coordinates of the virtual element within the virtual scene; the transparency adjustment control adjusts the transparency of the virtual element; and the layer adjustment control controls the display layer of the virtual element within the virtual scene, thereby determining the occlusion relationship between elements.
[0075] Optionally, when the first virtual element is selected, an editing control for the first virtual element is displayed. Illustratively, when the first virtual element is selected, the computer device displays an editing control that matches the type or attributes of the first virtual element, allowing the user to edit the first virtual element using the editing control.
[0076] Optionally, one editing control corresponds to one editing operation, for example: a rotation control corresponds to a rotation operation, and a position adjustment control corresponds to a position adjustment operation.
[0077] Step 320: In response to the first trigger operation on the edit control, display the first transformation animation of the first virtual element.
[0078] The aforementioned first transformation animation includes an animation effect in which the first virtual element transforms with a preset transformation range. Illustratively, "the first virtual element transforms with a preset transformation range" means that the first virtual element transforms with a fixed transformation range.
[0079] Optionally, the preset transformation range may include at least one of the following: preset rotation angle, preset scaling ratio, preset distance, preset transparency, and preset level. This application embodiment does not limit this.
[0080] Optionally, the first triggering operation includes at least one of the following: a click operation (e.g., a single click or double click), a long press operation, a swipe operation, a multi-touch operation (i.e., a touch operation using multiple fingers), and a device shaking operation (i.e., an operation triggered by shaking a computer device). This application embodiment does not limit the specific actions taken in this regard. Optionally, the display of the first transformation animation includes at least one of the following:
[0081] 1. In response to a click on the edit control, display the first transformation animation.
[0082] As an illustration, clicking or double-clicking the editing control allows you to control the first virtual element to change by a preset transformation range. For example: rotating the first virtual element by a preset rotation angle in a preset direction; decreasing or increasing the transparency of the first virtual element by a preset preset transparency, or adjusting it to a preset transparency; moving the first virtual element a preset distance in a preset direction; decreasing or increasing the scaling of the first virtual element by a preset preset scaling, or adjusting it to a preset scaling; adjusting the layer of the first virtual element up or down by a preset preset layer, or adjusting it to a preset layer.
[0083] 2. In response to a double-click operation on the edit control, display the first transformation animation.
[0084] In some embodiments, the virtual scene includes a second virtual element, and the first and second virtual elements are associated. The first transformation animation includes an animation effect in which the first and second virtual elements transform synchronously with a preset transformation amplitude.
[0085] For illustration purposes, the first and second virtual elements belong to the same editing group. Transforming any virtual element within the same editing group will cause other virtual elements in the group to undergo corresponding transformations. Alternatively, the first virtual element is the parent element of the second virtual element, and the second virtual element is the child element (or subordinate element) of the first virtual element. When the parent element undergoes a transformation, the child element can follow suit and undergo the corresponding transformation.
[0086] In the above embodiments, by using the double-click operation as the first trigger operation, batch transformation of virtual elements is achieved, thereby improving the efficiency of editing virtual elements.
[0087] It should be noted that the above examples of displaying the first transformation animation are merely illustrative and are not intended to limit the scope of this application.
[0088] Optionally, the preset transformation range of the first trigger operation configuration is the default.
[0089] Alternatively, the preset transformation range of the first trigger operation configuration is set by the user in the scene editing interface.
[0090] The diagram illustrates a first setting area, which is used to configure the transformation amplitude corresponding to a first trigger operation. In response to the amplitude configuration operation for the first trigger operation in the first setting area, a preset transformation amplitude is configured for the first trigger operation. This amplitude configuration operation is used to configure a preset transformation amplitude for the first trigger operation.
[0091] Schematic illustration: Before the first trigger operation is detected, a first setting area for the first virtual element is displayed in the scene editing interface. This first setting area is used to configure the preset transformation amplitude of the first virtual element when the first trigger operation is triggered. Optionally, an amplitude input box or an amplitude list is displayed in the first setting area. By entering the preset transformation amplitude in the amplitude input box or selecting the preset transformation amplitude from the amplitude list, the preset transformation amplitude corresponding to the first trigger operation can be configured.
[0092] In the above embodiments, by providing a first setting area, the user can configure the preset transformation range corresponding to the first trigger operation before executing the first trigger operation. That is, the user can customize the preset transformation range, thereby improving the flexibility of controlling the first virtual element to transform through the first trigger operation.
[0093] Step 330: In response to the second trigger operation on the editing control, the second transformation animation of the first virtual element is displayed in real time following the second trigger operation.
[0094] The aforementioned second transformation animation includes an animation effect in which the first virtual element transforms with the dynamic transformation amplitude corresponding to the second triggering operation.
[0095] In other words, the first virtual element will perform a corresponding dynamic transformation based on the second trigger operation performed by the user. Unlike the preset transformation amplitude in the first transformation animation, the dynamic transformation amplitude in the second transformation animation is directly related to the user's second trigger operation. Illustratively, in the second transformation animation, the transformation amplitude is calculated and adjusted in real time based on the operation parameters of the user's second trigger operation.
[0096] Optionally, the dynamic transformation amplitude includes at least one of dynamic rotation angle, dynamic scaling ratio, dynamic movement distance, dynamic transparency, and dynamic hierarchical relationship, and the embodiments of this application do not limit this.
[0097] Optionally, the second triggering operation includes at least one of the following: a click operation (e.g., a single click or double click), a long press operation, a swipe operation, a multi-touch operation (i.e., a touch operation using multiple fingers), and a device shaking operation (i.e., an operation triggered by shaking a computer device). This application embodiment does not limit the specific triggering operation. The first and second triggering operations are different. Optionally, the display of the second transformation animation includes at least one of the following:
[0098] 1. After detecting a long press operation on the edit control, in response to the swipe operation that follows the long press operation, a second transformation animation is displayed in real time following the swipe operation.
[0099] The second transformation animation includes an animation effect where the first virtual element transforms with a dynamic transformation amplitude corresponding to the sliding operation. Optionally, the dynamic transformation amplitude is determined based on the sliding parameters corresponding to the sliding operation. The sliding parameters include at least one of sliding distance, sliding speed, sliding direction, and sliding force, where sliding force refers to the pressure applied during the sliding operation.
[0100] To illustrate, the dynamic change amplitude is positively correlated with the sliding distance, that is, the longer the sliding distance, the greater the dynamic change amplitude; the dynamic change amplitude is positively correlated with the sliding speed, that is, the faster the sliding speed, the greater the dynamic change amplitude; and the dynamic change amplitude is positively correlated with the sliding force, that is, the greater the sliding force, the greater the dynamic change amplitude.
[0101] In the above embodiments, the second trigger operation is achieved by long-pressing and sliding, thereby enabling precise adjustment of the transformation range of the first virtual element. Users do not need to click or switch interfaces multiple times; they only need to perform a combination of long-press and sliding to adjust the transformation range, simplifying the adjustment process and improving operational efficiency.
[0102] Optionally, in response to a long press operation, amplitude indicator information is displayed, which indicates the transformation amplitude corresponding to the first virtual element; in response to a swipe operation following the long press operation, a second transformation animation and an information change animation are displayed, which includes an animation effect that updates the amplitude indicator information according to the dynamic transformation amplitude corresponding to the swipe operation.
[0103] Indicatively, the amplitude indication information includes an amplitude indication element that indicates the transformation amplitude corresponding to the first virtual element; in response to a swipe operation that connects to a long press operation, a second transformation animation and an element change animation are displayed, the element change animation including an animation effect that updates the amplitude indication element according to the dynamic transformation amplitude corresponding to the swipe operation.
[0104] Schematic, the above amplitude indication information can be implemented as at least one of the following display information:
[0105] (1) Progress bar indication information.
[0106] Indicatively, the progress bar information includes a progress bar element. The length of the progress bar element or the position of the slider element on the progress bar element indicates the transformation range of the first virtual element. As the sliding operation proceeds, the length of the progress bar element or the position of the slider element on the progress bar element will change dynamically, thus providing a real-time representation of the current transformation range of the first virtual element.
[0107] (2) Dynamic text instructions.
[0108] The illustrative, dynamic text indicators include numerical values, such as transparency and angle. The magnitude of these values represents the transformation range of the first virtual element. As the swipe operation progresses, the values are updated in real time, informing the user of the current transformation range, thus providing a real-time representation of the current transformation range of the first virtual element.
[0109] (3) Icon changes indicate information.
[0110] Indicatively, icon changes indicate changes in the icon's size, color, shape, and other attributes, representing the magnitude of the change corresponding to the first virtual element. For example, as the swipe operation progresses, the icon's size may gradually increase or decrease, thus reflecting changes in the magnitude of the change.
[0111] (4) Color indication information.
[0112] Indicative, different colors or shades of color are used to represent different ranges of change.
[0113] (5) Scale indication information.
[0114] Indicatively, the scale indication information includes a scale bar and scale indicator elements. The scale bar represents the range of change of a certain quantity (e.g., angle) by marking equally divided scales on a straight line. As the sliding operation proceeds, the position of the scale indicator elements on the scale bar changes dynamically, thereby providing a real-time representation of the current transformation range of the first virtual element.
[0115] It should be noted that the above examples of amplitude indication information are merely illustrative and are not intended to limit the scope of this application.
[0116] In the above embodiments, under precise transformation conditions, a long press displays an amplitude indicator. This amplitude indicator provides real-time feedback on the current dynamic range of change, allowing users to more precisely control the amplitude of the operation. Users can fine-tune the operation based on changes in the amplitude indicator until the desired transformation amplitude is achieved. Furthermore, because the amplitude indicator provides immediate feedback, users can more accurately judge the progress and amplitude of the operation, thereby reducing misoperations caused by improper operation or misunderstanding.
[0117] 2. In response to a long press operation on the editing control, a second setting area is displayed, which includes an amplitude adjustment control; in response to a movement operation on the amplitude adjustment control, the amplitude adjustment control is moved within the second setting area, and a second transformation animation is displayed.
[0118] The amplitude adjustment control is used to adjust the transformation amplitude of the first virtual element; the move operation is used to move the amplitude adjustment control within the second setting area; the dynamic transformation amplitude corresponding to the second transformation animation is determined based on the position of the amplitude adjustment control within the second setting area.
[0119] Indicatively, the second setting area can be a progress bar with scales, each scale corresponding to a specific amplitude value. Alternatively, the color of the progress bar can gradually change as the amplitude increases, such as from light to dark. The amplitude adjustment control is presented as a sliding element on the progress bar. Users can drag the sliding element to change the transformation amplitude of the first virtual element. The sliding element includes at least one of the following: a movable dot, a square, or a custom icon, etc., which is not limited in this embodiment. Users can long-press the sliding element and then drag it to any position on the progress bar to set the desired transformation amplitude. The position of the sliding element corresponds to the current transformation amplitude. When the sliding element moves to a certain position, the first virtual element will transform with the transformation amplitude corresponding to that position, thereby displaying the second transformation animation.
[0120] Alternatively, the second setting area can be implemented as a circular dial, with the amplitude adjustment control implemented as a pointer element on the dial. Users can adjust the amplitude by rotating the pointer element, and the circular dial contains scales to indicate different amplitudes.
[0121] In the above embodiments, after the user triggers a long press operation, the second setting area is brought up. The user can move the amplitude adjustment control in the second setting area, thereby changing the first virtual element according to the real-time position of the amplitude adjustment control. By bringing up the second setting area, a dedicated interface is provided for the user to perform amplitude adjustment operations, making the element adjustment process more flexible and intuitive.
[0122] It is worth noting that the above description only uses the long press operation as an example. The operation type that triggers the display of the second settings area can also include other types, such as: click operation, double click operation, etc. The operation that triggers the display of the second settings area is different from the first trigger operation, and this application embodiment does not limit this.
[0123] 3. After detecting a long press operation on the editing control, in response to a first click operation on a first position in the virtual scene and a second click operation on a second position in the virtual scene, a second transformation animation is displayed.
[0124] The dynamic transformation amplitude corresponding to the second transformation animation is determined based on the distance between the first and second positions. For example, the dynamic rotation angle or dynamic transparency is determined based on the change in the horizontal coordinate between the first and second positions.
[0125] In the above embodiments, the dynamic transformation amplitude of the second transformation animation is determined based on the distance between the first and second positions, allowing users to flexibly control the scale and range of the transformation according to actual needs. Furthermore, through a combination of long press and click, users can quickly trigger the transformation animation without cumbersome steps or waiting time, improving operational efficiency and enabling users to complete editing tasks more quickly.
[0126] 4. In response to a long press on the edit control, display the amplitude input box. In response to input in the amplitude input box, display a second transformation animation based on the input amplitude.
[0127] As an illustration, after detecting a long press on the edit control, an amplitude input box is displayed, allowing the user to directly input the desired transformation amplitude. While the user is inputting data into this amplitude input box, the computer device displays a second transformation animation in real time based on the input amplitude.
[0128] It should be noted that the above examples of displaying the second transformation animation are merely illustrative and are not intended to limit the scope of this application.
[0129] In some embodiments, if both the first triggering operation and the second triggering operation are implemented as tap operations (e.g., click, long press, etc.), the computer device can detect the duration of the tap operation initiated by the user to determine whether the currently triggered tap operation belongs to the first triggering operation or the second triggering operation. Here, a tap operation refers to the operation of clicking or pressing the editing control area.
[0130] Optionally, if the duration of the tap operation is less than or equal to a duration threshold, the tap operation is considered a first trigger operation. After detecting the first tap operation on the edit control, in response to the end of the first tap operation and the duration of the first tap operation being less than the duration threshold, the first transformation animation of the first virtual element is displayed. Here, the duration of the first tap operation refers to the time between the start and end of the first tap operation.
[0131] That is, after detecting the first tap operation on the editing control, in response to the end of the first tap operation and the operation duration of the first tap operation being less than or equal to the duration threshold, the first tap operation is used as the first trigger operation to display the first transformation animation of the first virtual element.
[0132] To illustrate, we will use the example of a click operation as the first trigger operation and a combination of a long press operation and a swipe operation as the second trigger operation.
[0133] Optionally, the aforementioned duration threshold can be a pre-set threshold. For example, if the duration threshold is set to 0.3 seconds, then when the user's tap duration on the edit control (i.e., the duration of the first tap operation) is less than or equal to 0.3 seconds, the user performs the first trigger operation, and the first transformation animation is displayed. Here, the tap duration refers to the time elapsed from the start of the tap to the end of the tap.
[0134] Optionally, if the duration of a tap operation exceeds a duration threshold, the tap operation is considered a second trigger operation. After detecting a second tap operation on the edit control, in response to the second tap operation's duration exceeding the duration threshold, a second transformation animation of the first virtual element is displayed in real-time following the second tap operation. Specifically, before the second tap operation ends, the duration of the second tap operation refers to the time between the start of the tap operation and the current time, where the current time refers to the moment when the second tap operation on the edit control is currently being performed. After the second tap operation ends, the duration of the second tap operation refers to the time between the start and end of the second tap operation.
[0135] That is, after detecting a second tap on the editing control, in response to the second tap operation duration being greater than the duration threshold, the second tap operation is used as a second trigger operation, and the second transformation animation of the first virtual element is displayed in real time following the second trigger operation.
[0136] For illustrative purposes, if the duration of the user's tap on the edit control (i.e., the duration of the second tap operation) is greater than 0.3 seconds, the user performs the second trigger operation. The duration of the tap refers to the time from when the user starts tapping to the current moment. It is a dynamically changing value that increases as the user continues to press.
[0137] In the above embodiments, the duration of the tap operation determines whether the tap operation on the editing control is a first trigger operation or a second trigger operation, thereby improving the accuracy and convenience of the user's editing operation.
[0138] In some embodiments, a first account is logged into the computer device, and the duration threshold can be dynamically updated using historical operation data generated by the first account.
[0139] Optionally, the operation duration of multiple target click operations generated by the first account within a historical time period is obtained. Multiple target click operations refer to historical click operations belonging to the first trigger operation. The operation duration of a target click operation refers to the duration between the start and end times of the target click operation. The duration threshold is updated based on the operation duration of multiple target click operations.
[0140] Optionally, the minimum duration among the operation durations of multiple target points can be used as the duration threshold; or the average duration of the operation durations of multiple target points can be used as the duration threshold; or the median duration of the operation durations of multiple target points can be used as the duration threshold, etc., and the embodiments of this application do not limit this.
[0141] To illustrate, let's take the average value as an example. Suppose that within a historical time period, a user triggered the first trigger action four times, with the duration of each action being 0.1 seconds, 0.2 seconds, 0.1 seconds, and 0.2 seconds respectively. Then, 0.15 can be used as the latest duration threshold. By dynamically adjusting the duration threshold, it can be better aligned with user expectations and operating habits.
[0142] Optionally, in the above embodiments, when a tap operation is performed on the editing control, the appearance of the editing control can be changed to indicate to the user whether the current operation performed on the editing control is the first trigger operation or the second trigger operation. For example, assuming the duration threshold is 0.3 seconds, when the user taps the editing control, the editing control is displayed in red from 0 seconds to 0.3 seconds, indicating that the current trigger operation is the first trigger operation. After 0.3 seconds, the editing control is displayed in green, indicating that the current trigger operation is the second trigger operation.
[0143] In summary, users can customize virtual elements in a virtual scene by triggering the editing control. When the first trigger operation is performed on the editing control, the virtual element will change according to a preset transformation range, without requiring the user to manually set or adjust the transformation range, thus achieving rapid transformation control of the virtual element. When the second trigger operation is performed on the editing control, the virtual element will follow the second trigger operation and change according to the dynamic transformation range corresponding to the second trigger operation. Therefore, by controlling the second trigger operation, the transformation range of the virtual element can be precisely controlled, thus achieving precise transformation control of the virtual element. Therefore, by integrating rapid transformation control and precise transformation control of virtual elements into a single editing control, users can complete multiple transformation controls of virtual elements within a single editing control, improving the flexibility of transformation control of virtual elements and simplifying the operation steps for implementing multiple transformation controls. This improves the efficiency of user operation in controlling virtual element transformations and reduces the waste of computer operating resources.
[0144] The following section uses the example of implementing an edit control as a rotation control to introduce the process of displaying virtual elements provided in this application.
[0145] The above-described embodiment in Figure 3 can also be implemented as the method shown in Figure 4. Figure 4 shows a flowchart of a virtual element display method provided by an exemplary embodiment of this application. Taking the application of this method to a computer device as an example, the computer device can be the terminal 110 shown in Figure 1. The method includes steps 410 to 430.
[0146] Step 410: Display the first virtual element in the virtual scene and display the rotation control.
[0147] The rotation control is used to control the rotation of the first virtual element within the virtual scene.
[0148] Optionally, the number of rotation controls can be one or more. When there are multiple rotation controls, each control controls a different rotation direction.
[0149] Schematic illustration: When there is only one rotation control, it can control the first virtual element to rotate clockwise or counterclockwise. When the rotation control includes a first rotation control and a second rotation control, the first rotation control and the second rotation control control the first virtual element to rotate in different directions; wherein, the first rotation control can control the first virtual element to rotate clockwise or counterclockwise, and the second rotation control can control the first virtual element to rotate counterclockwise or clockwise.
[0150] Step 420: In response to the first trigger operation on the rotation control, display the first rotation animation of the first virtual element.
[0151] The first rotation animation includes the animation effect of the first virtual element rotating at a preset rotation angle.
[0152] Optionally, the first rotation animation includes an animation effect in which the first virtual element rotates at a preset rotation angle and a first rotation direction.
[0153] In some embodiments, the preset rotation angle is the system default rotation angle.
[0154] In some embodiments, the preset rotation angle is a user-configured rotation angle. Optionally, a first setting area is displayed, which is used to configure the preset rotation angle corresponding to the first trigger operation; in response to the angle configuration operation of the first trigger operation in the first setting area, a preset rotation angle is configured for the first trigger operation. The angle configuration operation is used to configure the preset rotation angle for the first trigger operation.
[0155] Schematic illustration: Before the first trigger operation is detected, a first setting area for the first virtual element is displayed in the scene editing interface. This first setting area is used to configure the preset rotation angle of the first virtual element when the first trigger operation is triggered. Optionally, an angle input box or an angle list is displayed in the first setting area. By entering the preset rotation angle in the angle input box or selecting the preset rotation angle from the angle list, the preset rotation angle corresponding to the first trigger operation can be configured.
[0156] Optionally, the first rotation animation includes an animation effect of the first virtual element rotating at a preset rotation angle and a first rotation direction.
[0157] In some embodiments, if there is only one rotation control, then when performing the first trigger operation on the rotation control, it is also necessary to determine the first rotation direction of the first virtual element. Optionally, the determination of the first rotation direction of the first virtual element includes at least one of the following:
[0158] Case 1: The first rotation direction of the first virtual element is a preset rotation direction.
[0159] In some embodiments, the first rotation direction is the system default angle.
[0160] In some embodiments, the first rotation direction is a user-preconfigured angle. Optionally, the first setting area is further configured to configure the first rotation direction corresponding to the first trigger operation; in response to the direction configuration operation of the first trigger operation in the first setting area, the first rotation direction is configured for the first trigger operation. The direction configuration operation is used to configure the first rotation direction for the first trigger operation.
[0161] Indicatively, a direction input box or direction list is displayed in the first setting area. By entering the first rotation direction in the angle input box or selecting the first rotation direction from the angle list, the configuration of the first rotation direction corresponding to the first trigger operation is completed.
[0162] In the above embodiments, the computer device can directly respond to the preset rotation action, thereby simplifying the operation process and improving the operation response speed.
[0163] Scenario 2: The first rotation direction of the first virtual element is determined based on the first trigger operation.
[0164] Optionally, the first rotation direction is determined based on the trigger position of the first trigger operation in the rotation control. Illustratively, the rotation control is divided into left and right regions. When the trigger position of the first trigger operation on the rotation control is in the left region, the first rotation direction corresponding to the first virtual element is clockwise; when the trigger position of the first trigger operation on the rotation control is in the right region, the first rotation direction corresponding to the first virtual element is counterclockwise.
[0165] In the above embodiments, determining the rotation direction by the trigger position makes the triggering operation more flexible, allowing users to trigger different rotation effects at different positions of the rotation control according to their needs.
[0166] In some embodiments, if there are multiple rotation controls, the rotation direction corresponding to the rotation control triggered by the first triggering operation is taken as the first rotation direction of the first virtual element.
[0167] Schematic illustration: When the rotation control includes a first rotation control and a second rotation control, the first rotation control can control the first virtual element to rotate clockwise, and the second rotation control can control the first virtual element to rotate counterclockwise. If a first trigger operation is detected on the first rotation control, the first rotation direction of the first virtual element is clockwise; if a first trigger operation is detected on the second rotation control, the first rotation direction of the first virtual element is counterclockwise.
[0168] Optionally, the first triggering operation includes at least one of the following: a click operation (e.g., a single click or a double click), a long press operation, or a swipe operation. This application embodiment does not limit this.
[0169] Taking the first trigger operation as a click operation as an example, optionally, in response to the click operation on the rotation control, the first rotation animation of the first virtual element is displayed.
[0170] For illustration, please refer to Figure 5, which shows a schematic diagram of a first trigger operation. As shown in Figure 5, in interface 500, an item 501 in a virtual scene and a rotation control 502 are displayed. After the user clicks the rotation control 502, as shown in interface 510, item 501 will rotate 90° clockwise.
[0171] In some embodiments, the first virtual element corresponds to multiple rotation axes, and the rotation axes need to be determined when the first virtual element rotates. For example, the first virtual element includes a three-dimensional virtual element in a three-dimensional virtual scene, and the multiple rotation axes corresponding to the three-dimensional virtual element include the X-axis, Y-axis, and Z-axis. Optionally, the determination of the rotation axes of the first virtual element includes at least one of the following:
[0172] 1. Before triggering the first trigger operation, select the first rotation axis as the rotation axis of the first virtual element.
[0173] Optionally, a rotation axis selection area is displayed; upon detecting a selection operation on a first rotation axis within the rotation axis selection area, in response to a first trigger operation on the rotation control, a first rotation animation of the first virtual element is displayed. The first rotation animation includes an animation effect of the first virtual element rotating around the first rotation axis.
[0174] The rotation axis selection area includes multiple rotation axes. Optionally, the multiple rotation axes include the X-axis, Y-axis, Z-axis, etc. Illustratively, the rotation axis selection area can be implemented as a list, icon, control, etc. This application embodiment does not limit this implementation.
[0175] For list-based selection, the rotation axis selection area can be implemented as a list of rotation axes, such as the X-axis, Y-axis, and Z-axis. Users can select one of these three rotation axes as the first virtual element, i.e., the first rotation axis.
[0176] For the icon format, the rotation area of the rotation axis can be implemented as a three-dimensional coordinate axis icon, which includes the X-axis, Y-axis, and Z-axis. Rotating this three-dimensional coordinate axis icon can change the rotation axis of the current first virtual element.
[0177] For the control format, the rotation area of the rotation axis can implement three trigger buttons, which represent the X-axis, Y-axis, and Z-axis respectively. When the user clicks the trigger button represented by the X-axis, the trigger button will be highlighted, indicating that the X-axis is selected as the rotation axis of the first virtual element.
[0178] 2. Determine the first rotation axis corresponding to the first virtual element based on the triggering stage at the end of the first triggering operation.
[0179] Optionally, the first trigger operation includes multiple trigger stages, each corresponding to a different rotation axis. After detecting the first trigger operation on the rotation control, in response to the end of the first trigger operation, a first rotation animation is displayed based on the trigger stage at the end of the first trigger operation. The trigger stage at the end of the first trigger operation corresponds to a first rotation axis, and the first rotation animation includes an animation effect of the first virtual element rotating around the first rotation axis.
[0180] The first triggering operation includes multiple triggering stages, including a first triggering stage, a second triggering stage, and a third triggering stage. The rotation axis corresponding to the first triggering stage is the X-axis, the rotation axis corresponding to the second triggering stage is the Y-axis, and the rotation axis corresponding to the third triggering stage is the Z-axis.
[0181] The following explanation uses a click operation as an example to illustrate the first triggering operation. Optionally, this click operation can be a series of clicks, such as three consecutive clicks. The first click represents the first triggering phase, the second click represents the second triggering phase, and the third click represents the third triggering phase. After the first click, if the second click is not triggered within a preset time, the first triggering operation ends. That is, the operation phase at the end of the first triggering operation is the first triggering phase, and the first rotation axis is determined to be the X-axis. After the second click, if the third click is not triggered within a preset time, the first triggering operation ends. That is, the operation phase at the end of the first triggering operation is the second triggering phase, and the first rotation axis is determined to be the Y-axis. After the third click, the first triggering operation ends. That is, the operation phase at the end of the first triggering operation is the third triggering phase, and the first rotation axis is determined to be the Z-axis.
[0182] The following explanation uses a long press operation as an example to illustrate the first triggering operation. Optionally, the duration of the long press operation is divided into a first operation period (corresponding to the first triggering stage), a second operation period (corresponding to the second triggering stage), and a third operation period (corresponding to the third triggering stage). Illustratively, assuming an operation duration of 3 seconds, if the long press duration is within the range of (0 seconds, 1 second), the long press operation ends, indicating that the operation stage at the end of the first triggering operation is the first triggering stage, and the first rotation axis is determined as the X-axis. If the long press duration is within the range of (1 second, 2 seconds), the long press operation ends, indicating that the operation stage at the end of the first triggering operation is the second triggering stage, and the first rotation axis is determined as the Y-axis. If the long press duration is within the range of (2 seconds, 3 seconds), the long press operation ends, indicating that the operation stage at the end of the first triggering operation is the third triggering stage, and the first rotation axis is determined as the Z-axis.
[0183] Optionally, if the long press operation does not end after reaching the third trigger stage, the above judgment process is repeated. That is, if the long press duration is within the range of (3 seconds, 4 seconds), the long press operation ends, indicating that the operation stage of the first trigger operation at the end time is the first trigger stage, and the first rotation axis is determined to be the X-axis. This will not be elaborated further here.
[0184] It should be noted that the examples of triggering operations and triggering stages mentioned above are merely illustrative and are not intended to limit the scope of this application.
[0185] Optionally, the appearance of the rotation control can differ at different triggering stages. These appearances include fill color, transparency, shape, fill texture, size, and fill text, etc., but this embodiment does not limit these aspects.
[0186] Taking color as an example, when the first trigger operation is in the first trigger stage, the fill color of the rotation control is red; when the first trigger operation is in the second trigger stage, the fill color of the rotation control is blue; and when the first trigger operation is in the third trigger stage, the fill color of the rotation control is green.
[0187] In some embodiments, the rotation control may be implemented as a progress bar.
[0188] To illustrate, assuming an operation duration of 3 seconds, a long press on the rotation control will cause the progress bar-like control to change its progress value based on the press duration. If the long press duration is within the range of 0 seconds to 1 second, a first progress value increase animation will be displayed (e.g., the first third of the white progress bar gradually fills with red). If the long press operation ends during this period, the operation phase of the first trigger operation is the first trigger phase, and the first rotation axis is determined to be the X-axis. If the long press duration is within the range of 1 second to 2 seconds, a second progress value increase animation will be displayed (e.g., the middle third of the white progress bar gradually fills with blue). If the long press operation ends during this period, the operation phase of the first trigger operation is the second trigger phase, and the first rotation axis is determined to be the Y-axis. If the long press duration is within the range of 2 seconds to 3 seconds, a third progress value increase animation will be displayed (e.g., the last third of the white progress bar gradually fills with green). If the long press operation ends during this period, the operation phase of the first trigger operation is the third trigger phase, and the first rotation axis is determined to be the Z-axis.
[0189] Optionally, the preset rotation angles corresponding to different rotation axes can be the same or different. For example, different rotation axes may have the same preset rotation angle, meaning that regardless of whether the currently triggered rotation axis is the X-axis, Y-axis, or Z-axis, the angle of a single triggered rotation is always the preset rotation angle. Alternatively, different rotation axes may have different preset rotation angles, for example: a preset rotation angle of 45 degrees for the X-axis, 90 degrees for the Y-axis, and 15 degrees for the Z-axis.
[0190] In the above embodiments, the rotation axis of the first virtual element during rotation is determined based on the triggering stage at the end of the first triggering operation. On the one hand, determining the rotation axis during the execution of the first triggering operation eliminates the need for determining the rotation axis through other operations, thus improving the efficiency of the rotation operation. On the other hand, the user can determine the rotation axis simultaneously with the execution of the first triggering operation, thereby determining the rotation axis more accurately. This helps ensure that the virtual element rotates as the user expects, reducing the possibility of misoperation.
[0191] Step 430: In response to the second trigger operation on the rotation control, the second rotation animation of the first virtual element is displayed in real time following the second trigger operation.
[0192] The second rotation animation includes an animation effect where the first virtual element rotates at a dynamic rotation angle corresponding to the second trigger operation. The first trigger operation and the second trigger operation are different.
[0193] Optionally, the second rotation animation includes an animation effect in which the first virtual element rotates at a dynamic rotation angle and a second rotation direction corresponding to the second triggering operation.
[0194] In some embodiments, if there is only one rotation control, then when performing the second trigger operation on the rotation control, it is also necessary to determine the second rotation direction of the first virtual element. Optionally, the determination of the second rotation direction of the first virtual element includes at least one of the following:
[0195] Case 1: The second rotation direction of the first virtual element is a pre-set rotation direction.
[0196] In some embodiments, the second rotation direction is the system default angle.
[0197] In other embodiments, the second rotation direction is a user-preconfigured angle. Optionally, a third setting area is displayed, which is used to configure the second rotation direction corresponding to the second trigger operation; in response to the direction configuration operation of the second trigger operation in the third setting area, the second rotation direction is configured for the second trigger operation. This direction configuration operation is used to configure the second rotation direction for the second trigger operation.
[0198] Schematic illustration: Before the second trigger operation is detected, a third setting area corresponding to the first virtual element is displayed in the scene editing interface. This third setting area is used to configure the second rotation direction of the first virtual element when the second trigger operation is triggered. A direction input box or a direction list is displayed in the third setting area. By entering the second rotation direction in the angle input box or selecting the second rotation direction from the angle list, the configuration of the second rotation direction corresponding to the second trigger operation is completed.
[0199] Scenario 2: The second rotation direction of the first virtual element is determined based on the second triggering operation.
[0200] Optionally, the second rotation direction is determined based on the trigger position of the second trigger operation within the rotation control. Illustratively, the rotation control is divided into left and right regions. When the trigger position of the second trigger operation on the rotation control is in the left region, the second rotation direction corresponding to the first virtual element is clockwise; when the trigger position of the first trigger operation on the rotation control is in the right region, the second rotation direction corresponding to the first virtual element is counter-clockwise.
[0201] In some embodiments, the second triggering operation described above is implemented as a long press operation and a swipe operation. After detecting a long press operation on the rotation control, in response to a swipe operation following the long press operation, a second rotation animation is displayed in real time following the swipe operation.
[0202] Optionally, the second rotation direction of the first virtual element is determined based on the sliding direction of the sliding operation. Illustratively, when the sliding direction of the sliding operation is within the first angle range, the second rotation direction of the first virtual element is clockwise; when the sliding direction of the sliding operation is within the second angle range, the second rotation direction of the first virtual element is counterclockwise.
[0203] To illustrate, assuming the sliding operation is effective in all 360 degrees, the first angle range can be set to (180 degrees, 360 degrees) and the second angle range to [0 degrees, 180 degrees]. The first angle range of (180 degrees, 360 degrees) can be implemented as the angle on the left side of the computer device, that is, when the sliding direction of the operation is left, the second rotation direction of the first virtual element is clockwise. The second angle range of [0 degrees, 180 degrees) can be implemented as the angle on the right side of the computer device, that is, when the sliding direction of the operation is right, the second rotation direction of the first virtual element is counterclockwise.
[0204] In some embodiments, if there are multiple rotation controls, the rotation direction corresponding to the rotation control triggered by the second triggering operation is taken as the second rotation direction of the first virtual element.
[0205] Schematic illustration: When the rotation control includes a first rotation control and a second rotation control, the first rotation control can control the first virtual element to rotate clockwise, and the second rotation control can control the first virtual element to rotate counterclockwise. If a second trigger operation is detected on the first rotation control, the second rotation direction of the first virtual element is clockwise; if a second trigger operation is detected on the second rotation control, the second rotation direction of the first virtual element is counterclockwise.
[0206] Optionally, the second triggering operation includes at least one of the following: a click operation (e.g., a single click or a double click), a long press operation, or a swipe operation. This application embodiment does not limit this.
[0207] In some embodiments, after a long press operation on the rotation control is detected, a second rotation animation is displayed in real time following a slide operation that follows the long press operation. The second rotation animation includes an animation effect where the first virtual element rotates at a dynamic rotation angle corresponding to the slide operation and in a second rotation direction.
[0208] Optionally, in response to a long press operation, an angle indicator is displayed, which indicates the current rotation angle of the first virtual element in the virtual scene; in response to a swipe operation that follows the long press operation, a second rotation animation and an indicator change animation are displayed, which includes an animation effect that updates the angle indicator according to the dynamic rotation angle corresponding to the swipe operation.
[0209] Optionally, the aforementioned angle marker can be implemented as a scale display area. Illustratively, in response to a long press operation, a scale display area is displayed, which includes a scale bar and a scale indicator element, wherein the position of the scale indicator element on the scale bar indicates the current rotation angle of the first virtual element in the virtual scene.
[0210] For illustrative purposes, please refer to Figure 6, which shows a schematic diagram of a scale display area. As shown in Figure 6, the rotation angle corresponding to each scale division is 15°. It should be noted that the example of the rotation angle corresponding to each scale division here is only for illustrative purposes, and the embodiments of this application do not limit it. For example, the rotation angle corresponding to each scale division can also be 1°, 5°, 30°, etc.
[0211] In the initial state 601, the scale indicator element (the inverted triangle symbol in Figure 6) indicates that the initial rotation angle of the first virtual element is 0°. The scale indicator element may also include the text "0°" to clearly indicate the current rotation angle of the first virtual element.
[0212] If you press and hold the rotation control and then slide it to the right, the relative position between the scale bar and the scale indicator element will change. For example, pressing and holding the rotation control and then sliding it to the right will move the scale bar one unit to the right, indicating that the first virtual element will rotate 15° counterclockwise.
[0213] In one scenario, in response to a sliding operation, the scale indicator element is fixed while the movement animation of the scale bar is displayed; or, in response to a sliding operation, the scale bar is fixed while the movement animation of the scale indicator element is displayed. The following example illustrates the movement of the scale bar.
[0214] Please refer to Figure 7. Schematic diagram 700 shows that after pressing and holding the rotation control, sliding to the left moves the scale bar two positions to the left, indicating that the first virtual element rotates 30° clockwise. Please refer to Figure 8. Schematic diagram 800 shows that after pressing and holding the rotation control, sliding to the right moves the scale bar one position to the right, indicating that the first virtual element rotates 15° counterclockwise.
[0215] Optionally, the dynamic rotation angle is a rotation angle determined based on the sliding parameters corresponding to the sliding operation. These sliding parameters include at least one of sliding distance, sliding speed, sliding direction, and sliding force. An example is given where the dynamic rotation angle is determined based on the sliding distance and sliding direction corresponding to the sliding operation.
[0216] To illustrate, when sliding horizontally to the left or right, the rotation angle is determined directly by the sliding distance; when sliding to the left, the item rotates 1° clockwise along the horizontal direction for every 1px movement of the horizontal coordinate; when sliding to the right, the item rotates 1° counterclockwise along the horizontal direction for every 1px movement of the horizontal coordinate.
[0217] When sliding to the left or right (not horizontally), the horizontal coordinate movement distance is calculated based on the sliding distance, and the rotation angle is determined based on the horizontal coordinate distance. For illustration, please refer to Figure 9, which shows a schematic diagram of the horizontal coordinate distance. As shown in Figure 9, when sliding X distance in a 45° direction to the upper left of the screen, the horizontal coordinate movement distance can be calculated as X / √2. If the movement distance X (i.e., the sliding distance) is √2 (in pixels), then the horizontal coordinate movement distance is 1px. At this time, the item rotates 1° clockwise along the horizontal direction.
[0218] It should be noted that the embodiments of this application do not limit the correspondence between the horizontal coordinate movement and the angle, that is, the correspondence between 1px and 1°. For example, 1px can also correspond to 5°. That is, when sliding to the left, the horizontal coordinate moves by 1px and the item rotates 5° clockwise in the horizontal direction; when sliding to the right, the horizontal coordinate moves by 1px and the item rotates 5° counterclockwise in the horizontal direction.
[0219] For illustrative purposes, please refer to Figure 10, which illustrates a schematic diagram of a second trigger operation. As shown in Figure 10, interface 1000 displays an item 1001 in a virtual scene and a rotation control 1002. After the user long-presses the rotation control 1002, as shown in interface 1010, a scale display area 1003 is displayed. This scale display area 1003 includes a scale bar and a scale indicator element. The scale indicator element displays 0°, indicating that the current rotation angle of item 1001 is 0°. While long-pressing the rotation control 1002, sliding it to the left moves the scale bar two units to the left, as shown in interface 1020. Item 1001 will rotate 30° clockwise, and at this time, the scale indicator element in the scale display area 1003 displays 30°.
[0220] In some embodiments, after a long press operation on the rotation control is detected, a second rotation animation is displayed in response to a first click operation on a first position in the virtual scene and a second click operation on a second position in the virtual scene.
[0221] The dynamic rotation angle is determined based on the distance between the first and second positions. For illustration, assuming the distance between the first and second positions is 10px, the rotation angle of the first virtual element is 10°.
[0222] Optionally, in the above embodiments, the rotation direction of the first virtual element can also be determined based on the first position and the second position. If the first position is to the left of the second position, the rotation direction of the first virtual element is counterclockwise; if the first position is to the right of the second position, the rotation direction of the first virtual element is clockwise.
[0223] In some embodiments, the first virtual element corresponds to multiple rotation axes, and the rotation axes need to be determined when the first virtual element rotates. For example, the first virtual element includes a three-dimensional virtual element in a three-dimensional virtual scene, and the multiple rotation axes corresponding to the three-dimensional virtual element include the X-axis, Y-axis, and Z-axis. Optionally, the determination of the second rotation axis of the first virtual element includes at least one of the following:
[0224] 1. Before triggering the second trigger operation, select the second rotation axis as the rotation axis of the first virtual element.
[0225] Optionally, a rotation axis selection area is displayed; upon detecting a selection operation on a second rotation axis within the rotation axis selection area, in response to a second trigger operation on the rotation control, a second rotation animation is displayed in real time following the second trigger operation. The second rotation animation includes an animation effect of the first virtual element rotating around the second rotation axis.
[0226] The rotation axis selection area includes multiple rotation axes. Illustratively, the rotation axis selection area can be implemented as a list, icon, control, etc. This application embodiment does not limit this.
[0227] 2. Determine the second rotation axis corresponding to the first virtual element based on the second trigger operation.
[0228] Optionally, after detecting a long press operation on the editing control, in response to a sliding operation that follows the long press operation, a second rotation animation is displayed in real time following the sliding operation based on the long press duration. The long press duration corresponds to a second rotation axis, and the second rotation animation includes an animation effect of the first virtual element rotating around the second rotation axis.
[0229] Indicatively, after a long press operation on the editing control is detected, in response to a sliding operation following the long press operation, the display mode of the rotation control is shown as the display mode corresponding to the long press duration, and the display mode corresponding to the long press duration indicates the second rotation axis; wherein, the rotation control includes multiple display modes, and the multiple display modes indicate different rotation axes.
[0230] In other words, in response to a long press operation on the rotation control, the rotation control is displayed in a target display form based on the duration of the long press; this target display form refers to the display form corresponding to the duration of the long press. The target display form indicates the second rotation axis. In response to a swipe operation following the long press operation, a second rotation animation is displayed in real-time, based on the target display form, following the swipe operation. The second rotation animation includes an animation effect of the first virtual element rotating around the second rotation axis.
[0231] Optionally, the long-press duration is divided into a first operation period, a second operation period, and a third operation period. Optionally, the appearance of the rotating control can differ in different operation periods. The appearance may include fill color, transparency, shape, fill texture, size, and fill text, etc., which are not limited in this embodiment.
[0232] Taking color as an example, when the long press operation is in the first operation period, the fill color of the rotating control is red; when the long press operation is in the second operation period, the fill color of the rotating control is blue; and when the long press operation is in the third operation period, the fill color of the rotating control is green.
[0233] Different display modes correspond to different rotation axes. Illustratively, the display modes of the rotation control include a first display mode, a second display mode, and a third display mode. Illustratively, assuming an operation duration of 3 seconds, if the long press on the rotation control is within the range (0 seconds, 1 second), the rotation control is displayed in red. If a sliding operation is performed at this time, the second rotation axis of the first virtual element is the X-axis. If the long press is within the range (1 second, 2 seconds), the rotation control is displayed in blue. If a sliding operation is performed at this time, the second rotation axis of the first virtual element is the Y-axis. If the long press is within the range (2 seconds, 3 seconds), the rotation control is displayed in green. If a sliding operation is performed at this time, the second rotation axis of the first virtual element is the Z-axis. If the long press operation does not end, the above judgment process is repeated. That is, if the long press is within the range (3 seconds, 4 seconds), the rotation control is displayed in red. If a sliding operation is performed at this time, the second rotation axis of the first virtual element is the X-axis. Further details are omitted here.
[0234] It should be noted that the examples of triggering operations and triggering stages mentioned above are merely illustrative and are not intended to limit the scope of this application.
[0235] In the above embodiments, the rotation axis is determined during the execution of the second trigger operation, omitting the step of determining the rotation axis through other operations, thus improving the efficiency of performing the rotation operation. Users can determine the rotation axis simultaneously with the execution of the second trigger operation, thereby determining the rotation axis more accurately. This helps ensure that the virtual element rotates as the user expects, reducing the possibility of misoperation.
[0236] In summary, users can customize virtual elements in a virtual scene by triggering the editing control. When the first trigger operation is performed on the editing control, the virtual element will change according to a preset transformation range, without requiring the user to manually set or adjust the transformation range, thus achieving rapid transformation control of the virtual element. When the second trigger operation is performed on the editing control, the virtual element will follow the second trigger operation and change according to the dynamic transformation range corresponding to the second trigger operation. Therefore, by controlling the second trigger operation, the transformation range of the virtual element can be precisely controlled, thus achieving precise transformation control of the virtual element. Therefore, by integrating rapid transformation control and precise transformation control of virtual elements into a single editing control, users can complete multiple transformation controls of virtual elements within a single editing control, improving the flexibility of transformation control of virtual elements and simplifying the operation steps for implementing multiple transformation controls. This improves the efficiency of user operation in controlling virtual element transformations and reduces the waste of computer operating resources.
[0237] For illustrative purposes, please refer to Figure 11, which shows a flowchart of the implementation of a rotation control provided in an exemplary embodiment of this application.
[0238] Step 1101: The operation event of the rotation control is detected.
[0239] This is an illustrative representation of the game's scene editing interface. In this interface, you can edit the virtual scene, such as adding items (e.g., virtual characters, virtual vehicles, virtual buildings). After adding an item, you can select it to perform editing operations, such as rotation, movement, and scaling. The following explanation primarily uses rotation as an example.
[0240] Optionally, a rotation control is displayed in the scene editing interface to implement rotation operations. If a user operation is detected on the rotation control, the user operation is identified, thereby determining the duration of the user operation.
[0241] Step 1102: Determine if the operation time is ≤0.3 seconds.
[0242] This is an example of determining whether the duration of a user action triggered on the rotation control is ≤0.3 seconds.
[0243] Step 1103: If the operation duration is ≤0.3 seconds, it is identified as a click event.
[0244] For illustrative purposes, if the duration of a user operation triggered on the rotation control is ≤0.3 seconds, it indicates that the user operation is a click operation. This user operation is then identified as the first trigger operation, which is used to rotate the object by a preset rotation angle.
[0245] Step 1104: Rotate the object 90° clockwise.
[0246] Indicatively, in response to a click, the object rotates in a preset direction (clockwise) and a preset angle (90°), that is, the object rotates 90° clockwise.
[0247] Step 1105: If the operation duration is greater than 0.3 seconds, it is identified as a long press event.
[0248] For illustration purposes, if the duration of a user operation triggered on the rotation control is greater than 0.3 seconds, it indicates that the user operation is a long press operation. This user operation is then identified as a second trigger operation, which is used to rotate the object by a dynamic rotation angle.
[0249] Step 1106: Display the rotation scale.
[0250] Indicatively, in response to a long press, a rotation scale area is displayed, which includes a scale bar and scale indicator elements. The position of the scale indicator elements on the scale bar indicates the current rotation angle of the object in the virtual scene.
[0251] Step 1107: Determine the direction of the 1px horizontal movement.
[0252] This is illustrative of how, when the rotation control is long-pressed, the user triggers a swipe action that follows the long-press operation.
[0253] Calculate the horizontal coordinate movement of a sliding operation. Specifically, when sliding horizontally to the left or right, the sliding distance is the horizontal coordinate movement; when sliding in non-horizontal directions, only the horizontal coordinate movement is calculated. Furthermore, the horizontal coordinate direction of each 1px movement is identified. It should be noted that the computer device identifies the horizontal coordinate direction of each px movement in real time and adjusts the rotation direction of the item accordingly.
[0254] Step 1108: If the direction of the horizontal coordinate movement of 1px is determined to be to the left, the object is rotated 1° clockwise.
[0255] When the horizontal coordinate moves to the left, it is recognized as sliding to the left. For every 1px that the horizontal coordinate moves, the item rotates 1° clockwise along the horizontal direction.
[0256] Step 1109: If the direction of the horizontal coordinate movement of 1px is determined to be to the right, the object rotates counterclockwise by 1°.
[0257] When the horizontal coordinate moves to the right, it is recognized as sliding to the right. For every 1px that the horizontal coordinate moves, the item rotates 1° counterclockwise along the horizontal direction.
[0258] Step 1110: Determine whether to release your hand.
[0259] It is an illustrative measure to determine whether the user's finger has left the computer device screen.
[0260] Step 1111: If it is determined that the hand has been released, the rotation ends.
[0261] For illustration purposes, if it is determined that the user's finger has left the computer screen, the rotation ends; if it is determined that the user's finger has not left the computer screen, the process returns to step 1107, which is to determine the direction of the horizontal coordinate movement of 1px.
[0262] In some embodiments, different virtual elements correspond to different rotation units. When rotating the first virtual element, it is necessary to determine whether the triggering operation meets the rotation conditions of the virtual element. These rotation conditions refer to the required angle of rotation of the virtual element. The following explanation uses a click operation as the first triggering operation and a long press and swipe operation as the second triggering operation as examples.
[0263] For illustrative purposes, please refer to Figures 12, 3, or 4. The embodiments shown can also be implemented as the method in Figure 12, which includes steps 1210 to 1232.
[0264] Step 1210: Display the first virtual element in the virtual scene and display the rotation control.
[0265] The rotation control is used to adjust the rotation state of the first virtual element in the virtual scene.
[0266] To illustrate, in a virtual scene, different virtual elements correspond to different rotation units. For example, if the rotation unit of the first virtual element is 1°, it means that the first virtual element can rotate in units of 1°; if the rotation unit of the first virtual element is 45°, it means that the first virtual element can only rotate in units of 45°. This means that each rotation of the first virtual element will be an angle such as 45°, 90°, 135°, etc., rather than an arbitrary angle.
[0267] Step 1220: In response to a click on the rotation control, display the first rotation animation of the first virtual element.
[0268] The first rotation animation includes the animation effect of the first virtual element rotating at a preset rotation angle.
[0269] Optionally, in response to a click operation on the rotation control, and the click operation meets the rotation conditions of the first virtual element, a first rotation animation of the first virtual element is displayed.
[0270] To illustrate, assuming the rotation unit of the first virtual element is 1°, when the preset rotation angle is a multiple of 1° (e.g., 1°, 2°, etc.), the click operation is determined to meet the angle requirement of the first virtual element, and the first virtual element is rotated by the preset rotation angle; or, if the rotation unit of the first virtual element is 1°, then any preset rotation angle will result in the click operation meeting the angle requirement of the first virtual element, and the first virtual element will be rotated by the preset rotation angle.
[0271] Assuming the rotation unit of the first virtual element is a degree other than 1°, such as 45°, then when the preset rotation angle is a multiple of 45° (e.g., 45°, 90°, etc.), the click operation is considered to meet the rotation condition of the first virtual element, and the first virtual element will rotate by the preset rotation angle. When the preset rotation angle is not a multiple of 45°, for example, if the preset rotation angle is 15° (15° < 22.5°), the click operation does not meet the rotation condition of the first virtual element, and no rotation occurs; if the preset rotation angle is 33° (33° > 22.5°), the click operation meets the rotation condition of the first virtual element, but it will not rotate by the preset rotation angle of 33°, but by 45°.
[0272] Step 1231: Detect long press operations on the rotation control and detect sliding operations that connect to the long press operations.
[0273] Schematic illustration: In response to a tap duration exceeding a duration threshold on the rotation control, the tap is determined to be a long press. After detecting a long press on the rotation control, the user can release their hand (i.e., remove their finger from the screen). If, within a preset duration, the user performs a swipe operation on the screen after releasing their hand, the swipe operation is valid, meaning the user can control the rotation of the first virtual element. After the preset duration, any subsequent swipe operation by the user is invalid, meaning the user cannot control the rotation of the first virtual element.
[0274] Alternatively, after a long press operation on the rotation control is detected, if the user does not release their hand (i.e., their finger does not leave the screen) and directly performs a swipe operation on the screen, then the swipe operation is valid, meaning that the first virtual element can be controlled to rotate.
[0275] Step 1232: In response to the sliding distance of the sliding operation meeting the rotation condition of the first virtual element, the second rotation animation is displayed.
[0276] Optionally, in response to the horizontal coordinate movement of the sliding operation conforming to the rotation conditions of the first virtual element, a second rotation animation is displayed.
[0277] To illustrate, for every 1px (pixel) increase in the horizontal coordinate movement of the sliding operation, the rotation angle of the first virtual element increases by a preset angle value. For example, if the preset angle value is 1°, then when the horizontal coordinate movement is 3px, the corresponding angle is 3°; if the preset angle value is 3°, then when the horizontal coordinate movement is 3px, the corresponding angle is 9°.
[0278] Assuming the rotation unit of the first virtual element is 1°, then when the angle corresponding to the horizontal coordinate movement is a multiple of 1° (e.g., 1°, 2°, etc.), the sliding operation is determined to meet the rotation condition of the first virtual element, and the first virtual element is rotated by the angle corresponding to the horizontal coordinate movement; or, if the rotation unit of the first virtual element is 1°, then any sliding operation meets the rotation condition of the first virtual element, and the first virtual element is rotated by the angle corresponding to the horizontal coordinate movement of the sliding operation.
[0279] For objects with special rotation rules, when you press and hold to rotate, the rotation must be performed in accordance with those rules. For example, if the first virtual element can only rotate in 45° increments, then it is stipulated that the first virtual element will only respond to the sliding operation and rotate when the rotation angle indicated by the sliding distance is greater than or equal to 22.5°.
[0280] Assuming the rotation unit of the first virtual element is a degree other than 1°, such as 45°, then when the angle corresponding to the horizontal coordinate movement is a multiple of 45° (e.g., 45°, 90°, etc.), the sliding operation meets the rotation condition of the first virtual element, and the first virtual element is rotated by the angle corresponding to the horizontal coordinate movement. When the angle corresponding to the horizontal coordinate movement is not a multiple of 45°, for example: if the angle corresponding to the horizontal coordinate movement is 15°, 15° < 22.5° (half of 45°), then the sliding operation does not meet the rotation condition of the first virtual element, and no rotation occurs; if the angle corresponding to the horizontal coordinate movement is 33°, 33° > 22.5°, then the sliding operation meets the rotation condition of the first virtual element, but it will not rotate by the angle corresponding to the horizontal coordinate movement of 33°, but rather by 45°.
[0281] Please refer to Figure 13, which shows a schematic diagram of a rotating scale. As shown in 1310 of Figure 13, if you press and hold the rotation control and slide it to the left, the scale bar moves one unit to the left. When the sliding angle currently indicated by the sliding operation is a clockwise rotation of 15°, that is, less than 22.5°, the first virtual element does not rotate, and the scale indicator element still displays 0°. As shown in 1320 of Figure 13, if you press and hold the rotation control and slide it to the left, the scale bar moves three units to the left. When the sliding angle currently indicated by the sliding operation is a clockwise rotation of 45°, that is, greater than 22.5°, the first virtual element rotates 45° clockwise, and the scale indicator element displays 45°.
[0282] In summary, the virtual object display method provided in this application embodiment has different rotation units for different virtual elements. When rotating and adjusting the first virtual element, it is necessary to determine whether the triggering operation meets the rotation conditions of the virtual element. Only when the requirements are met will the virtual element perform the corresponding rotation operation. This achieves high-precision, flexible and efficient rotation editing operation, while reducing computer resource consumption and adapting to the needs of diverse application scenarios.
[0283] For illustrative purposes, please refer to Figure 14, which shows a flowchart of the implementation of a rotation control provided in an exemplary embodiment of this application.
[0284] Step 1401: The operation event of the rotation control is detected.
[0285] This is an illustrative representation of the game's scene editing interface. In this interface, you can edit the virtual scene, such as adding items (e.g., virtual characters, virtual vehicles, virtual buildings). After adding an item, you can select it to perform editing operations, such as rotation, movement, and scaling. The following explanation primarily uses rotation as an example.
[0286] In this embodiment of the application, the item currently added to the virtual scene and selected for editing is an item with special rotation rules, which can only be rotated in 45° increments.
[0287] Optionally, a rotation control is displayed in the scene editing interface to implement rotation operations. If a user operation is triggered on the rotation control, the user operation is identified, thereby determining the duration of the user operation.
[0288] Step 1402: Determine if the operation time is ≤0.3 seconds.
[0289] This is an example of determining whether the duration of a user action triggered on the rotation control is ≤0.3 seconds.
[0290] Step 1403: If the operation duration is ≤0.3 seconds, it is identified as a click event.
[0291] For illustrative purposes, if the duration of a user operation triggered on the rotation control is ≤0.3 seconds, it indicates that the user operation is a click operation. This user operation is then identified as the first trigger operation, which is used to rotate the object by a preset rotation angle.
[0292] Step 1404: Rotate the object 90° clockwise.
[0293] Indicatively, in response to a click, the object rotates in a preset direction (clockwise) and a preset angle (90°), that is, the object rotates 90° clockwise.
[0294] Step 1405: If the operation duration is greater than 0.3 seconds, it is identified as a long press event.
[0295] For illustration purposes, if the duration of a user operation triggered on the rotation control is greater than 0.3 seconds, it indicates that the user operation is a long press operation. This user operation is then identified as a second trigger operation, which is used to rotate the object by a dynamic rotation angle.
[0296] Step 1406: Display the rotation scale.
[0297] Indicatively, in response to a long press, a rotation scale area is displayed, which includes a scale bar and scale indicator elements. The position of the scale indicator elements on the scale bar indicates the current rotation angle of the object in the virtual scene.
[0298] Step 1407: Determine if the horizontal axis movement is ≥22.5px.
[0299] This example illustrates how, when a user long-presses the rotation control, a swipe operation following the long-press is triggered. The system checks if the horizontal movement corresponding to this swipe operation is ≥22.5px. Specifically, when swiping horizontally to the left or right, the swipe distance is the horizontal movement; when swiping in non-horizontal directions, only the horizontal movement is calculated.
[0300] Step 1408: If the horizontal coordinate movement is less than 22.5px, keep it unchanged.
[0301] For illustrative purposes, if the horizontal coordinate movement corresponding to the sliding operation is less than 22.5px, the item remains stationary, that is, it is not rotated.
[0302] Step 1409: If the horizontal coordinate movement is ≥22.5px, determine the direction of the 22.5px movement.
[0303] For illustration purposes, if the horizontal coordinate movement corresponding to the sliding operation is ≥22.5px, then the direction of the 22.5px movement is determined.
[0304] Step 1410: If the direction of the 22.5px movement is determined to be to the left, rotate the object 45° clockwise.
[0305] To illustrate, if the direction of the 22.5px movement is determined to be left, the item will rotate 45° clockwise along the horizontal direction.
[0306] Step 1411: If the direction of the 22.5px movement is determined to be to the right, rotate the object counterclockwise by 45°.
[0307] To illustrate, if the direction of the 22.5px movement is determined to be to the right, the item will rotate 45° counterclockwise along the horizontal direction.
[0308] Step 1412: Determine if the horizontal coordinate exceeds the 45px movement amount.
[0309] For illustration purposes, if the user continues to swipe (i.e., without releasing the finger), determine if the horizontal coordinate movement corresponding to the swipe operation is greater than 45px. If the horizontal coordinate movement is greater than 45px, proceed to the next recognition interval, that is, return to step 1407, and determine if the movement beyond 45px is greater than or equal to 22.5px. For example, if the current horizontal coordinate movement is 50px, then determine if 50px - 45px is greater than or equal to 22.5px.
[0310] Step 1413: If the horizontal coordinate movement does not exceed 45px, determine whether the horizontal coordinate movement is ≥22.5px.
[0311] If the horizontal coordinate movement is less than or equal to 45px, then check if the current horizontal coordinate movement is greater than or equal to 22.5px.
[0312] Step 1414: If the horizontal coordinate movement is ≥22.5px, keep it unchanged.
[0313] If the horizontal axis movement is still greater than or equal to 22.5px, then leave it unchanged.
[0314] Step 1415: If the horizontal coordinate movement is less than 22.5px, return to the initial angle.
[0315] If the horizontal coordinate movement is less than 22.5px, then revert to the initial angle, i.e., the angle before the rotation.
[0316] Step 1416: Determine whether to release the hand.
[0317] It is an illustrative measure to determine whether the user's finger has left the computer device screen.
[0318] Step 1417: If it is determined that the hand has been released, the rotation ends.
[0319] For illustration purposes, if the user's finger leaves the computer screen, the rotation ends; if the user's finger does not leave the computer screen, the process returns to step 1412, which determines whether the current horizontal coordinate exceeds the 45px movement limit.
[0320] In summary, in building games, users frequently need to use the rotation function to place objects in appropriate positions and angles. This application's embodiment provides a method for displaying virtual elements that simplifies the rotation operation. It integrates quick and precise rotation functions into a single control, allowing multiple rotation operations on virtual elements to be performed on a single control within a single interface. This significantly optimizes the building experience in the game, increases user activity and retention in building mode, and thus has a more positive effect on game data.
[0321] The following section uses the example of implementing an edit control as a scaling control to describe the process of displaying virtual elements provided in this application.
[0322] Step 1: Display the first virtual element in the virtual scene and display the zoom control.
[0323] The scaling control is used to adjust the scaling ratio of the first virtual element in the virtual scene.
[0324] Alternatively, the zoom control can be a button, a slider, or a touchable area, or the zoom control can be implemented as the first virtual element itself.
[0325] Step 2: In response to a click on the zoom control, display the first zoom animation of the first virtual element.
[0326] Optionally, the first scaling animation includes an animation effect in which the first virtual element scales at a preset scaling ratio. Illustratively, the first scaling animation of the first virtual element is displayed when a click event is detected. This first scaling animation can be a gradual increase or a gradual decrease.
[0327] In the first scaling animation, if the current scaling ratio of the first virtual element is greater than the preset scaling ratio, the first virtual element gradually becomes smaller. If the current scaling ratio of the first virtual element is less than the preset scaling ratio, the first virtual element gradually becomes larger.
[0328] Step 3: In response to multi-touch operations on the zoom control, display the second zoom animation of the first virtual element in real time following the multi-touch operations.
[0329] The second scaling animation includes the animation effect of scaling the first virtual element according to the dynamic scaling ratio corresponding to multi-touch operation.
[0330] In illustrative terms, multi-touch operation refers to the triggering action of two or more fingers on the screen. Multi-touch operation can be implemented as a two-finger open operation, which involves placing two fingers on the screen and then swiping them outwards. Triggering the two-finger open operation, the computer device displays a second zoom animation to increase the zoom level, that is, to enlarge the first virtual element.
[0331] Alternatively, the two-finger touch operation can be implemented as a two-finger close operation, where the user places two fingers on the screen and then slides them inwards, moving them closer together. Triggering the two-finger close operation, the computer device displays a second scaling animation to reduce the zoom level, that is, shrinking the first virtual element.
[0332] The computer device can determine the user's intention by detecting the initial position and movement trajectory of the touch points corresponding to the two fingers, and trigger the corresponding second scaling animation accordingly.
[0333] The following section uses the example of implementing an edit control as a hierarchical adjustment control to introduce the process of displaying virtual elements provided in this application.
[0334] Step 1: Display the first virtual element in the virtual scene and display the hierarchy adjustment controls.
[0335] The hierarchy adjustment control is used to adjust the display hierarchy of the first virtual element in the virtual scene. Optionally, the hierarchy adjustment control can be a button, a slider, or a touchable area, or the hierarchy adjustment control can be implemented as the first virtual element itself.
[0336] Indicatively, the hierarchy determines the stacking order of elements in a scene, i.e., which elements will be occluded and which elements will occlude other elements.
[0337] Step 2: In response to a click on the layer adjustment control, display the first layer adjustment animation of the first virtual element.
[0338] Optionally, the first level adjustment animation includes an animation effect of the first virtual element adjusting its level to a preset level. When the user clicks the level adjustment control, the computer responds to this operation by displaying the change in the level of the first virtual element, that is, the first virtual element moves to the preset level.
[0339] Step 3: In response to the sliding operation of the layer adjustment control, display the second layer adjustment animation of the first virtual element in real time following the sliding operation.
[0340] The second-level adjustment animation includes the animation effect of adjusting the first virtual element according to the dynamic level corresponding to the sliding operation.
[0341] Indicatively, unlike click operations, swipe operations allow users to continuously and dynamically adjust the hierarchy of virtual elements. The computer device responds to swipe operations in real time, displaying the continuous changes in element hierarchy. Optionally, the new hierarchy is calculated in real time based on the swipe direction and distance, and the hierarchy of the first virtual element is adjusted accordingly.
[0342] For illustrative purposes, please refer to Figure 15, which shows a structural block diagram of a virtual element display device provided in an exemplary embodiment of this application. The device includes the following modules.
[0343] The first display module 1510 is used to display a first virtual element in a virtual scene and to display an editing control, which is used to edit the first virtual element in the virtual scene.
[0344] The second display module 1520 is used to respond to the first trigger operation of the editing control and display the first transformation animation of the first virtual element. The first transformation animation includes the animation effect of the first virtual element transforming with a preset transformation amplitude.
[0345] The second display module 1520 is also used to respond to a second trigger operation on the editing control and display a second transformation animation of the first virtual element in real time following the second trigger operation. The second transformation animation includes an animation effect in which the first virtual element transforms with a dynamic transformation amplitude corresponding to the second trigger operation; wherein the first trigger operation and the second trigger operation are different.
[0346] In some embodiments, the editing control includes a rotation control for controlling the rotation of the first virtual element in a virtual scene; the second display module 1520 is further configured to display a first rotation animation of the first virtual element in response to a first trigger operation on the rotation control, the first rotation animation including an animation effect of the first virtual element rotating at a preset rotation angle and a first rotation direction.
[0347] In some embodiments, the first rotation direction is a preset rotation direction; or, the first rotation direction is a rotation direction determined according to the trigger position of the first trigger operation in the rotation control.
[0348] In some embodiments, the first virtual element corresponds to multiple rotation axes; the second display module 1520 is further configured to:
[0349] After detecting the first trigger operation on the rotation control, in response to the end of the first trigger operation, based on the trigger stage at the end of the first trigger operation, the first rotation animation is displayed. The trigger stage at the end of the first trigger operation corresponds to the first rotation axis. The first rotation animation includes the animation effect of the first virtual element rotating around the first rotation axis.
[0350] The first triggering operation includes multiple triggering stages, each corresponding to a different rotation axis.
[0351] In some embodiments, the first display module 1510 is configured to:
[0352] Display the first setting area, which is used to configure the transformation amplitude corresponding to the first trigger operation;
[0353] In response to the amplitude configuration operation of the first trigger operation in the first setting area, a preset transformation amplitude is configured for the first trigger operation.
[0354] In some embodiments, the second display module 1520 is further configured to:
[0355] After detecting a long press operation on the editing control, in response to the sliding operation that follows the long press operation, a second transformation animation is displayed in real time following the sliding operation. The second transformation animation includes an animation effect in which the first virtual element changes with the dynamic transformation amplitude corresponding to the sliding operation.
[0356] In some embodiments, the editing control includes a rotation control, which is used to control the rotation of the first virtual element in the virtual scene; the second display module 1520 is further configured to, after detecting a long press operation on the editing control, respond to a sliding operation following the long press operation, and display a second rotation animation in real time following the sliding operation, the second rotation animation including an animation effect of the first virtual element rotating with a dynamic rotation angle and a second rotation direction; wherein, the dynamic rotation angle is a rotation angle determined according to the sliding parameters corresponding to the sliding operation.
[0357] In some embodiments, the second rotation direction is a preset rotation direction; or, the second rotation direction is a rotation direction determined according to the trigger position of the second trigger operation in the rotation control, the second trigger operation including a long press operation and a sliding operation.
[0358] In some embodiments, the first virtual element corresponds to multiple rotation axes; the second display module 1520 is further configured to:
[0359] After detecting a long press operation on the editing control, in response to the sliding operation that follows the long press operation, a second rotation animation is displayed in real time following the sliding operation based on the long press duration. The long press duration corresponds to a second rotation axis, and the second rotation animation includes an animation effect of the first virtual element rotating around the second rotation axis.
[0360] In some embodiments, the second display module 1520 is further configured to:
[0361] After detecting a long press operation on the editing control, in response to the sliding operation that follows the long press operation, the display of the rotation control is changed to the display corresponding to the long press duration, and the display corresponding to the long press duration indicates the second rotation axis.
[0362] The rotation control includes multiple display forms, each indicating a different rotation axis.
[0363] In some embodiments, the second display module 1520 is further configured to:
[0364] After a sliding operation is detected, in response to the sliding distance meeting the rotation conditions of the first virtual element, a second rotation animation is displayed in real time following the sliding operation.
[0365] In some embodiments, the second display module 1520 is further configured to:
[0366] In response to a long press, an amplitude indicator is displayed, which indicates the transformation amplitude corresponding to the first virtual element.
[0367] In response to a swipe operation that connects to a long press, a second transformation animation and an information change animation are displayed. The information change animation includes an animation effect that updates the amplitude indicator information according to the dynamic transformation amplitude corresponding to the swipe operation.
[0368] In some embodiments, the second display module 1520 is further configured to:
[0369] After detecting a long press operation on the editing control, in response to a first click operation on a first position in the virtual scene and a second click operation on a second position in the virtual scene, a second transformation animation is displayed; wherein, the dynamic transformation amplitude is determined based on the distance between the first position and the second position.
[0370] In some embodiments, the second display module 1520 is further configured to:
[0371] In response to a long press operation on the editing control, a second settings area is displayed, which includes an amplitude adjustment control for adjusting the transformation amplitude of the first virtual element;
[0372] In response to a movement operation of the amplitude adjustment control, the amplitude adjustment control is moved within the second setting area to display a second transformation animation; wherein, the dynamic transformation amplitude is determined based on the position of the amplitude adjustment control in the second setting area.
[0373] In some embodiments, the virtual scene includes a second virtual element, and the first virtual element and the second virtual element are associated; the second display module 1520 is also used to display a first transformation animation in response to a first trigger operation on the editing control, the first transformation animation including an animation effect in which the first virtual element and the second virtual element transform synchronously with a preset transformation amplitude.
[0374] In some embodiments, the first display module 1510 is further configured to display the first virtual element in the virtual scene and display editing controls in response to the addition operation of the first virtual element.
[0375] In some embodiments, the second display module 1520 is further configured to display a first transformation animation after detecting a first tap operation on the editing control, in response to the end of the first tap operation and the operation duration of the first tap operation being less than or equal to a duration threshold.
[0376] In some embodiments, the second display module 1520 is further configured to, after detecting a second tap operation on the editing control, display a second transformation animation in real time following the second tap operation if the operation duration of the second tap operation is greater than a duration threshold.
[0377] In some embodiments, the second display module 1520 is further configured to obtain the operation duration of multiple target click operations generated by the first account within a historical time period. The multiple target click operations refer to historical click operations belonging to the first trigger operation, and the operation duration of the target click operation refers to the duration between the start time and the end time of the target click operation. The duration threshold is updated based on the operation duration of the multiple target click operations.
[0378] In summary, the virtual element display device provided in this application allows users to customize virtual elements in a virtual scene by triggering an editing control. When a first trigger operation is performed on the editing control, the virtual element will change according to a preset transformation range, without requiring the user to manually set or adjust the transformation range, thus achieving rapid transformation control of the virtual element. When a second trigger operation is performed on the editing control, the virtual element will follow the second trigger operation and change according to the dynamic transformation range corresponding to the second trigger operation. Therefore, by controlling the second trigger operation, the transformation range of the virtual element can be precisely controlled, thereby achieving precise transformation control of the virtual element. Thus, by integrating rapid and precise transformation control of virtual elements into a single editing control, users can complete multiple transformation controls of virtual elements on a single editing control, improving the flexibility of transformation control of virtual elements and simplifying the operation steps for implementing multiple transformation controls. This improves the efficiency of user operation in controlling virtual element transformations and reduces the waste of computer operating resources.
[0379] It should be noted that the virtual element display device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the virtual element display device and the virtual element display method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0380] Figure 16 shows a structural block diagram of a computer device provided in an exemplary embodiment of this application.
[0381] The computer device 1600 may be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), or MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 1600 may also be referred to as a user device, portable terminal, or other names.
[0382] Typically, computer device 1600 includes a processor 1601 and a memory 1602.
[0383] Processor 1601 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1601 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 1601 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.
[0384] The memory 1602 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1602 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 the memory 1602 are used to store at least one instruction, which is executed by the processor 1601 to implement the virtual element display method provided in the embodiments of this application.
[0385] In some embodiments, the computer device 1600 may also optionally include: a peripheral device interface 1603 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1604, a touch display screen 1605, a camera 1606, an audio circuit 1607, and a power supply 1608.
[0386] Those skilled in the art will understand that the structure shown in FIG16 does not constitute a limitation on the computer device 1600, and may include more or fewer components than shown, or combine certain components, or employ different component arrangements.
[0387] In an exemplary embodiment, this application provides a chip that includes programmable logic circuits and / or program instructions. When the chip is run on a computer device, it is used to implement the virtual element display method provided in the above method embodiments.
[0388] This application provides a computer-readable storage medium storing a computer program that is loaded and executed by a processor to implement the virtual element display method provided in the above-described method embodiments.
[0389] This application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the processor of the computer device to load and execute the method for displaying virtual elements provided in the above-described method embodiments.
[0390] 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.
[0391] 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.
[0392] The above description is merely an optional 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
1. A method for displaying virtual elements, executed by a computer device, the method comprising: Display a first virtual element in a virtual scene, and display an editing control for editing the first virtual element in the virtual scene; In response to a first trigger operation on the editing control, a first transformation animation of the first virtual element is displayed, the first transformation animation including an animation effect in which the first virtual element transforms with a preset transformation amplitude; In response to a second trigger operation on the editing control, a second transformation animation of the first virtual element is displayed in real time following the second trigger operation. The second transformation animation includes an animation effect in which the first virtual element transforms with a dynamic transformation amplitude corresponding to the second trigger operation; wherein the first trigger operation and the second trigger operation are different.
2. The method according to claim 1, wherein, The editing control includes a rotation control, which is used to control the first virtual element to rotate in the virtual scene; The step of displaying a first transformation animation of the first virtual element in response to a first trigger operation on the editing control includes: In response to the first trigger operation on the rotation control, a first rotation animation of the first virtual element is displayed, the first rotation animation including an animation effect of the first virtual element rotating at a preset rotation angle and a first rotation direction.
3. The method according to claim 2, wherein, The first rotation direction is a preset rotation direction; Alternatively, the first rotation direction is a rotation direction determined based on the trigger position of the first trigger operation in the rotation control.
4. The method according to claim 2, wherein, The first virtual element has multiple rotation axes; The step of displaying a first rotation animation of the first virtual element in response to the first trigger operation on the rotation control includes: After detecting the first trigger operation on the rotation control, in response to the end of the first trigger operation, the first rotation animation is displayed based on the trigger stage at the end of the first trigger operation. The trigger stage at the end of the first trigger operation corresponds to a first rotation axis. The first rotation animation includes the animation effect of the first virtual element rotating around the first rotation axis. The first triggering operation includes multiple triggering stages, each corresponding to a different rotation axis.
5. The method according to any one of claims 1 to 4, wherein, Before displaying the first transformation animation of the first virtual element in response to the first trigger operation on the editing control, the method further includes: Display a first setting area, which is used to configure the transformation amplitude corresponding to the first trigger operation; In response to the amplitude configuration operation of the first trigger operation in the first setting area, the preset transformation amplitude is configured for the first trigger operation.
6. The method according to any one of claims 1 to 5, wherein, The step of responding to a second trigger operation on the editing control and displaying a second transformation animation of the first virtual element in real time following the second trigger operation includes: After detecting a long press operation on the editing control, in response to a sliding operation following the long press operation, the second transformation animation is displayed in real time following the sliding operation. The second transformation animation includes an animation effect in which the first virtual element transforms with the dynamic transformation amplitude corresponding to the sliding operation.
7. The method according to claim 6, wherein, The editing control includes a rotation control, which is used to control the first virtual element to rotate in the virtual scene; After detecting a long press operation on the editing control, in response to a sliding operation following the long press operation, the second transformation animation is displayed in real time following the sliding operation, including: After a long press operation on the editing control is detected, in response to the sliding operation that follows the long press operation, a second rotation animation is displayed in real time following the sliding operation. The second rotation animation includes an animation effect in which the first virtual element rotates with a dynamic rotation angle and a second rotation direction; wherein, the dynamic rotation angle is a rotation angle determined according to the sliding parameters corresponding to the sliding operation.
8. The method according to claim 7, wherein, The second rotation direction is a preset rotation direction; Alternatively, the second rotation direction is a rotation direction determined based on the trigger position of the second trigger operation in the rotation control, the second trigger operation including the long press operation and the sliding operation.
9. The method according to claim 7, wherein, The first virtual element has multiple rotation axes; After detecting a long press operation on the editing control, in response to the sliding operation following the long press operation, a second rotation animation is displayed in real time following the sliding operation, including: After a long press operation on the editing control is detected, in response to the sliding operation that follows the long press operation, the second rotation animation is displayed in real time following the sliding operation based on the long press duration. The long press duration corresponds to a second rotation axis, and the second rotation animation includes an animation effect of the first virtual element rotating around the second rotation axis.
10. The method according to claim 9, wherein, The method further includes: After a long press operation on the editing control is detected, in response to the sliding operation that follows the long press operation, the display mode of the rotation control is displayed as the display mode corresponding to the long press duration, and the display mode corresponding to the long press duration indicates the second rotation axis; The rotation control includes multiple display modes, each indicating a different rotation axis.
11. The method according to claim 7, wherein, The swiping operation that follows the long press operation, and the real-time display of the second rotation animation, includes: After the sliding operation is detected, in response to the sliding distance of the sliding operation meeting the rotation conditions of the first virtual element, the second rotation animation is displayed in real time following the sliding operation.
12. The method according to claim 6, wherein, After detecting a long press operation on the editing control, in response to a sliding operation following the long press operation, the second transformation animation is displayed in real time following the sliding operation, including: In response to the long press operation, amplitude indication information is displayed, which indicates the transformation amplitude corresponding to the first virtual element; In response to the sliding operation that follows the long press operation, the second transformation animation and the information change animation are displayed. The information change animation includes an animation effect that updates the amplitude indication information according to the dynamic transformation amplitude corresponding to the sliding operation.
13. The method according to any one of claims 1 to 12, wherein, The step of responding to a second trigger operation on the editing control and displaying a second transformation animation of the first virtual element in real time following the second trigger operation includes: After detecting a long press operation on the editing control, in response to a first click operation on a first position in the virtual scene and a second click operation on a second position in the virtual scene, the second transformation animation is displayed; wherein the dynamic transformation amplitude is determined based on the distance between the first position and the second position.
14. The method according to any one of claims 1 to 13, wherein, The step of responding to a second trigger operation on the editing control and displaying a second transformation animation of the first virtual element in real time following the second trigger operation includes: In response to a long press operation on the editing control, a second setting area is displayed, the second setting area including an amplitude adjustment control, the amplitude adjustment control being used to adjust the transformation amplitude of the first virtual element; In response to a movement operation of the amplitude adjustment control, the amplitude adjustment control is moved within the second setting area to display the second transformation animation; wherein the dynamic transformation amplitude is determined based on the position of the amplitude adjustment control within the second setting area.
15. The method according to any one of claims 1 to 14, wherein, The virtual scene includes a second virtual element, and the first virtual element and the second virtual element are associated with each other. The step of displaying a first transformation animation of the first virtual element in response to a first trigger operation on the editing control includes: In response to a first trigger operation on the editing control, the first transformation animation is displayed, the first transformation animation including an animation effect in which the first virtual element and the second virtual element transform synchronously with the preset transformation amplitude.
16. The method according to any one of claims 1 to 15, wherein, The first virtual element displayed in the virtual scene, including the display editing controls, includes: In response to the addition operation of the first virtual element, the first virtual element in the virtual scene is displayed, and the editing control is displayed.
17. The method according to any one of claims 1 to 16, wherein, The step of displaying a first transformation animation of the first virtual element in response to a first trigger operation on the editing control includes: After detecting a first tap on the editing control, in response to the end of the first tap and the duration of the first tap being less than or equal to a duration threshold, the first transformation animation is displayed.
18. The method according to any one of claims 1 to 17, wherein, The step of responding to a second trigger operation on the editing control and displaying a second transformation animation of the first virtual element in real time following the second trigger operation includes: After detecting a second tap on the editing control, in response to the tap duration exceeding the duration threshold, the second transformation animation is displayed in real time following the tap.
19. The method according to any one of claims 17 to 18, wherein, The computer device is logged into a first account; the method further includes: Obtain the operation duration of multiple target click operations generated by the first account within a historical time period. The multiple target click operations refer to historical click operations belonging to the first trigger operation. The operation duration of the target click operation refers to the duration between the start time and the end time of the target click operation. The duration threshold is updated based on the operation duration of the multiple target points.
20. A display device for virtual elements, the device comprising: A first display module is used to display a first virtual element in a virtual scene and to display an editing control, wherein the editing control is used to edit the first virtual element in the virtual scene; The second display module is configured to respond to a first trigger operation on the editing control and display a first transformation animation of the first virtual element, wherein the first transformation animation includes an animation effect in which the first virtual element transforms with a preset transformation amplitude; The second display module is further configured to respond to a second trigger operation on the editing control and display a second transformation animation of the first virtual element in real time following the second trigger operation. The second transformation animation includes an animation effect in which the first virtual element transforms with a dynamic transformation amplitude corresponding to the second trigger operation; wherein the first trigger operation and the second trigger operation are different.
21. A computer device comprising a processor and a memory, the memory storing at least one program, the at least one program being loaded and executed by the processor to implement the method for displaying virtual elements as described in any one of claims 1 to 19.
22. A computer-readable storage medium storing at least one program, said at least one program being loaded and executed by a processor to implement the method for displaying virtual elements as described in any one of claims 1 to 19.
23. A computer program product comprising a computer program that, when executed by a processor, implements the method for displaying virtual elements as described in any one of claims 1 to 19.
Citation Information
Patent Citations
Control response method and device for game
CN110639203A
Dynamic image editing method and device and electronic equipment
CN115170709A
Virtual object control method and device, electronic equipment and storage medium
CN115228093A
Virtual scene editing method and device, equipment and storage medium
CN117224939A
Game component rotation control method and device, storage medium and electronic equipment
CN117582668A