Human-computer interaction method and device based on gravity adjustment, equipment and medium
By displaying virtual characters and gravity adjustment mechanisms in a virtual environment, and responding to user operations to adjust the gravity direction and providing synchronous feedback, the problem of difficulty in selecting the gravity direction in existing technologies is solved, thereby enhancing the immersion and intuitiveness of game interaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU KULUO SHUJIE TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-10
AI Technical Summary
Existing gravity direction selection schemes in games have limited directional prompts, which makes it easy for users with weak spatial awareness to repeatedly try and make mistakes when selecting directions, reducing the immersiveness and intuitiveness of the interactive experience.
By displaying virtual characters and gravity adjustment mechanisms in a virtual environment, the system responds to user input to adjust the virtual character's gravity direction and provides synchronous feedback to multiple objects during the adjustment process. Color indicators further enhance the intuitiveness of the interaction.
It enables adjustable gravity direction for virtual characters, enhancing the immersiveness and physical realism of human-computer interaction, and reducing the difficulty of orientation recognition and the error rate of operation.
Smart Images

Figure CN122363573A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and in particular to a human-computer interaction method, device, equipment, medium and program product based on gravity adjustment. Background Technology
[0002] With the rapid development of computer technology, leveraging increasingly powerful engine computing power and physics simulation systems, the boundaries of traditional game scene spatial design are constantly being broken, and the deep development and gameplay integration of the gravity dimension have become an important direction of change in game development.
[0003] In related technologies, gravity adjustment mechanisms are typically embedded within the game's quest flow, and virtual characters or scenes are oriented differently via preset interactive objects. This type of solution generally displays a direction selection interface upon entering the interactive state and completes a gravity switch according to a preset selectable direction.
[0004] However, due to the limited directional prompts, users with weak spatial awareness are prone to repeated trial and error when choosing directions. Summary of the Invention
[0005] This application provides a human-computer interaction method, device, equipment, medium, and program product based on gravity adjustment, the technical solution of which is as follows: On the one hand, a human-computer interaction method based on gravity adjustment is provided, the method comprising: Displays virtual characters and gravity adjustment mechanisms within a virtual environment; In response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism, the current gravity direction of the virtual character is adjusted to the target gravity direction; During the adjustment of the virtual character's gravity direction, one or more of the following are controlled to provide synchronous feedback display: the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object located in the virtual environment. Based on the target gravity direction, a color indicator corresponding to the target gravity direction is displayed, and the color indicator is used to indicate the current gravity direction of the virtual character.
[0006] On the other hand, a gravity-adjustable human-computer interaction device is provided, the device comprising: The display module is used to display virtual characters and gravity adjustment mechanisms located in the virtual environment; The processing module is configured to adjust the current gravity direction of the virtual character to the target gravity direction in response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism. The processing module is used to control one or more of the following during the process of adjusting the gravity direction of the virtual character: the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object located in the virtual environment to provide synchronous feedback display. The display module is used to display a color indicator corresponding to the target gravity direction, based on the target gravity direction, and the color indicator is used to indicate the current gravity direction of the virtual character.
[0007] On the other hand, a computer device is provided, the computer device including 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 any of the above-described gravity-based human-computer interaction methods.
[0008] On the other hand, a computer-readable storage medium is provided, wherein at least one program is stored in the computer-readable storage medium, the at least one program being loaded and executed by a processor to implement any of the above-described gravity-based human-computer interaction methods.
[0009] On the other hand, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform any of the gravity-based human-computer interaction methods described above.
[0010] The beneficial effects of the technical solutions provided in this application include at least the following: In response to the trigger operation of selecting a target gravity direction via the gravity adjustment mechanism, the virtual character's current gravity direction is adjusted to the target gravity direction, realizing the adjustability of the character's gravity direction and providing users with a more diverse interactive experience. During the adjustment of the virtual character's gravity direction, one or more of the following—controlling the gravity adjustment mechanism, the virtual character, the virtual character's corresponding camera, and at least one object in the virtual environment—provide synchronous feedback. This multi-object synchronous feedback mechanism enhances the perceptibility of the direction switching process, significantly improving the immersion and physical realism of human-computer interaction. Displaying a color indicator corresponding to the target gravity direction effectively improves the intuitiveness of the interactive operation, reduces the difficulty of direction recognition, and effectively minimizes trial-and-error operations caused by misjudgments of state. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of a computer system provided in an exemplary embodiment of this application; Figure 2 This is a flowchart of a gravity-based human-computer interaction method provided in an exemplary embodiment of this application; Figure 3 This is a schematic diagram of a gravity adjustment mechanism in a virtual environment provided in an exemplary embodiment of this application; Figure 4 This is a schematic diagram of the core organ body provided in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of a directional control provided in an exemplary embodiment of this application; Figure 6 This is a schematic diagram illustrating different display effects of a gravity adjustment mechanism provided in an exemplary embodiment of this application; Figure 7 This is a schematic diagram of the floating state of a virtual character provided in an exemplary embodiment of this application; Figure 8 This is a schematic diagram of the rotation process of a gravity adjustment mechanism provided in an exemplary embodiment of this application; Figure 9 This is a schematic diagram illustrating the synchronous feedback display of the gravity adjustment mechanism, the virtual character, the view camera, and scene objects during the gravity direction adjustment process of the virtual character, provided by an exemplary embodiment of this application. Figure 10 This is a schematic diagram of attitude simulation adjustment of a flexible object under the action of target gravity direction, provided by an exemplary embodiment of this application; Figure 11 This is a schematic diagram illustrating the adjustment of the flow direction of a fluid object under the action of different target gravity directions, provided by an exemplary embodiment of this application. Figure 12 This is a structural block diagram of a gravity-adjustable human-computer interaction device provided in an exemplary embodiment of this application; Figure 13 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] In this application, the terms "first" and "second" are used to distinguish between identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is there any limitation on the quantity or execution order.
[0015] First, a brief explanation of the terms used in this application: Virtual environment: refers to a 2.5D or 3D digital scene used to house virtual characters, gravity adjustment mechanisms, and scene objects. A virtual environment typically includes visualized architectural structures, decorative elements, special effects, and the interactive space where gravity adjustment mechanisms reside.
[0016] Virtual character: A virtual character is a user-controlled object in a virtual environment that can move, hover, land, and interact. A virtual character has programmable posture parameters, movement parameters, and a gravity force model, and can receive gravity adjustment commands to achieve a dynamic transition between the current gravity direction and the target gravity direction. A virtual character can be a first-person controlled object or a third-person visualized object.
[0017] Gravity Adjustment Mechanism: This is an interactive object used to receive direction selection operations and trigger the adjustment of the virtual character's gravity direction. It can display a rotation state, an active state, and a direction selection state based on the user's interaction sequence, and shares target gravity direction data with other system modules. Gravity adjustment mechanisms can be located in the center of a room, at the edge of a platform, at a corridor node, or in a puzzle scene, forming repeatable interactive entry points in an open world.
[0018] Current gravity direction: refers to the direction of gravity acting on the virtual character at a certain point in time. This direction is described by the gravity vector in use in three dimensions and is usually associated with the normal direction of the supporting surface where the virtual character is located.
[0019] Target gravity direction: This is the direction of gravity the user wants the virtual character to switch to after selecting it via the gravity adjustment mechanism. There is an angular difference between the target direction and the current direction, and this difference is the driving force for the gravity switching process. The target gravity direction can be any one of the upward, downward, leftward, and rightward directions, or any one of at least two preset directions configured by the game designers.
[0020] Synchronous feedback display: This indicates that during the adjustment of the virtual character's gravity direction, mechanisms, characters, camera angles, or scene objects undergo synchronous rotation, hovering, posture changes, or changes in motion direction to provide the user with a continuous perception of gravity shifts. This includes, but is not limited to, at least one of the following: vertical rotation of mechanisms, hovering and posture adjustment of the virtual character, synchronous rotation of the camera angle, and dynamic responses of flexible and fluid objects. This synchronous feedback display is not only used to demonstrate the technical execution process but also to help the user understand the extent to which the gravity direction has changed and when they can continue operating or exit the interface.
[0021] Color indicators: These include visual color cues corresponding to the target gravity direction, used to intuitively indicate the current gravity orientation or the recommended direction for the task. This includes the color of the guide arrows in the interface, the color of the surface lighting effects of mechanisms, and the color transitions in scene areas. Colors are smoothly gradiented to express changes in direction. Color indicators can be implemented using various methods such as material color changes, local post-processing color blending, particle halos, or edge outlining, allowing users to quickly perceive the current gravity orientation without complex spatial reasoning.
[0022] Direction Selection Interface: This refers to the interactive interface displayed in response to a direction selection operation. The interface includes multiple direction controls, target direction indicators, color indicators, and an exit button. The selectable and deselectable states of the controls are dynamically adjusted based on the user's current direction of gravity. The direction selection interface may include inner and outer arrows. The inner arrows suggest recommended directions, while the outer arrows indicate selectable target directions. The direction controls corresponding to the current direction of gravity can be grayed out to avoid repeatedly selecting the current direction.
[0023] Flexible objects: These are scene objects whose posture changes with the direction of the force when gravity changes. Examples include vegetation, cloth, ropes, or hanging decorations. Their posture can be determined by multiple control points or simulation models, and they have a correlation between the drooping direction and the simulated force. Flexible objects can be implemented using skeletal chains, point springs, or cloth simulations, or simplified interpolation methods can be used to achieve a smooth posture transition consistent with the direction of gravity.
[0024] Fluid objects: These are objects whose flow or jet direction can be adjusted according to the target's gravity direction when gravity changes. Examples include fountains, waterfalls, particle effects, and droplets. Their trajectory can be determined by parameters such as initial velocity, gravitational acceleration, and lifespan. Adjusting fluid objects can be done by modifying emitter parameters, gravity vectors, or trajectory solving models to maintain visual consistency between the overall scene and gravity changes.
[0025] A perspective camera is a camera object used to display the virtual character and virtual environment. It has adjustable pitch, yaw, and roll parameters and can rotate synchronously during character gravity adjustments to maintain image readability. The perspective camera can also perform operations such as focusing, zooming in on the character, transitioning to an interactive view, and returning to an open-world view.
[0026] Target direction indicator: Used in the interface to directly indicate the gravity direction suggested by the task flow. It can use visual language such as pointing arrows, color highlights, or dynamic halos to support decision-making for different types of users. The term "force direction" in character control and scene response refers to the direction of the force vector consistent with the target gravity direction. Its update process is implemented through gravity calculation logic, which subsequently affects the posture simulation of flexible objects and the motion path of fluid objects.
[0027] Mechanism Direction: This refers to the current direction of the gravity adjustment mechanism, which is related to its vertical direction and rotation axis. The system will perform alignment correction when the mechanism and the character's direction are inconsistent.
[0028] Direction control: It is an interactive element in the direction selection interface used to select the direction of gravity. It has at least one of the following states: selectable, grayed out, and feedback prompt. It can also provide color assistance according to the gravity color visual system.
[0029] Figure 1 This is a schematic diagram of a computer system provided in an exemplary embodiment of this application. The computer system can be implemented as a system architecture for a gravity-based human-computer interaction method. The computer system includes a client 110 and a server 120, with the client 110 connected to the server 120 via a wireless network or a wired network.
[0030] Among them, the client 110 can be an electronic device such as a mobile phone, tablet computer, PC (Personal Computer), game console, smart TV, vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, MR (Mixed Reality) device, etc.
[0031] Client 110 can install and run an application, which is an application providing human-computer interaction functions. This application does not limit the form of the application, including but not limited to apps, mini-programs, etc., installed on client 110, and can also be in web page form. For example, the application includes, but is not limited to, at least one of game applications, instant messaging applications, office applications, short video applications, and social applications. Client 110 is the terminal used by user 112. Optionally, user account of user 112 is logged in on the client.
[0032] Figure 1 Only one terminal is shown, but in different embodiments, multiple other terminals 130 can access the server 120. Optionally, one or more terminals 130 may also be terminals corresponding to developers, on which a development and editing platform supporting the client of the game application is installed. Developers can edit and update the client on the terminal 130 and transmit the updated application installation package to the server 120 via wired or wireless network. The client 110 can download the application installation package from the server 120 to update the client.
[0033] Client 110 and other terminals 130 are connected to server 120 via wireless or wired networks.
[0034] Server 120 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, a cloud server providing basic cloud computing services, or a node in a blockchain system. Server 120 can be the backend server for the aforementioned applications, providing backend services to the application's clients.
[0035] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 120 is used to provide backend services for clients supporting game applications. Optionally, server 120 undertakes the primary computing work, and the terminal undertakes the secondary computing work; or, server 120 undertakes the secondary computing work, and the terminal undertakes the primary computing work; or, server 120 and the terminal use a distributed computing architecture for collaborative computing.
[0036] In an illustrative example, server 120 includes processor 121, user account database 122, and user-facing input / output interface (I / O interface) 123. Processor 121 loads instructions stored in server 120 and processes data in user account database 122. User account database 122 stores user account data used by client 110 and other terminals 130, such as user account avatars, nicknames, and regions. User-facing I / O interface 123 establishes communication and exchanges data with client 110 and / or other terminals 130 via wireless or wired networks.
[0037] The human-computer interaction method based on gravity adjustment provided in this application embodiment can be executed by a computer device, which refers to an electronic device with data computing, processing, and storage capabilities. For example... Figure 1 As shown, the gravity-based human-computer interaction method can be executed by the client 110, or by the client 110 and the server 120 in cooperation. This application does not limit this.
[0038] like Figure 1 As shown, the following explanation uses the gravity-based human-computer interaction method executed by client 110 as an example. This method includes the following process: (1) Client 110 displays the virtual character and gravity adjustment mechanism in the virtual environment.
[0039] For example, client 110 has a game application installed and running on client 111, and user account of user 112 is logged in on client 111. After user 112 starts the game function of client 111, client 110 displays virtual character 100b and gravity adjustment mechanism 100c in virtual environment 100a.
[0040] Virtual Environment 100a is the core carrier for building immersive virtual scenes. It can construct interactive 3D scene models through geometric modeling, material rendering, physical interaction, and logical control. Virtual Environment 100a serves both as the visual representation of the 3D scene model and as the underlying container for physical rules, behavioral logic, and user interaction. It can support character movement, combat triggers, narrative progression, and puzzle structure. Virtual Environment 100a possesses real-time responsiveness and dynamic variability; its state changes according to user actions or event triggers.
[0041] Virtual Character 100b is an executable entity in the game system that carries the user's interactive intentions, behavioral logic, and narrative identity. It is a virtual character controlled by the user. Virtual Character 100b is the user's agent in the virtual world, encapsulating the core logic of virtual character movement and force response, and is responsible for converting input commands and physical parameters into specific motion behaviors.
[0042] The gravity adjustment mechanism 100c is a visual interactive control in the virtual environment 100a used to receive user interaction. For example, the gravity adjustment mechanism 100c may include a directional light cone control, which can be used to indicate the current gravity direction of the gravity adjustment mechanism 100c. The gravity adjustment mechanism 100c is not only a glowing beacon effect, but also a logical entity that adjusts the gravity direction based on user interaction.
[0043] The gravity adjustment mechanism 100c supports the selection of at least two of the four preset gravity directions, which include the up direction, down direction, left direction, and right direction.
[0044] (2) In response to the trigger operation of selecting the target gravity direction through the gravity adjustment mechanism 100c, the client 110 adjusts the current gravity direction of the virtual character 100b to the target gravity direction.
[0045] After the user selects a target gravity direction via the gravity adjustment mechanism 100c, the client 110 uses this target gravity direction as a physical attribute parameter and links it to the motion control component used to drive the character's behavior. The motion control component no longer needs to rely solely on internally preset default attribute parameters; it can also obtain the target attribute parameter (such as the target gravity direction) selected by the user. As an actuator, the motion control component reads the currently effective target gravity direction and converts it into a control quantity that drives the behavior of the virtual character 100b.
[0046] In addition, the client 110 can also use the target gravity direction as a physical attribute parameter and link it to the follow-view parameter of the virtual character 100b. The follow-view parameter is used to drive the view of the virtual character 100b to face the forward direction.
[0047] (3) During the process of adjusting the gravity direction of the virtual character, the client 110 controls one or more of the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object in the virtual environment to provide synchronous feedback display.
[0048] Objects in a virtual environment include at least one of the following: directional indicator, fluid effect object, scene decoration object, and interactive mechanism object.
[0049] Directional cues serve as visual feedback objects within the virtual environment 100a, providing users with information about the current and recommended gravity directions.
[0050] Fluid objects can include fountain fluid objects, waterfall fluid objects, particle fluid effect objects, or droplet fluid objects in the virtual environment 100a.
[0051] Scene decoration objects can include non-interactive, low-priority visual decorative elements in the virtual environment 100a, used to enhance the atmosphere and spatial realism.
[0052] Interactive mechanisms are used to guide users to complete specified operations or trigger task nodes, such as switches and treasure chests in the virtual environment 100a.
[0053] (4) Client 110 displays a color indicator corresponding to the target gravity direction based on the target gravity direction. The color indicator is used to indicate the current gravity direction of the virtual character 100b.
[0054] Color indicators may include at least one of the following: mechanism display color, directional indicator color, and scene area color. The mechanism display color may be the color displayed by the gravity adjustment mechanism 100c in its active or adjusted state. The scene area color may be a wide-area ambient lighting effect of the virtual environment 100a, or a color filtering effect for a specific area.
[0055] In summary, the gravity-adjustment-based human-computer interaction method provided in this application, on the one hand, adjusts the current gravity direction of the virtual character to the target gravity direction in response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism, thus realizing the adjustability of the character's gravity direction and providing users with a more diverse gaming experience. On the other hand, during the adjustment of the virtual character's gravity direction, controlling one or more of the following—the gravity adjustment mechanism, the virtual character, the camera corresponding to the virtual character's viewpoint, and at least one object located in the virtual environment—to provide synchronous feedback display, and by adopting a multi-object synchronous feedback mechanism, significantly improves the immersion and physical realism of the human-computer interaction, effectively optimizing the gravity simulation effect. Furthermore, displaying a color indicator corresponding to the target gravity direction effectively enhances the intuitiveness of the interactive operation and helps reduce the user's spatial cognition and operational load in non-standard gravity environments.
[0056] Next, the flow of the human-computer interaction method based on gravity adjustment provided in the embodiments of this application will be introduced.
[0057] Figure 2A flowchart of a gravity-based human-computer interaction method according to an embodiment of this application is shown. This method is executed by a terminal, server, computer system, or client. The method includes steps 210 to 240.
[0058] Step 210: Display the virtual character and gravity adjustment mechanism in the virtual environment.
[0059] As an interactive medium controlled by users in a virtual environment, virtual characters exhibit a high degree of diversity in their forms. For example, a virtual character can have a complete human or animal form, or it can be a non-physical ideology that only carries interactive functions. For instance, in some puzzle games, the virtual character controlled by the user can appear as a "glowing sphere," which can possess core interactive functions such as high-speed movement and even touching specific mechanisms.
[0060] Gravity adjustment mechanisms are interactive devices in virtual environments used to adjust the direction of gravity, and they can have a variety of visual representations. For example, a gravity adjustment mechanism can be a control console suspended in mid-air, a runic device embedded in a wall, a directional pillar structure, or even a large sphere with a unique texture. Gravity adjustment mechanisms can have obvious visual effects or symbols to indicate to the user that they have the function of adjusting the direction of gravity.
[0061] Step 220: In response to the trigger operation of selecting the target gravity direction through the gravity adjustment mechanism, the current gravity direction of the virtual character is adjusted to the target gravity direction.
[0062] The triggering operation for selecting the target gravity direction via the gravity adjustment mechanism can be highly diverse. For example, it can be triggered by traditional methods such as clicking, holding, or pushing a joystick. Furthermore, it can be based on more complex interaction modes to achieve the triggering operation for gravity direction selection. For instance, the operation can be triggered when a virtual character enters a specific trigger area, executes a specific interaction command, or meets certain auxiliary conditions to ensure the rationality of the interaction. This embodiment does not limit the form of the triggering operation.
[0063] In response to a trigger operation that selects a target gravity direction via the gravity adjustment mechanism, the virtual character's current gravity direction is adjusted to the target gravity direction. The target gravity direction can point upwards, downwards, leftwards, or rightwards, or it can point to a specific direction within the virtual environment (such as the direction of a specific building). Furthermore, the target gravity direction can be dynamically adjusted based on the virtual environment area where the virtual character is currently located. This embodiment does not limit the direction of the target gravity direction.
[0064] The adjustment of gravity direction can be instantaneous, but to reduce user dizziness, a brief transition animation or gradual process can be set to show the current gravity direction adjustment. During the adjustment process, the movement control of the virtual character can be paused.
[0065] Step 230: During the adjustment of the virtual character's gravity direction, control one or more of the following: gravity adjustment mechanism, virtual character, virtual character's corresponding view camera, and at least one object in the virtual environment to provide synchronous feedback display.
[0066] During the adjustment of the virtual character's gravity direction, the gravity adjustment mechanism can be controlled to produce highlights, pulse light effects, rotation, or mechanical structure deformation, etc., to achieve synchronous feedback display of the gravity adjustment mechanism.
[0067] During the adjustment of the virtual character's gravity direction, preset controlled animations of the virtual character can be played, or the virtual character can be controlled to complete specified actions, achieving synchronous feedback display of the virtual character. For example, the virtual character can be controlled to detach from the current support surface and enter a floating state. While the virtual character is in a floating state, the character's posture can be controlled to rotate and adjust according to the target gravity direction.
[0068] During the adjustment of the virtual character's gravity direction, the corresponding view camera of the virtual character can be controlled to rotate synchronously to be parallel to or match the target gravity direction, so as to guide the user's line of sight to adapt to the virtual environment interface after the gravity direction is adjusted.
[0069] During the adjustment of the virtual character's gravity direction, at least one object located in the virtual environment is controlled to rotate synchronously in the direction of orientation or movement until it is parallel to or matches the target gravity direction. Objects in the virtual environment include, for example, at least one of the following: directional indicator, fluid effect object, scene decoration object, or interactive mechanism object.
[0070] Step 240: Based on the target gravity direction, display a color indicator corresponding to the target gravity direction. The color indicator is used to indicate the current gravity direction of the virtual character.
[0071] For example, based on the target gravity direction, control at least one of the following: the color of the mechanism display, the color of the direction prompt mark, or the color of the scene area corresponding to the target gravity direction, to achieve synchronous feedback display of color marks.
[0072] In a 3D virtual environment, it may be difficult to quickly and accurately determine the current direction of gravity by visual observation alone (especially in high-speed movement or complex combat scenarios). Color markings can play a crucial role in indicating the direction of gravity.
[0073] The display color of the gravity adjustment mechanism can be the color it displays when it is active or in its adjusted state. Dynamic color-enabled material parameters can be configured for key components of the gravity adjustment mechanism (such as the compass, base halo, illuminated marker, and directional cone control). For example, when the gravity direction is adjusted, a preset target color (such as yellow) can be written into the material parameters using linear interpolation through the shader's emissive color parameter (such as the EmissiveColor parameter), causing the core luminous components of the gravity adjustment mechanism to change color.
[0074] Directional indicators can provide users with information about the current and / or recommended gravity direction. These can be, for example, a compass rose in a gravity adjustment mechanism, a directional cone control, or arrows, trajectory lines, or compass markers displayed in a virtual environment; this embodiment does not limit this. The display color of the directional indicators can be changed by updating the self-illumination color parameter in the material parameters. For example, the color of the compass rose in the gravity adjustment mechanism can be changed by adjusting the RGB values of the arrow texture.
[0075] Scene area colors can be either a broad environmental effect within the virtual environment or a color filter effect for a specific area. The color grading function can be used to dynamically adjust the hue shift of specific areas in the virtual environment during gravity direction adjustments, so that the scene area color indicates the current gravity direction.
[0076] For example, a specific area could be the area where the gravity adjustment mechanism is located. By displaying corresponding color indicators during gravity direction adjustments, it helps users quickly identify the current gravity direction. Alternatively, a specific area could be a visible area centered on the user's perspective, or a large area of scene elements such as walls, floors, or ceilings.
[0077] The gravity-adjustment-based human-computer interaction method provided in this application, on the one hand, responds to the trigger operation of selecting a target gravity direction through a gravity adjustment mechanism, adjusting the current gravity direction of the virtual character to the target gravity direction, thus realizing the adjustability of the character's gravity direction and providing users with a more diverse interactive experience. On the other hand, during the adjustment of the virtual character's gravity direction, one or more of the following are synchronously displayed: the gravity adjustment mechanism, the virtual character, the camera corresponding to the virtual character's viewpoint, and at least one object located in the virtual environment. By adopting a multi-object synchronous feedback mechanism, the perceptibility of the direction switching process is enhanced, significantly improving the immersion and physical realism of the human-computer interaction. Furthermore, displaying a color indicator corresponding to the target gravity direction effectively improves the intuitiveness of the interactive operation, reduces the difficulty of direction recognition, and effectively reduces trial-and-error operations caused by misjudgment of state.
[0078] As the core medium for user interaction with the gravity adjustment system, the gravity adjustment mechanism can intuitively convey the current gravity state and provide gravity direction selection functionality through visual state switching (normal / active state), dynamic effect transformation (self-rotation / beam extension), and directional light cone controls. This state-driven visual feedback mechanism effectively ensures that users intuitively understand the interactivity of the mechanism and the currently effective gravity direction it represents.
[0079] In some embodiments, when the gravity adjustment mechanism is in its normal state, the gravity adjustment mechanism is controlled to display either a self-rotating state or a static state. Furthermore, in response to interaction between the virtual character and the gravity adjustment mechanism, the gravity adjustment mechanism is controlled to switch from a normal state to an active state and stop its self-rotation.
[0080] Figure 3 A schematic diagram of a gravity adjustment mechanism in a virtual environment provided in an embodiment of this application is shown. Figure 3 As shown, the gravity adjustment mechanism may include a core mechanism body 301, a directional light cone control 302, and a mechanism scene model 303.
[0081] The core mechanism 301, serving as the visual center of the gravity adjustment mechanism, can be a luminous entity with a specific geometric shape. When the gravity adjustment mechanism is inactive, the core mechanism 301 exhibits its normal appearance. When a virtual character enters the mechanism's entrance scene or the user triggers the gravity control option, the gravity adjustment mechanism becomes active, and the core mechanism 301 exhibits its active appearance.
[0082] Figure 4 A schematic diagram of a core mechanism body provided in an embodiment of this application is shown. For example... Figure 4 As shown, the core mechanism 401 in its normal state can slightly float up and down in a fixed position (e.g., a sinusoidal motion with an amplitude of 0.2 meters and a period of 2 seconds). Furthermore, the core mechanism 401 in its normal state can also be configured to slowly rotate or remain stationary. In its activated state, the core mechanism 402 extends dynamic beams from its two poles, and these beams can have a particle flow effect. The core mechanism 402 is surrounded by a self-illuminating, airflow-like halo effect (which can be simulated using a particle system to enhance its visual impact as the core of the mechanism).
[0083] In addition, a fixed side-view camera (as shown in 403) can be used to clearly and without perspective distortion present the three-dimensional structure of the gravity adjustment mechanism.
[0084] The directional light cone control 302 serves as a direction indicator for the gravity adjustment mechanism, and its central axis can always point to the current gravity direction of the gravity adjustment mechanism. The mechanism scene model 303 can be used to carry the local scene features of the gravity adjustment mechanism, and may include the base, connection structure, background elements, etc., and can be used to naturally anchor the gravity adjustment mechanism in the virtual environment.
[0085] The directional control 304 can be displayed only when the gravity adjustment mechanism is active, and it is usually manifested as interactive buttons, directional arrows, or control nodes around the core mechanism body 401. The directional control 304 can be evenly distributed around the periphery of the gravity adjustment mechanism in spherical coordinates or in a specific array.
[0086] The active gravity adjustment mechanism displays at least one direction control 304, which can be used to adjust the virtual character's current gravity direction to the corresponding target gravity direction. For example... Figure 3 As shown, the gravity adjustment mechanism displays direction controls 304 for the upward, leftward, and downward directions, which are used to adjust the current gravity direction of the virtual character to the upward, leftward, and downward directions, respectively.
[0087] Most of the directional controls for the gravity adjustment mechanism are in a triggerable state, but the directional control corresponding to the virtual character's current gravity direction is in a non-selectable state. For example, if the virtual character's current gravity direction is downward, the downward directional control is in a non-selectable state.
[0088] Figure 5 A schematic diagram of a direction control provided in an embodiment of this application is shown. Figure 5 As shown, the target gravity direction corresponding to the triggerable direction control 501 is inconsistent with the current gravity direction of the virtual character. The target gravity direction corresponding to the unselectable direction control 502 is consistent with the current gravity direction of the virtual character.
[0089] For example, the unselectable state of directional controls can be visually represented by reducing transparency and using a grayscale filter. Additionally, the mouse hover effect of the directional controls can be removed and event listeners can be triggered to disable the corresponding directional controls.
[0090] In some implementations, the virtual environment includes multiple virtual scene resources, such as directional indicator icons, which are used to indicate the target gravity direction recommended for the current task scene, as well as the target gravity direction corresponding to different display effects of the gravity adjustment mechanism.
[0091] To balance goal guidance and freedom of exploration within the game interface, and to prevent users from experiencing stagnation due to difficulties in directional identification, this embodiment incorporates a navigation mechanism in the direction selection interface that combines clear guidance with the user's autonomy. For example, when the virtual character is at a main quest or key stage and needs to utilize gravity conversion to advance, highlighted directional indicators (such as arrows or preset icons) can indicate the recommended gravity direction for the quest. By providing clear and unambiguous operational guidance, this assists users in making quick decisions, effectively preventing spatial cognitive load and immersion interruptions caused by difficulties in directional identification.
[0092] In some implementations, the display effect of the gravity adjustment mechanism can vary depending on the current direction of gravity. This visual feedback mechanism can intuitively indicate the currently effective direction of gravity. Figure 6 Schematic diagrams illustrating different display effects of the gravity adjustment mechanism provided in embodiments of this application are shown. For example... Figure 6 As shown, the display effect of the gravity adjustment mechanism differs depending on the direction of gravity. For example, the core mechanism and the scene model of the gravity adjustment mechanism can emit different colors of light when the gravity direction is different.
[0093] The core mechanism can utilize self-illuminating materials or dynamic point light sources, with its display color dynamically changing based on the current direction of gravity. The mechanism scene model serves to represent the local scene features of the gravity adjustment mechanism, including elements such as the base, connecting structures, and background. The display color of the mechanism scene model can be synchronized with the color changes of the core mechanism through material parameter animation or the color gradient function of the particle system.
[0094] Taking the downward direction of gravity for gravity adjustment mechanism 601 as an example, the core mechanism and scene model of gravity adjustment mechanism 601 can emit a blue light. Taking the leftward direction of gravity for gravity adjustment mechanism 602 as an example, the core mechanism and scene model of gravity adjustment mechanism 602 can emit a green light. Taking the upward direction of gravity for gravity adjustment mechanism 603 as an example, the core mechanism and scene model of gravity adjustment mechanism 603 can emit a golden light.
[0095] In this embodiment, a visual guidance system based on the concept of "gravity color" is constructed. A unique color identifier is assigned to different gravity directions in the world coordinate system, enabling intuitive visualization of gravity states. When a user triggers a gravity direction change in the virtual environment, the virtual environment will display differentiated color representations for different gravity states. For example, the standard gravity direction is identified using a blue tone, the upside-down gravity direction is distinguished by a gold tone, and all other non-standard gravity directions are uniformly identified using a green tone. This color differentiation design mechanism allows users to quickly identify the gravity orientation of their current plane through visual perception, thereby assisting them in spatial navigation and action planning.
[0096] Furthermore, a smooth color transition mechanism can be employed to visually represent the process of gravity direction transformation. When a virtual character switches gravity directions, a continuous, flowing visual effect can be used to present the gradual change in gravity direction. For example, blue tones gradually merge with green tones, then smoothly transition to gold tones. This gradual color fusion process can intuitively reflect the real-time degree of gravity direction switching. This design not only enhances the smoothness of visual presentation but also provides users with clear cues for perceiving gravity states through continuous color changes, helping to reduce the user's spatial cognitive load and effectively improving the immersion of the gaming experience and the intuitiveness of interactive operations.
[0097] In some implementations, in response to a triggering operation that selects a target gravity direction via a gravity adjustment mechanism, the virtual character's current gravity direction is adjusted to the target gravity direction. Furthermore, during the adjustment of the virtual character's gravity direction, the virtual character's state is simultaneously displayed as feedback.
[0098] For example, during the adjustment of the virtual character's gravity direction, the virtual character is controlled to enter or be in a floating state, and the vertical direction of the virtual character is controlled to rotate synchronously to be parallel to or match the target gravity direction.
[0099] Figure 7 This diagram illustrates the floating state of a virtual character according to an embodiment of this application. Figure 7 As shown, during the adjustment of the gravity direction of the virtual character 701, the virtual character 701 is controlled to enter or be in a floating state.
[0100] For example, in response to a detected trigger operation on the gravity control option, the virtual character is controlled to detach from the current support surface and enter a levitating state. While the virtual character is levitating, the character's posture is adjusted by rotating according to the target gravity direction, so that the virtual character's vertical direction gradually changes to be parallel to or matches the target gravity direction.
[0101] When the virtual character is in a suspended state, the required rotation angle and axial parameters can be calculated based on the target gravity direction. Based on these parameters, a quaternion spherical interpolation method is used to smoothly control the virtual character's rotation from its current posture to the target posture. During the rotation, the virtual character's vertical direction (usually the direction above its head) is gradually adjusted until it is parallel to or matches the target gravity direction.
[0102] After the virtual character's gravity direction is adjusted, control the virtual character to fall towards the target support surface along the force direction corresponding to the target gravity direction. After the gravity direction adjustment is complete, reactivate the gravity effect and calculate the position of the target support surface based on the target gravity direction. Control the virtual character to fall smoothly towards the target contact surface along the force direction of the target gravity direction, and resume normal walking upon contact with the target contact surface.
[0103] By simulating the weightlessness, levitation, and rotation of virtual characters before re-landing, the dynamic response of objects under changing gravitational fields is simulated. This constructs a character behavior logic that conforms to physical intuition, which can effectively enhance the immersiveness and physical realism of human-computer interaction and effectively optimize the gravity simulation effect.
[0104] The virtual environment includes multiple virtual scene resources, such as gravity control options, which are used to trigger adjustments to the virtual character's gravity orientation. In response to detecting a trigger operation on the gravity control options, the gravity adjustment mechanism is activated, and at least one directional control of the gravity adjustment mechanism is displayed. Simultaneously, based on a first display effect, the activated gravity adjustment mechanism is presented. The first display effect matches the virtual character's current gravity orientation.
[0105] In some implementations, in response to a triggering operation that selects a target gravity direction via the gravity adjustment mechanism, the virtual character's current gravity direction is adjusted to the target gravity direction. During the adjustment of the virtual character's gravity direction, the gravity adjustment mechanism provides synchronous feedback display.
[0106] During the adjustment of the virtual character's gravity direction, the vertical direction of the gravity adjustment mechanism is rotated synchronously to be parallel to or match the target gravity direction.
[0107] For example, a target rotation angle is determined between the current orientation of the gravity adjustment mechanism and the target gravity direction. The gravity adjustment mechanism is controlled to rotate around a preset rotation axis so that the vertical direction of the gravity adjustment mechanism gradually changes to be parallel to or match the target gravity direction.
[0108] Simultaneously, as the gravity adjustment mechanism rotates, the display status of the gravity adjustment mechanism is updated to represent the change process of the current mechanism direction towards the target gravity direction.
[0109] For example, during the rotation of the gravity adjustment mechanism, the display effect of the gravity adjustment mechanism smoothly transitions from a first display effect to a second display effect. The first display effect matches the current gravity direction of the virtual character, while the second display effect differs from the first. The smooth transition of the gravity adjustment mechanism's display effect matches the degree of real-time switching from the current gravity direction to the target gravity direction, that is, it matches the rotation angle of the gravity adjustment mechanism.
[0110] Associating the display effect of the gravity adjustment mechanism with the currently effective gravity direction and mapping the switching process of the display effect with the rotation angle of the gravity adjustment mechanism can significantly reduce the user's spatial cognitive load in a dynamic gravity environment, effectively improve spatial orientation efficiency, and enhance the immersion of the game experience and the intuitiveness of human-computer interaction.
[0111] The gravity adjustment mechanism includes a core mechanism body and a scene model. The core mechanism body serves as the static framework of the interactive interface, maintaining its position and shape during gravity direction adjustments to provide a stable visual anchor for the user. The scene model, a dynamic 3D model attached to the core mechanism body, includes a built-in directional light cone control. The direction of the directional light cone control indicates the current gravity direction of the gravity adjustment mechanism.
[0112] Figure 8 This diagram illustrates the rotation process of a gravity regulating mechanism according to an embodiment of this application. Figure 8 As shown, in the initial state (as shown in 8a), the direction of the directional light cone control 801 is downward, which represents the current gravity direction of the gravity adjustment mechanism as downward.
[0113] The gravity adjustment mechanism in interface 8a is in an active state (i.e., an interactive state). Multiple directional controls 802 are displayed around the active gravity adjustment mechanism, each indicating the target gravity direction the user can select. Additionally, with the gravity adjustment mechanism active, the virtual character 803 enters a hovering state to indicate to the user that a gravity direction adjustment is imminent.
[0114] In response to a trigger operation that selects a target gravity direction via a target direction control, the gravity adjustment mechanism is controlled to rotate. For example, the core mechanism of the gravity adjustment mechanism remains stationary, while the mechanism's scene model (along with its internal directional light cone control 801) smoothly rotates from the current gravity direction to the target gravity direction. The rotation of the mechanism's scene model is not instantaneous but is achieved through interpolated animation over several hundred milliseconds (as shown in 8b). The real-time rotation angle of the mechanism's scene model (such as the directional light cone control 801) visually maps the real-time degree of transition from the current gravity direction to the target gravity direction.
[0115] During the rotation of the mechanism scene model, multiple directional controls 802 around the gravity adjustment mechanism are hidden, and the virtual character 803 is controlled to remain in a floating state.
[0116] When the rotation animation of the mechanism scene model ends and it is fully aligned with the target gravity direction (as shown in 8c, the directional light cone control 801 points to the right), it signifies that the gravity direction switching process is complete. At this point, a state reset operation can be performed, such as restoring the display of the multiple direction controls 802 around the gravity adjustment mechanism to restore the full interactive functionality of the gravity adjustment mechanism, allowing the user to make the next gravity direction selection.
[0117] In addition, based on the direction of force in the direction of the target gravity, the target contact surface (such as the ground, wall, or ceiling) of the virtual character in the new direction of force can be calculated. By playing a short falling animation, the virtual character can be controlled to slowly fall back to the target contact surface.
[0118] In some implementations, when a virtual character enters the area where the gravity adjustment mechanism is located, and the current gravity direction of the virtual character is inconsistent with the current direction of the gravity adjustment mechanism, the gravity adjustment mechanism is first adjusted to be consistent with the current gravity direction of the virtual character before the interaction entry is displayed.
[0119] In response to a virtual character's current position entering the gravity adjustment mechanism's entrance scene, the system checks whether the virtual character's current gravity direction matches the gravity adjustment mechanism's current direction. If the directions do not match, the gravity adjustment mechanism will not immediately display an interaction interface; instead, it will first perform an adaptive adjustment of its direction. Once the mechanism's direction matches the virtual character's current gravity direction, the gravity adjustment mechanism will activate and display the interaction interface.
[0120] In response to the trigger operation of selecting the target gravity direction through the gravity adjustment mechanism, a direction selection interface is displayed. The direction selection interface includes multiple direction controls, each of which allows the user to select the corresponding target gravity direction.
[0121] Optionally, the directional control corresponding to the virtual character's current gravity direction is unselectable. This unselectability can be visually represented by reducing the opacity (approximately 30%) and using a grayscale filter. Additionally, the mouse hover effect and event listener for the corresponding directional control can be removed to disable it.
[0122] In addition, the direction selection interface also displays a target direction prompt, which is used to indicate the recommended gravity direction corresponding to the task flow.
[0123] In some implementations, in response to receiving an exit operation for the direction selection interface, if the virtual character has been adjusted to the target gravity direction, the user exits the direction selection interface and controls the virtual character to land along the target gravity direction.
[0124] In some implementations, during the adjustment of the virtual character's gravity direction, the view camera corresponding to the virtual character is controlled to provide synchronous feedback display. For example, during the adjustment of the virtual character's gravity direction, the view camera corresponding to the virtual character is controlled to rotate synchronously until it is parallel to or matches the target gravity direction.
[0125] Optionally, in response to a trigger operation targeting the direction of gravity, the view camera is controlled to move to the target view position for focusing the gravity adjustment mechanism and the virtual character.
[0126] For example, in response to a detected trigger operation on the target direction control, the gravity adjustment mechanism is controlled to rotate around a preset rotation axis, so that the vertical direction of the gravity adjustment mechanism gradually changes to be parallel to or match the target gravity direction. During the rotation of the gravity adjustment mechanism, the virtual character is controlled to detach from the current support surface and enter a floating state.
[0127] Simultaneously, the camera is moved to the target viewpoint used to focus on the gravity adjustment mechanism and the virtual character. For example, a fixed side-view camera can be used to clearly and without perspective distortion present the gravity adjustment mechanism and the virtual character in a suspended state.
[0128] In this embodiment, the virtual character is configured with a following viewpoint parameter to drive the virtual character's viewpoint to face the direction of movement. Since the gravity field of the virtual environment itself does not change, but the current gravity direction of the virtual character changes, the following viewpoint parameter needs to be adjusted after the gravity direction is adjusted to ensure that the virtual character's viewpoint adapts to the new gravity direction. The design of the following viewpoint parameter can quantify the user's subjective and dynamic gaze direction into objective data that can be processed and judged by the program.
[0129] Following viewpoint parameters include, for example, the camera pose parameters of the viewpoint camera used to automatically focus on the virtual character in the virtual environment. Camera pose parameters include at least one of the following: position parameter, pitch angle parameter, yaw angle parameter, and roll angle parameter. Camera pose parameters can determine the user's line of sight and the composition of the virtual scene.
[0130] In modern third-person games, the camera positioned over the virtual character is not completely stationary; instead, it automatically follows and focuses on the virtual character according to preset game rules. The camera's attitude parameters can be adjusted based on the target's gravity direction and the virtual character's current orientation axis. Then, based on these camera attitude parameters, the virtual environment is imaged, resulting in an image of the virtual environment that conforms to the target's gravity direction.
[0131] For example, the upward vector of the view camera can be adjusted to be in the opposite direction of the target's gravity, that is, consistent with the "ground" normal perceived by the virtual character. The upward vector of the view camera refers to the unit vector representing the "up" direction in the camera coordinate system. The upward vector can affect the orientation characteristics and field of view of the view camera. For example, when the target's gravity direction is downward (0,-1,0), the upward vector of the view camera is usually (0,1,0).
[0132] Taking gravity direction reversal as an example, when a virtual character flips from a downward gravity direction to an upward gravity direction, the virtual environment is controlled to present an inverted appearance. For example, the ground that was originally at the bottom of the scene will move to the top, and the ceiling that was originally at the top will move to the bottom.
[0133] As one possible implementation, the target objects in the virtual environment also include motion interaction objects, which are used to allow virtual characters to perform motion interactions in the three-dimensional virtual environment.
[0134] It can obtain the normal vector parameters of the moving interactive object, and control the motion interaction process between the virtual character and the moving interactive object based on the target gravity direction and normal vector parameters. The normal vector parameter can indicate the normal direction of the moving interactive object.
[0135] When the direction of gravity of the target is collinear with the normal direction of the moving interactive object (the included angle is close to 180°), control the virtual character to move on the surface of the moving interactive object.
[0136] When the target's gravity direction and the normal direction are collinear and in opposite directions, the virtual character can be considered to be standing on the surface of the interactive object. The virtual character can then walk, run, jump, etc., normally on the surface of the interactive object. In practical applications, when the angle between the target's gravity direction and the normal direction is greater than a preset threshold (e.g., ...), the virtual character is considered to be standing on the surface of the interactive object. In cases where the angle is greater than 150°, the virtual character's controller can treat the surface of the moving interactive object as the "ground".
[0137] When the target's gravity direction is perpendicular to the normal direction of the interactive object, the virtual character is controlled to climb on the surface of the interactive object. In practical applications, the angle between the target's gravity direction and the normal direction is within a preset range (e.g., 70° < 0°). When the angle is less than 110°, control the virtual character to climb on the surface of the moving interactive object. The "movement" of the virtual character on the surface of the moving interactive object can be mapped to movement along the horizontal direction of the surface and movement along the vertical direction of the surface.
[0138] When the angle between the target gravity direction and the normal direction is less than a preset threshold (e.g., When the angle is less than 30°, and the direction of gravity of the target is approximately the same as the direction of the normal, the virtual character cannot remain stably on the surface of the moving interactive object. Therefore, it is possible to control whether the virtual character slides off the surface of the moving interactive object or falls directly.
[0139] After the virtual character's gravity direction is adjusted, a mismatch may occur between the user's input and the virtual character's actual movement direction. For example, after the virtual character's gravity direction is flipped (the target gravity direction is upward), when the user presses the left directional key, the virtual character moves to the right. This inconsistency in directional control can severely affect the user's operational intuition and spatial orientation, increasing the difficulty of spatial direction recognition.
[0140] The directional control malfunction may be due to a failure to update the motion control reference frame synchronously. For example, during a gravity direction reversal, only the direction of gravity acting on the virtual character is adjusted, but the associated motion control reference frame is not adjusted accordingly. Under standard gravity conditions, the coordinate system of the virtual environment (i.e., the world coordinate system) is consistent with the user's visual perception; the left side of the screen corresponds to the negative X-axis (left) of the world coordinate system, and the right side corresponds to the positive X-axis (right) of the world coordinate system. When the virtual character's gravity direction is reversed, the "up" and "down" of the entire world are swapped, but the motion control system still uses the original mapping relationship based on the world coordinate system. At this time, if the user presses the left button, the system will still issue a movement command to the negative X-axis of the world coordinate system, but because the user's viewpoint has rotated 180° with the gravity reversal, the original left side of the world appears as the right side.
[0141] Therefore, after the virtual character's gravity direction is adjusted, it is necessary to ensure that the virtual character can still move in the direction expected by the user in the new gravity environment.
[0142] In some possible implementations, the method further includes: switching the motion control reference system matched with the virtual character from a world coordinate system to a relative coordinate system based on the user's current viewpoint, the motion control reference system being used to control the movement of the virtual character in the virtual environment.
[0143] The step of switching the motion control reference system matched with the virtual character from the world coordinate system to a relative coordinate system based on the user's current viewpoint includes: based on the target gravity direction of the virtual character, switching the motion control reference system from the world coordinate system to the relative coordinate system matched with the target gravity direction, wherein the downward direction of the relative coordinate system matches the target gravity direction, and the target gravity direction determines the viewpoint direction of the user's current viewpoint.
[0144] The downward direction of the relative coordinate system matches the direction of the target gravity, including: the negative Y-axis direction of the relative coordinate system is consistent with the direction of the target gravity.
[0145] The method further includes: receiving a trigger operation for controlling the movement of a virtual character; and controlling the movement of the virtual character in the virtual environment based on the motion control reference frame and a first motion direction indicated by the trigger operation.
[0146] The method further includes: determining a first motion direction indicated by the triggering operation based on the world coordinate system; controlling the movement of the virtual character in the virtual environment based on the motion control reference system and the first motion direction indicated by the triggering operation includes: determining a second motion direction that satisfies the mapping relationship between the motion control reference system and the world coordinate system and the first motion direction; and controlling the movement of the virtual character in the virtual environment based on the second motion direction.
[0147] The world coordinate system can be a standard Cartesian coordinate system (such as the positive X-axis to the right, the positive Z-axis forward, and the positive Y-axis upward). The world coordinate system remains fixed during game execution and is used to define the absolute position of objects in the virtual environment and the inherent physical laws of the scene (such as the basic lighting direction).
[0148] The mapping relationship can essentially be a rotation matrix from the world coordinate system to the motion control reference system. Using this rotation matrix, the direction vector of the first motion direction is rotated to obtain the direction vector of the second motion direction. Based on the direction vector of the second motion direction, the movement of the virtual character in the virtual environment is controlled.
[0149] Based on the current effective gravity direction of the virtual character, the motion control reference frame used to control the movement of the virtual character is switched, eliminating the control confusion caused by changes in gravity direction in traditional fixed coordinate systems. This allows users to intuitively control movement according to the current viewpoint, ensuring consistency between the movement direction of the virtual character and the user's intention, which significantly improves the user's operating experience and immersion.
[0150] Optionally, during the adjustment of the virtual character's gravity direction, a walkable area for the virtual character is determined based on the target gravity direction. Furthermore, a navigation grid based on the walkable area is constructed to ensure that the path for automatic movement or AI pathfinding conforms to the force direction of the target gravity direction. The angle between the normal direction of the walkable area and the target gravity direction is greater than a preset threshold.
[0151] In this embodiment, instead of unloading the current scene and loading a pre-rotated copy of the new scene to simulate gravity changes, the virtual character's physical orientation and the direction of the gravitational vector it experiences are adjusted so that it can stand, walk, or jump relative to the environment while keeping the virtual scene fixed.
[0152] This design fundamentally ensures the flexibility and freedom of gravity-based gameplay. Since adjusting the gravity direction only affects the virtual character, without requiring the entire virtual scene to be rotated or reloaded, users can explore the same large open-world map using any preset gravity direction, truly achieving a free movement experience in three-dimensional space. Secondly, this design demonstrates significant advantages in resource consumption and package optimization. It avoids the data storage redundancy caused by pre-creating multiple scene copies for each gravity direction, effectively controlling the game client's installation package size and runtime memory usage while maintaining gameplay richness.
[0153] In some implementations, during the adjustment of the virtual character's gravity direction, the gravity adjustment mechanism, the virtual character, the camera corresponding to the virtual character's viewpoint, and scene objects are controlled to provide layered synchronous feedback display.
[0154] Figure 9 This is a schematic diagram illustrating the synchronized feedback display of the gravity adjustment mechanism, the virtual character, the view camera, and scene objects during the adjustment of the gravity direction of a virtual character, provided by an exemplary embodiment of this application. Figure 9 As shown, the above synchronous feedback display may include at least one of the following layers: the first layer is the gravity adjustment mechanism 25, the second layer is the virtual character 26, the third layer is the perspective camera 27, and the fourth layer is the scene objects.
[0155] For example, during the transition from the current gravity direction to the target gravity direction, the gravity adjustment mechanism 25 is controlled to rotate and display according to the target rotation angle θ to represent the transition from the current gravity direction to the target gravity direction. Simultaneously, the virtual character 26 is controlled to enter a floating state and its posture is adjusted synchronously according to the target rotation angle θ, where the floating height of the virtual character 26 can be represented as h. By setting the virtual character 26 to a floating state, unreasonable collisions or friction between the character and the current support surface during gravity switching can be avoided, thereby improving the continuity of the gravity direction adjustment process.
[0156] Synchronously, the viewpoint camera 27 adjusts its posture according to the target's gravity direction. For example, the viewpoint camera 27 can be controlled to rotate synchronously according to the target's rotation angle θ, and the field of view angle of the viewpoint camera 27 can be set to a preset field of view angle, such as 60°, so that the user can continuously observe the changing state of the gravity adjustment mechanism 25 and the virtual character 26 during the gravity direction switching process. In this embodiment, the specific value of the field of view angle can be configured according to the application scenario, and this embodiment does not limit it.
[0157] Additionally, scene objects are controlled for synchronized feedback display. Scene objects include, for example, trees 28, buildings 29, and the ground 30. For instance, at least one of the trees 28, buildings 29, and the ground 30 can be controlled to rotate synchronously according to the target gravity direction, so that the overall orientation of the scene image is consistent with the current force direction of the virtual character. By implementing layered synchronized control of the gravity adjustment mechanism 25, the virtual character 26, the view camera 27, and scene objects, the user's overall perception of the gravity switching process can be enhanced, avoiding spatial cognitive fragmentation caused by changes in only a single object.
[0158] The above-mentioned solution provided in this application embodiment, by synchronously displaying the gravity adjustment mechanism, virtual character, perspective camera and scene objects, can intuitively present the change process of the target gravity direction to the user in a multi-object linkage manner, which is conducive to enhancing the perceptibility of the direction switching process, reducing the difficulty for users to identify the current spatial orientation, and reducing the trial and error of operation caused by misjudgment of gravity state.
[0159] In some implementations, during the adjustment of the virtual character's gravity direction, one or more of at least one object located in the virtual environment are controlled to provide synchronous feedback display.
[0160] For example, during the adjustment of the virtual character's gravity direction, the orientation or movement direction of at least one object located in the virtual environment is controlled to rotate synchronously to be parallel to or match the target gravity direction.
[0161] As one possible implementation, a target object associated with the target gravity direction is identified. During the adjustment of the virtual character's gravity direction, the orientation, posture, or motion parameters of the target object are synchronously adjusted according to the target gravity direction. The target object includes at least one of the following: directional indicator, fluid effect object, scene decoration object, or interactive mechanism object.
[0162] The step of controlling the orientation or movement direction of at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction includes: when the at least one object includes a flexible object, controlling the orientation of the flexible object to be adjusted according to the target gravity direction so that the downward direction of the flexible object is parallel to or matches the target gravity direction.
[0163] The flexible object includes at least one of vegetation objects, fabric objects, or hanging decoration objects. The fluid object includes at least one of fountain fluid objects, waterfall fluid objects, or particle fluid effect objects.
[0164] The step of controlling the attitude orientation of the flexible object to be adjusted according to the target gravity direction includes: acquiring at least one attitude control point of the flexible object; determining a target offset direction acting on the at least one attitude control point based on the target gravity direction; and adjusting the position of the at least one attitude control point according to the target offset direction to update the attitude of the flexible object.
[0165] The at least one attitude control point includes a root control point and an end control point of the flexible object, wherein the position of the root control point remains unchanged, and the end control point is offset along the force direction corresponding to the target gravity direction.
[0166] The step of controlling the attitude orientation of the flexible object to be adjusted according to the target gravity direction includes: updating the gravity action vector of the flexible object based on the target gravity direction; and performing attitude simulation calculation on the flexible object according to the updated gravity action vector to obtain the adjusted attitude result.
[0167] The posture simulation calculation includes at least one of the following: skeletal chain swing calculation, mass spring calculation, and cloth simulation calculation.
[0168] The orientation of the flexible object smoothly transitions from a first orientation corresponding to the current gravity direction to a second orientation corresponding to the target gravity direction.
[0169] The smooth transition from the first posture to the second posture includes: within a preset transition time, gradually adjusting the posture parameters of the flexible object according to an interpolation method.
[0170] The posture adjustment of the flexible object is performed synchronously with the gravity direction adjustment process of the virtual character.
[0171] As one possible implementation, controlling the orientation or movement direction of at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction includes: when the at least one object includes a fluid object, controlling the flow direction or jet direction of the fluid object to adjust according to the target gravity direction so that the flow direction or jet direction of the fluid object is parallel to or matches the target gravity direction.
[0172] The fluid objects include at least one of the following: fountain fluid objects, waterfall fluid objects, particle fluid effect objects, and droplet fluid objects.
[0173] The step of controlling the flow direction or jet direction of the fluid object to be adjusted according to the target gravity direction includes: obtaining the transmitter parameters corresponding to the fluid object; adjusting the initial emission direction parameter in the transmitter parameters based on the target gravity direction; and generating the fluid object according to the adjusted initial emission direction parameter.
[0174] The transmitter parameters also include at least one of the following: initial velocity parameter, gravitational acceleration parameter, lifetime parameter, and diffusion angle parameter.
[0175] The step of adjusting the flow direction or jet direction of the fluid object according to the target gravity direction includes: updating the gravity action vector acting on the fluid object based on the target gravity direction; and calculating the motion trajectory of the fluid object based on the updated gravity action vector.
[0176] The calculation of the motion trajectory of the fluid object includes: determining the position parameters of the fluid object at each moment based on the initial velocity of the fluid object and the updated gravity vector.
[0177] The flow direction or jetting direction of the fluid object smoothly transitions from the first direction corresponding to the current gravity direction to the second direction corresponding to the target gravity direction.
[0178] The smooth transition includes: gradually adjusting the emission direction parameter or gravity vector parameter of the fluid object within a preset transition time.
[0179] The adjustment of the flow direction or jet direction of the fluid object is performed synchronously with the adjustment of the gravity direction of the virtual character.
[0180] By adopting a multi-object synchronous feedback mechanism, the immersiveness and physical realism of human-computer interaction can be significantly improved, and the gravity simulation effect can be effectively optimized.
[0181] In some implementations, during the adjustment of the virtual character's gravity direction, at least one object in the virtual environment, including a flexible object (within the field of view), is synchronously adjusted in orientation according to the target gravity direction.
[0182] Figure 10 This is a schematic diagram illustrating the attitude simulation adjustment of a flexible object under the action of target gravity direction, provided by an exemplary embodiment of this application. Figure 10 As shown, flexible objects include at least one of vegetation objects, cloth objects, and rope objects.
[0183] 1. Adjusting the posture of vegetation objects like Figure 10 As shown in Part A, the flexible object is a tree 31. The tree 31 may include a root control point 32 and an end control point 33, wherein the position of the root control point 32 remains unchanged, and the end control point 33 can be offset according to the direction of the target gravity.
[0184] For example, when the target gravity direction is G→, the direction of gravity acting on tree 31 is adjusted from the default vertical downward direction to the right direction, so that tree 31 gradually changes from its initial posture to a tilted state. Accordingly, the swaying direction of tree 31 is also changed according to the target gravity direction. By updating the positional relationship between the root control point 32 and the end control point 33, the posture result of tree 31 under the target gravity direction can be obtained.
[0185] 2. Adjusting the posture of the fabric object like Figure 10 As shown in section B, the flexible object is fabric 34. Fabric 34 can be attached to a fixed point 35 and has a free end 36 that can swing with the direction of gravity.
[0186] For example, when the target gravity direction is in the G↓ state, the fabric 34 hangs naturally in the vertical downward direction; when the target gravity direction is adjusted to the G→ state, the hanging direction of the fabric 34 changes from vertically downward to deflecting to the right, thus making the fabric 34 exhibit a posture change result corresponding to the target gravity direction. By binding the posture change of the fabric 34 to the target gravity direction, the current gravity direction information can be intuitively conveyed to the user using the fabric dynamics in the scene.
[0187] 3. Adjusting the posture of the rope object like Figure 10As shown in section C, the flexible object is a rope 39. Rope 39 is connected to suspension point 37 and suspends a weight 38. The attitude change of rope 39 can be calculated using a simulation algorithm. For example, relevant parameters may include the elastic coefficient k, length L, and mass m, etc.
[0188] In some implementations, the gravity vectors acting on the rope 39 and the weight 38 are updated based on the target gravity direction. For example, the gravity vector can be G↓, G↑, G←, or G→. After updating the gravity vector, the acceleration is calculated according to Newton's second law F=m×a, where the acceleration a can be determined by the gravity term G, the elastic effect term, and the damping effect term, and can be expressed as: a=G+Felastic+FDamping.
[0189] Furthermore, the attitude of rope 39 can be iteratively updated based on the attitude update relationship. For example, the angle update relationship can be expressed as: θ(t+Δt)=θ(t)+ω(t)Δt; the angular velocity update relationship can be expressed as: ω(t+Δt)=ω(t)+α(t)Δt.
[0190] Optionally, the simulation parameters may include: an update frequency of 60 FPS, a time step Δt = 1 / 60 s, a damping coefficient c = 0.1, and an elastic modulus E = 10^6 Pa. It should be understood that the above parameters are merely examples and are not intended to limit the scope of this embodiment.
[0191] By synchronously adjusting the orientation of flexible objects such as vegetation, cloth, and rope, the visual appearance of these objects in the virtual environment can be made consistent with the direction of gravity of the target. This further enhances the realism and perceptibility of changes in the gravity field and helps improve the user's efficiency in recognizing the current direction of gravity.
[0192] In some implementations, during the adjustment of the virtual character's gravity direction, at least one object in the virtual environment, including a fluid object (within the field of view), is synchronously adjusted according to the target gravity direction.
[0193] Figure 13 This is a schematic diagram illustrating the adjustment of the flow direction of a fluid object under the action of different target gravity directions, provided by an exemplary embodiment of this application. Figure 13 As shown, fluid objects include, for example, fountain and waterfall effects.
[0194] 1. Adjusting the direction of the fountain effect like Figure 11 As shown in section A, the fluid object is a fountain effect. The fountain effect can be generated by the fountain base and displayed along a preset jet trajectory under the default gravity direction G↓.
[0195] For example, when the target gravity direction is G↓, the spray direction and subsequent flow trajectory of the fountain particles match the default gravity direction; when the target gravity direction is switched to G←, the emitter parameters corresponding to the fountain effect are updated so that the initial emission direction and subsequent force direction of the fluid particles are oriented to the left, so that the overall fountain effect presents a visual effect that is compatible with the G← state.
[0196] 2. Adjusting the direction of the waterfall effect like Figure 11 As shown in section B, the fluid object is a waterfall effect. The waterfall effect can be released from a waterfall source and flow into a pool.
[0197] For example, when the target gravity direction is G↓, the waterfall effect flows downward from the waterfall source to the pool; when the target gravity direction switches to G→, the gravity vector acting on the fluid object is updated, so that the flow direction of the waterfall effect is adjusted from vertically downward to the right, thereby forming a flow trajectory consistent with the target gravity direction.
[0198] Optionally, the flow direction of the fluid object smoothly transitions from a first direction corresponding to the current gravity direction to a second direction corresponding to the target gravity direction. This smooth transition can be achieved by gradually adjusting the launch direction parameter or gravity vector parameter within a preset transition time, thereby preventing abrupt changes in the fluid object's flow behavior.
[0199] In some implementations, the orientation of the fluid object can be synchronously adjusted by modifying at least one of the following parameters in the transmitter: initial launch direction, initial velocity, gravitational acceleration, lifetime, and diffusion angle. Alternatively, the flow trajectory of the fluid object under the target gravity direction can be obtained by updating the gravity vector in the particle system and recalculating the position parameters of the fluid particles at each moment based on the updated gravity vector.
[0200] The above-mentioned solution provided in this application embodiment can synchronize the flow direction of fluid objects such as fountain effects and waterfall effects, so that the fluid dynamics in the virtual environment can be kept consistent with the target gravity direction, further improving the overall coordination and realism of gravity switching scenes, and helping to provide users with more intuitive directional prompts.
[0201] As one possible implementation, the target object in the virtual environment includes a directional indicator, which indicates the target gravity direction recommended by the current virtual task, as well as the corresponding gravity direction indicated by different display effects of the gravity adjustment mechanism.
[0202] In addition, target objects in the virtual environment also include interactive objects, which are used to provide task prompts to the user. Examples of interactive objects include a minimap and a task notification bar.
[0203] During the adjustment of the virtual character's gravity direction, the anchor point coordinate parameters of the interface interaction objects can be adjusted based on the target gravity direction. These anchor point coordinate parameters are used to locate the display position of the interface interaction objects. Furthermore, based on the adjusted anchor point coordinate parameters, the interface interaction objects are presented, ensuring that their display position remains within the preset orientation of the virtual character.
[0204] By binding the anchor point coordinates of the interface interaction objects to the gravity direction in which the virtual character is active, the interface interaction objects are ensured to be displayed based on the virtual character's preset position. For example, after the virtual character's gravity direction is adjusted, when the virtual character needs to walk along a vertical wall, the minimap needs to rotate synchronously to ensure that the virtual character's orientation always points upwards on the map.
[0205] Similarly, the anchor point coordinates of the directional indicator can be adjusted based on the target gravity direction. And, based on the adjusted anchor point coordinates, the directional indicator is displayed in a preset position on the interface.
[0206] As one possible implementation, target objects in the virtual environment also include interactive mechanism objects, which are used to guide users to complete specified operations or trigger task nodes. Interactive mechanism objects include, for example, switches and treasure chests.
[0207] During the adjustment of the virtual character's gravity direction, the interaction trigger range of interactive mechanisms can be adjusted based on the target gravity direction. This trigger range defines the spatial area where the interactive mechanism can be activated. Furthermore, the interactive mechanism is presented based on the adjusted trigger range.
[0208] For example, taking gravity direction reversal as an example, when the target gravity direction of the virtual character is upward, the virtual environment will appear inverted. The switch that was originally located at the virtual character's "feet" needs to be adjusted to be activated at the virtual character's "head" to avoid the interaction failing due to the change in gravity direction.
[0209] As one possible implementation, target objects in the virtual environment also include scene decoration objects, which are used to assist in presenting the virtual scene.
[0210] During the adjustment of the virtual character's gravity direction, the visual representation parameters of scene decoration objects can be adjusted based on the target gravity direction. These parameters include material parameters and light source direction parameters. Furthermore, based on the adjusted visual representation parameters, the scene decoration objects are presented, ensuring that their lighting and shadow effects match the target gravity direction.
[0211] Material parameters for scene decoration objects include normal map intensity, specular reflection direction, and texture UV offset. When the direction of gravity changes, the material parameters of the scene decoration objects are adjusted so that the reflection effect of the scene decoration objects matches the new lighting environment.
[0212] Adjusting the light source direction parameters mainly involves controlling the rotation of directional lights in the scene. After determining the target gravity direction, the direction of the main light source can be set to be opposite to the gravity direction to simulate natural lighting effects. At the same time, the shadow projection direction of the light source also needs to be adjusted to ensure that the shadows of objects in the scene uniformly point to the new "ground".
[0213] It can effectively improve the intuitiveness of interactive operation and help reduce the spatial cognition and operational load of users in non-standard gravity environments.
[0214] Application Scenario Examples The following uses a game application scenario as an example to describe in detail the technical solution provided in the embodiments of this application.
[0215] Scene 1: Gravity switching in a puzzle level In a 3D puzzle game, the user controls a virtual robot character to explore a sci-fi space station. Different areas of the space station have different directions of gravity, and the user needs to use gravity adjustment mechanisms to move between areas.
[0216] In one example level, the user controls a robot that arrives at a crossroads, with four directions leading to different areas. The current area is under downward gravity (normal gravity). The user discovers a passage in the ceiling directly above, but cannot jump directly up to it.
[0217] The user notices a floating spherical mechanism in the center of the intersection—a gravity adjustment mechanism. The user maneuvers the robot closer to the mechanism, triggering the interaction. The mechanism switches from its self-rotating state to its active state, emitting a blue glow, and simultaneously displays a direction selection interface. The interface shows four directional buttons: up (blue), down (gray, unselectable), left (green), and right (yellow).
[0218] The user clicks the "up" button. The system begins the gravity switching process: First, the robot levitates off the ground; then, the gravity adjustment mechanism, the robot, and the camera rotate 180 degrees simultaneously; at the same time, the hanging flags in the scene also rotate, changing their downward direction from downward to upward; the colors of the mechanisms and the indicator signs in the scene gradually change from the default color to blue; after a 1.0 second transition animation, the gravity switch is complete, and the robot "falls" upward under the new gravity, eventually landing on the ceiling (at this point, the ceiling becomes the "ground" for the robot).
[0219] The user successfully enters the upper passage and continues exploring. At the end of the passage, the user discovers another gravity adjustment mechanism. This time, the user needs to switch the gravity direction to the left to enter the left-side area. The user repeats the above process, and the system again performs synchronized rotation of multiple objects and color transitions. Finally, the user successfully reaches the target area and completes the level.
[0220] Scene 2: Dynamic Gravity During a Chase In an action game, the player is engaged in a boss battle. The boss is a gravity manipulator who can change the direction of gravity on the battlefield. The player must fight and dodge in the constantly changing gravity environment.
[0221] At the start of the battle, gravity is in the normal downward direction. The boss uses a skill to randomly switch the direction of gravity to the left. The system immediately performs the following actions: 1. The user's virtual character and the Boss simultaneously float and rotate 90 degrees; 2. Objects such as rubble and boxes on the battlefield also rotate synchronously and "fall" to the left; 3. The fountain effect in the scene changes its spray direction, from spraying upwards to spraying to the left; 4. The camera rolls 90 degrees, rotating the image; 5. The battlefield ambient light color gradually changes from normal hue to green (the color corresponding to the left direction).
[0222] Users need to adapt to the new direction of gravity and move and fight on the "left wall". At this time, jumping will cause the virtual character to move to the right (relative to the user's viewpoint), which increases the difficulty of operation.
[0223] Ten seconds later, the Boss changed the direction of gravity to the right again. The system executed a similar synchronized rotation process, but this time all objects rotated to the right. The battlefield lighting turned yellow.
[0224] Users can quickly determine the current direction of gravity by observing color indicators: blue = up, green = left, yellow = right, and normal color = down. This visual cue helps users maintain their sense of direction during fast-paced combat.
[0225] Scene 3: Exploration and Collection Mission In an open-world game, the player accepts a collection mission: to collect energy crystals scattered throughout the game world. These crystals are distributed across different gravity zones, and the player must skillfully utilize gravity switching abilities to collect them all.
[0226] The user first arrives at the ground area (where gravity is downward) and collects the first crystal. Then, by using the gravity adjustment mechanism, the user switches the gravity to the upward direction and enters the ceiling area (which is now the "ground" for the user) to collect the second crystal.
[0227] The user then discovers a crystal on the left wall (now the "left ground"), but the wall is too high to reach directly. The user realizes that they can switch the gravity to the left, making the left wall the "ground" that they can walk on.
[0228] The user locates a nearby gravity adjustment mechanism and triggers the interaction. The system detects that the user's current gravity direction (upward) is inconsistent with the mechanism's current direction (downward). Therefore, the mechanism first rotates 180 degrees to align with the user's current direction before displaying the direction selection interface. The user selects the left direction, and the system performs a synchronized rotation, allowing the user to successfully "fall" onto the left wall and collect the third crystal.
[0229] Through multiple gravity shifts, the user eventually collected all the crystals and completed the mission. In this process, the user experienced the unique exploration enjoyment brought by multi-directional gravity environments.
[0230] Figure 12 This is a structural block diagram of a gravity-adjustable human-computer interaction device provided in an exemplary embodiment of this application, as shown below. Figure 12 As shown, the device includes: Display module 1210 is used to display virtual characters and gravity adjustment mechanisms located in the virtual environment; The processing module 1220 is configured to adjust the current gravity direction of the virtual character to the target gravity direction in response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism. The processing module 1220 is used to control one or more of the following during the gravity direction adjustment of the virtual character: the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object located in the virtual environment to perform synchronous feedback display. The display module 1210 is used to display a color indicator corresponding to the target gravity direction based on the target gravity direction, and the color indicator is used to indicate the current gravity direction of the virtual character.
[0231] In some embodiments, the processing module 1220 is configured to: control the vertical direction of the gravity adjustment mechanism to rotate synchronously to be parallel to or match the target gravity direction during the gravity direction adjustment of the virtual character; control the virtual character to enter or be in a suspended state during the gravity direction adjustment of the virtual character, and control the vertical direction of the virtual character to rotate synchronously to be parallel to or match the target gravity direction during the gravity direction adjustment of the virtual character; control the view camera corresponding to the virtual character to rotate synchronously to be parallel to or match the target gravity direction during the gravity direction adjustment of the virtual character; and control the orientation or movement direction of at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction during the gravity direction adjustment of the virtual character.
[0232] In some embodiments, the processing module 1220 is configured to determine a target rotation angle between the current mechanism direction of the gravity adjustment mechanism and the target gravity direction; control the gravity adjustment mechanism to rotate around a preset rotation axis so that the vertical direction of the gravity adjustment mechanism gradually changes to be parallel to or match the target gravity direction; and update the display state of the gravity adjustment mechanism during the rotation of the gravity adjustment mechanism to characterize the change process of the current mechanism direction towards the target gravity direction.
[0233] In some embodiments, the processing module 1220 is configured to control the virtual character to detach from the current support surface and enter a floating state; while the virtual character is in a floating state, the module controls the virtual character's posture to rotate and adjust according to the target gravity direction, so that the vertical direction of the virtual character gradually changes to be parallel to or match the target gravity direction; after the gravity direction of the virtual character is adjusted, the module controls the virtual character to fall towards the target support surface along the force direction corresponding to the target gravity direction.
[0234] In some embodiments, the processing module 1220 is configured to, in response to a trigger operation targeting the target gravity direction, control the view camera to move to a target view position for focusing the gravity adjustment mechanism and the virtual character; during the adjustment of the virtual character's gravity direction, control the camera attitude parameters of the view camera to be synchronously rotated and adjusted according to the target gravity direction; wherein, the camera attitude parameters include at least one of the following: pitch angle parameter, yaw angle parameter, and roll angle parameter.
[0235] In some embodiments, the processing module 1220 is configured to determine a target object associated with the target gravity direction; during the gravity direction adjustment process of the virtual character, control the orientation parameter, posture parameter, or motion parameter of the target object to be synchronously adjusted according to the target gravity direction; wherein, the target object includes at least one of the following: directional indicator, fluid effect object, scene decoration object, interactive mechanism object.
[0236] In some embodiments, the processing module 1220 is configured to, when the at least one object includes a flexible object, control the orientation of the flexible object to be adjusted according to the target gravity direction, so that the downward direction of the flexible object is parallel to or matches the target gravity direction.
[0237] In some embodiments, the processing module 1220 is configured to, when the at least one object includes a fluid object, control the flow direction or jet direction of the fluid object to be adjusted according to the target gravity direction, so that the flow direction or jet direction of the fluid object is parallel to or matches the target gravity direction.
[0238] The flexible object includes at least one of vegetation objects, fabric objects, or hanging decoration objects. The fluid object includes at least one of fountain fluid objects, waterfall fluid objects, or particle fluid effect objects.
[0239] In some embodiments, the display module 1210 is used to control at least one of the following: the mechanism display color, the direction prompt mark color, or the scene area color corresponding to the target gravity direction.
[0240] In some embodiments, the display module 1210 is configured to display the color marker in a smooth transition manner during the process of changing from the current gravity direction to the target gravity direction.
[0241] In some embodiments, the processing module 1220 is configured to, when the virtual character enters the area where the gravity adjustment mechanism is located and the current gravity direction of the virtual character is inconsistent with the current direction of the gravity adjustment mechanism, control the gravity adjustment mechanism to first adjust to a state consistent with the current gravity direction of the virtual character, and then display the interaction entry.
[0242] In some embodiments, the display module 1210 is configured to display a direction selection interface in response to the triggering operation of selecting a target gravity direction through the gravity adjustment mechanism. The direction selection interface includes multiple direction controls, wherein the direction control corresponding to the current gravity direction of the virtual character is in an unselectable state.
[0243] In some embodiments, the display module 1210 is used to display a target direction prompt icon in the direction selection interface, the target direction prompt icon being used to indicate the recommended gravity direction corresponding to the task flow.
[0244] In some embodiments, the processing module 1220 is configured to, in response to receiving an exit operation for the direction selection interface, exit the direction selection interface when the virtual character has been adjusted to the target gravity direction, and control the virtual character to land along the target gravity direction.
[0245] In some embodiments, the gravity adjustment mechanism supports the selection of at least two of four preset gravity directions, the four preset gravity directions including the up direction, down direction, left direction, and right direction.
[0246] In some embodiments, the display module 1210 is configured to control the gravity adjustment mechanism to display in a self-rotating state or a static state when the gravity adjustment mechanism is in a normal state; and to control the gravity adjustment mechanism to switch from the normal state to an active state and stop the self-rotating state in response to the interaction between the virtual character and the gravity adjustment mechanism.
[0247] In some embodiments, the flexible object includes at least one of vegetation objects, fabric objects, rope objects, and hanging decoration objects.
[0248] In some embodiments, the processing module 1220 is configured to acquire at least one attitude control point of the flexible object; determine a target offset direction acting on the at least one attitude control point based on the target gravity direction; and adjust the position of the at least one attitude control point according to the target offset direction to update the attitude of the flexible object.
[0249] In some embodiments, the at least one attitude control point includes a root control point and an end control point of the flexible object, wherein the position of the root control point remains unchanged, and the end control point is offset along the force direction corresponding to the target gravity direction.
[0250] In some embodiments, the processing module 1220 is configured to update the gravity action vector of the flexible object based on the target gravity direction; and perform attitude simulation calculation on the flexible object according to the updated gravity action vector to obtain the adjusted attitude result.
[0251] In some embodiments, the posture simulation calculation includes at least one of the following: skeletal chain oscillation calculation, mass spring calculation, and cloth simulation calculation.
[0252] In some embodiments, the processing module 1220 is used to control the attitude of the flexible object to smoothly transition from a first attitude corresponding to the current gravity direction to a second attitude corresponding to the target gravity direction.
[0253] In some embodiments, the processing module 1220 is used to gradually adjust the posture parameters of the flexible object according to an interpolation method within a preset transition time.
[0254] In some embodiments, the posture adjustment of the flexible object is performed synchronously with the gravity direction adjustment process of the virtual character.
[0255] In some embodiments, the fluid object includes at least one of a fountain fluid object, a waterfall fluid object, a particle fluid effect object, and a droplet fluid object.
[0256] In some embodiments, the processing module 1220 is configured to obtain the transmitter parameters corresponding to the fluid object; adjust the initial launch direction parameter in the transmitter parameters based on the target gravity direction; and generate the fluid object according to the adjusted initial launch direction parameter.
[0257] In some embodiments, the transmitter parameters further include at least one of the following: initial velocity parameter, gravitational acceleration parameter, lifetime parameter, and diffusion angle parameter.
[0258] In some embodiments, the processing module 1220 is configured to update the gravity action vector acting on the fluid object based on the target gravity direction; and calculate the motion trajectory of the fluid object based on the updated gravity action vector.
[0259] In some embodiments, the processing module 1220 is configured to determine the position parameters of the fluid object at each moment based on the initial velocity of the fluid object and the updated gravity vector.
[0260] In some embodiments, the processing module 1220 is used to control the flow direction or jet direction of the fluid object to smoothly transition from a first direction corresponding to the current gravity direction to a second direction corresponding to the target gravity direction.
[0261] In some embodiments, the smooth transition includes: gradually adjusting the emission direction parameter or gravity vector parameter of the fluid object within a preset transition time.
[0262] In some embodiments, the adjustment of the flow direction or jet direction of the fluid object is performed synchronously with the adjustment of the gravity direction of the virtual character.
[0263] In summary, the gravity-adjustment-based human-computer interaction method provided in this application, on the one hand, adjusts the current gravity direction of the virtual character to the target gravity direction in response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism, thus realizing the adjustability of the character's gravity direction and providing users with a more diverse interactive experience. On the other hand, during the adjustment of the virtual character's gravity direction, controlling one or more of the following—the gravity adjustment mechanism, the virtual character, the camera corresponding to the virtual character's viewpoint, and at least one object located in the virtual environment—to provide synchronous feedback display, thereby enhancing the perceptibility of the direction switching process and significantly improving the immersion and physical realism of the human-computer interaction. Furthermore, displaying a color indicator corresponding to the target gravity direction effectively improves the intuitiveness of the interactive operation, reduces the difficulty of direction recognition, and effectively reduces trial-and-error operations caused by misjudgment of state.
[0264] It should be noted that the gravity-adjustable human-computer interaction device provided in the above embodiments is only an example of the division of the above functional modules. In practical 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 gravity-adjustable human-computer interaction device and the gravity-adjustable human-computer interaction 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.
[0265] Figure 13 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. The computer device 1300 can be an electronic device such as a mobile phone, tablet computer, in-vehicle terminal, wearable device, PC (Personal Computer), VR (Virtual Reality) device, AR (Augmented Reality) device, or MR (Mixed Reality) device. The computer device 1300 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0266] Typically, computer device 1300 includes a processor 1301 and a memory 1302.
[0267] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 1301 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1301 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1301 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0268] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 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 1302 is used to store at least one instruction, which is executed by the processor 1301 to implement the gravity-adjustment-based human-computer interaction method provided in the method embodiments of this application.
[0269] In some embodiments, the computer device 1300 also includes other components 1303, the type and number of which can be selected based on the functional needs of the computer device 1300. Those skilled in the art will understand that... Figure 13 The structure shown does not constitute a limitation on the computer device 1300, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0270] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0271] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the gravity-based human-computer interaction method as described in any of the above embodiments of this application.
[0272] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the gravity-based human-computer interaction method as described in any of the above embodiments of this application.
[0273] This application also 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 computer device to perform any of the gravity-based human-computer interaction methods described in the above embodiments.
[0274] It should be noted that the data collection and processing in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0275] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0276] The above description is merely an exemplary 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 human-computer interaction method based on gravity regulation, characterized in that, The method includes: Displays virtual characters and gravity adjustment mechanisms within a virtual environment; In response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism, the current gravity direction of the virtual character is adjusted to the target gravity direction; During the adjustment of the virtual character's gravity direction, one or more of the following are controlled to provide synchronous feedback display: the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object located in the virtual environment. Based on the target gravity direction, a color indicator corresponding to the target gravity direction is displayed, and the color indicator is used to indicate the current gravity direction of the virtual character.
2. The method according to claim 1, characterized in that, During the process of adjusting the gravity direction of the virtual character, controlling one or more of the following—the gravity adjustment mechanism, the virtual character, the camera corresponding to the virtual character, and at least one object located in the virtual environment—to provide synchronous feedback display includes at least one of the following steps: During the adjustment of the virtual character's gravity direction, the vertical direction of the gravity adjustment mechanism is controlled to rotate synchronously until it is parallel to or matches the target gravity direction; During the adjustment of the virtual character's gravity direction, the virtual character is controlled to enter or be in a floating state, and the vertical direction of the virtual character is controlled to rotate synchronously to be parallel to or match the target gravity direction; During the adjustment of the virtual character's gravity direction, the camera corresponding to the virtual character's viewpoint is controlled to rotate synchronously to be parallel to or match the target gravity direction; During the adjustment of the virtual character's gravity direction, the orientation or movement direction of at least one object located in the virtual environment is controlled to rotate synchronously to be parallel to or match the target gravity direction.
3. The method according to claim 2, characterized in that, During the adjustment of the virtual character's gravity direction, controlling the vertical direction of the gravity adjustment mechanism to rotate synchronously to be parallel to or match the target gravity direction includes: Determine the target rotation angle between the current mechanism direction of the gravity adjustment mechanism and the target gravity direction; The gravity adjustment mechanism is controlled to rotate around a preset rotation axis so that the vertical direction of the gravity adjustment mechanism gradually changes to be parallel to or match the target gravity direction; During the rotation of the gravity adjustment mechanism, the display state of the gravity adjustment mechanism is updated to represent the change process of the current mechanism direction toward the target gravity direction.
4. The method according to claim 2, characterized in that, During the adjustment of the virtual character's gravity direction, controlling the virtual character to enter or be in a suspended state, and controlling the virtual character's vertical direction to rotate synchronously to be parallel to or match the target gravity direction, includes: Control the virtual character to detach from the current support surface and enter a floating state; When the virtual character is in a floating state, the character's posture is controlled to rotate and adjust according to the target gravity direction, so that the vertical direction of the virtual character gradually changes to be parallel to or match the target gravity direction; After the virtual character's gravity direction is adjusted, the virtual character is controlled to fall towards the target support surface along the force direction corresponding to the target gravity direction.
5. The method according to claim 2, characterized in that, During the adjustment of the virtual character's gravity direction, controlling the corresponding viewpoint camera of the virtual character to rotate synchronously to be parallel to or match the target gravity direction includes: In response to a trigger operation targeting the direction of gravity, the view camera is controlled to move to a target view position for focusing the gravity adjustment mechanism and the virtual character; During the adjustment of the virtual character's gravity direction, the camera attitude parameters of the camera controlling the viewpoint are synchronously rotated and adjusted according to the target gravity direction; The camera attitude parameters include at least one of the following: pitch angle parameter, yaw angle parameter, and roll angle parameter.
6. The method according to claim 2, characterized in that, During the adjustment of the virtual character's gravity direction, controlling at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction includes: Identify the target object associated with the target's gravity direction; During the adjustment of the virtual character's gravity direction, the orientation parameters, posture parameters, or motion parameters of the target object are adjusted synchronously according to the target's gravity direction. The target object includes at least one of the following: directional indicator, fluid effect object, scene decoration object, and interactive mechanism object.
7. The method according to claim 2, characterized in that, Controlling the orientation or movement direction of at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction includes: In the case where the at least one object includes a flexible object, the orientation of the flexible object is adjusted according to the target gravity direction so that the downward direction of the flexible object is parallel to or matches the target gravity direction.
8. The method according to claim 2, characterized in that, Controlling the orientation or movement direction of at least one object located in the virtual environment to rotate synchronously to be parallel to or match the target gravity direction includes: In the case where the at least one object includes a fluid object, the flow direction or jet direction of the fluid object is adjusted according to the target gravity direction so that the flow direction or jet direction of the fluid object is parallel to or matches the target gravity direction.
9. The method according to any one of claims 1 to 8, characterized in that, The step of displaying a color indicator corresponding to the target gravity direction based on the target gravity direction includes: Control at least one of the following: the color of the mechanism display, the color of the direction indicator, or the color of the scene area corresponding to the direction of gravity of the target.
10. The method according to claim 9, characterized in that, The color indicator is displayed in a smooth transition as the current gravity direction changes to the target gravity direction.
11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: When the virtual character enters the area where the gravity adjustment mechanism is located and the current gravity direction of the virtual character is inconsistent with the current direction of the gravity adjustment mechanism, the gravity adjustment mechanism is controlled to first adjust to a state consistent with the current gravity direction of the virtual character, and then the interaction entry is displayed.
12. The method according to any one of claims 1 to 11, characterized in that, The method further includes: In response to the triggering operation of selecting the target gravity direction through the gravity adjustment mechanism, a direction selection interface is displayed. The direction selection interface includes multiple direction controls, wherein the direction control corresponding to the current gravity direction of the virtual character is in an unselectable state.
13. The method according to claim 12, characterized in that, The direction selection interface also displays a target direction prompt icon, which is used to indicate the recommended gravity direction corresponding to the task flow.
14. The method according to claim 12 or 13, characterized in that, The method further includes: In response to receiving an exit operation for the direction selection interface, if the virtual character has been adjusted to the target gravity direction, exit the direction selection interface and control the virtual character to land along the target gravity direction.
15. The method according to any one of claims 1 to 14, characterized in that, The gravity adjustment mechanism supports the selection of at least two of four preset gravity directions, including the up direction, down direction, left direction, and right direction.
16. The method according to claim 15, characterized in that, The display of virtual characters and gravity adjustment mechanisms located in the virtual environment includes: When the gravity adjustment mechanism is in its normal state, the gravity adjustment mechanism is controlled to either be in a self-rotating state or remain stationary. In response to the interaction between the virtual character and the gravity adjustment mechanism, the gravity adjustment mechanism is controlled to switch from the normal state to the active state and the self-rotation state is stopped.
17. The method according to claim 7, characterized in that, The flexible object includes at least one of vegetation objects, fabric objects, rope objects, and hanging decoration objects.
18. The method according to claim 7, characterized in that, The step of controlling the attitude orientation of the flexible object to be adjusted according to the target gravity direction includes: acquiring at least one attitude control point of the flexible object; determining a target offset direction acting on the at least one attitude control point based on the target gravity direction; and adjusting the position of the at least one attitude control point according to the target offset direction to update the attitude of the flexible object.
19. The method according to claim 18, characterized in that, The at least one attitude control point includes a root control point and an end control point of the flexible object, wherein the position of the root control point remains unchanged, and the end control point is offset along the force direction corresponding to the target gravity direction.
20. The method according to claim 7, characterized in that, The step of controlling the attitude orientation of the flexible object to be adjusted according to the target gravity direction includes: updating the gravity action vector of the flexible object based on the target gravity direction; and performing attitude simulation calculation on the flexible object according to the updated gravity action vector to obtain the adjusted attitude result.
21. The method according to claim 20, characterized in that, The posture simulation calculation includes at least one of the following: skeletal chain swing calculation, mass spring calculation, and cloth simulation calculation.
22. The method according to claim 7, characterized in that, The orientation of the flexible object smoothly transitions from a first orientation corresponding to the current gravity direction to a second orientation corresponding to the target gravity direction.
23. The method according to claim 22, characterized in that, The smooth transition from the first posture to the second posture includes: within a preset transition time, gradually adjusting the posture parameters of the flexible object according to an interpolation method.
24. The method according to claim 7, characterized in that, The posture adjustment of the flexible object is performed synchronously with the gravity direction adjustment process of the virtual character.
25. The method according to claim 8, characterized in that, The fluid objects include at least one of the following: fountain fluid objects, waterfall fluid objects, particle fluid effect objects, and droplet fluid objects.
26. The method according to claim 8, characterized in that, The step of controlling the flow direction or jet direction of the fluid object to be adjusted according to the target gravity direction includes: obtaining the transmitter parameters corresponding to the fluid object; adjusting the initial emission direction parameter in the transmitter parameters based on the target gravity direction; and generating the fluid object according to the adjusted initial emission direction parameter.
27. The method according to claim 26, characterized in that, The transmitter parameters also include at least one of the following: initial velocity parameter, gravitational acceleration parameter, lifetime parameter, and diffusion angle parameter.
28. The method according to claim 8, characterized in that, The step of adjusting the flow direction or jet direction of the fluid object according to the target gravity direction includes: updating the gravity action vector acting on the fluid object based on the target gravity direction; and calculating the motion trajectory of the fluid object based on the updated gravity action vector.
29. The method according to claim 28, characterized in that, The calculation of the motion trajectory of the fluid object includes: determining the position parameters of the fluid object at each moment based on the initial velocity of the fluid object and the updated gravity vector.
30. The method according to claim 8, characterized in that, The flow direction or jetting direction of the fluid object smoothly transitions from the first direction corresponding to the current gravity direction to the second direction corresponding to the target gravity direction.
31. The method according to claim 30, characterized in that, The smooth transition includes: gradually adjusting the emission direction parameter or gravity vector parameter of the fluid object within a preset transition time.
32. The method according to claim 8, characterized in that, The adjustment of the flow direction or jet direction of the fluid object is performed synchronously with the adjustment of the gravity direction of the virtual character.
33. A human-computer interaction device based on gravity adjustment, characterized in that, The device includes: The display module is used to display virtual characters and gravity adjustment mechanisms located in the virtual environment; The processing module is configured to adjust the current gravity direction of the virtual character to the target gravity direction in response to a trigger operation that selects a target gravity direction through the gravity adjustment mechanism. The processing module is used to control one or more of the following during the process of adjusting the gravity direction of the virtual character: the gravity adjustment mechanism, the virtual character, the view camera corresponding to the virtual character, and at least one object located in the virtual environment to provide synchronous feedback display. The display module is used to display a color indicator corresponding to the target gravity direction, based on the target gravity direction, and the color indicator is used to indicate the current gravity direction of the virtual character.
34. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the gravity-based human-computer interaction method as described in any one of claims 1 to 32.
35. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the gravity-based human-computer interaction method as described in any one of claims 1 to 32.
36. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the gravity-based human-computer interaction method as described in any one of claims 1 to 32.