Control method, device and electronic equipment for virtual object
Patent Information
- Application Number
- CN202310852242.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-07-11
AI Technical Summary
然而,该方式较为常见,难以给予玩家多种多样的游戏体验
[0009] The aforementioned method, apparatus, and electronic device for controlling virtual objects provide a graphical user interface (GUI) via a terminal device. The GUI displays a game scene including multiple preset specific scene spaces. Each specific scene space contains a scene-carrying component and corresponding specific gravity configuration parameters. In response to a first movement control operation on the controlled virtual object, the controlled virtual object is controlled to move within the game scene. In response to the controlled virtual object entering a specific scene space, a first gravitational field is generated based on the specific gravity configuration parameters corresponding to that scene space. Based on the first gravitational field and the current motion parameters of the controlled virtual object, the controlled virtual object's movement on the surface of the scene-carrying component within the specific scene space is controlled. In response to the controlled virtual object triggering a preset game event, a settlement is performed based on the controlled virtual object's game behavior. This method allows players to experience controlling the movement of virtual objects within various gravitational fields, enriching their gaming experience.
Smart Images

Figure CN116920382B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of game technology, and more specifically, to a method, apparatus, and electronic device for controlling virtual objects. Background Technology
[0002] In parkour games or parkour-style levels within games, players typically need to perform actions to control a virtual character to quickly traverse a set game environment and ultimately reach a designated location. The game environment usually features a gravity field similar to the real world, and the virtual character's movement within this environment follows the principles of gravity. However, this approach is quite common and fails to provide players with a diverse range of gaming experiences. Summary of the Invention
[0003] In view of this, the present disclosure provides a method, device and electronic device for controlling virtual objects, so that players can experience controlling the movement of virtual objects in different gravitational fields, thereby enriching the player's gaming experience.
[0004] In a first aspect, embodiments of this disclosure provide a method for controlling a virtual object. The method includes: providing a graphical user interface (GUI) via a terminal device; the GUI displays a game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; a scene-carrying component is provided in each specific scene space; each specific scene space has corresponding specific gravity configuration parameters; in response to a first movement control operation on the controlled virtual object, controlling the controlled virtual object to move within the game scene; in response to the controlled virtual object entering a specific scene space, generating a first gravity field based on the specific gravity configuration parameters corresponding to the specific scene space; the first gravity field is located within the specific scene space; based on the first gravity field and the current motion parameters of the controlled virtual object, controlling the controlled virtual object to move on the surface of the scene-carrying component in the specific scene space; and in response to the controlled virtual object triggering a preset game event, controlling the settlement based on the game behavior of the controlled virtual object.
[0005] Secondly, embodiments of this disclosure provide a control device for a virtual object, comprising: a scene display module for providing a graphical user interface via a terminal device; the graphical user interface displays a game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; a scene-carrying component is provided in each specific scene space; the specific scene space has corresponding specific gravity configuration parameters; a first movement control module for controlling the controlled virtual object to move in the game scene in response to a first movement control operation for the controlled virtual object; a gravity field generation module for generating a first gravity field based on the specific gravity configuration parameters corresponding to the specific scene space in response to the controlled virtual object entering the specific scene space; the first gravity field is located in the specific scene space; a second movement control module for controlling the controlled virtual object to move on the surface of the scene-carrying component in the specific scene space based on the first gravity field and the current motion parameters of the controlled virtual object; and a settlement module for controlling the settlement based on the game behavior of the controlled virtual object in response to the controlled virtual object triggering a preset game event.
[0006] Thirdly, embodiments of this disclosure provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described virtual object control method.
[0007] Fourthly, embodiments of this disclosure provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned virtual object control method.
[0008] The embodiments disclosed herein bring the following beneficial effects:
[0009] The aforementioned method, apparatus, and electronic device for controlling virtual objects provide a graphical user interface (GUI) via a terminal device. The GUI displays a game scene including multiple preset specific scene spaces. Each specific scene space contains a scene-carrying component and corresponding specific gravity configuration parameters. In response to a first movement control operation on the controlled virtual object, the controlled virtual object is controlled to move within the game scene. In response to the controlled virtual object entering a specific scene space, a first gravitational field is generated based on the specific gravity configuration parameters corresponding to that scene space. Based on the first gravitational field and the current motion parameters of the controlled virtual object, the controlled virtual object's movement on the surface of the scene-carrying component within the specific scene space is controlled. In response to the controlled virtual object triggering a preset game event, a settlement is performed based on the controlled virtual object's game behavior. This method allows players to experience controlling the movement of virtual objects within various gravitational fields, enriching their gaming experience.
[0010] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a method for controlling a virtual object provided in this embodiment of the disclosure;
[0014] Figure 2 A schematic diagram illustrating a controlled virtual object located in a specific scene control, as provided in an embodiment of this disclosure;
[0015] Figure 3 A schematic diagram illustrating another controlled virtual object located in a specific scene control, as provided in an embodiment of this disclosure;
[0016] Figure 4 A schematic diagram illustrating another controlled virtual object located in a specific scene control, as provided in an embodiment of this disclosure;
[0017] Figure 5 A schematic diagram illustrating an overlapping control area formed by two specific scene controls, provided in an embodiment of this disclosure;
[0018] Figure 6 This is a schematic diagram of the structure of a control device for a virtual object provided in an embodiment of the present disclosure;
[0019] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0021] In parkour games or parkour-style levels within games, players typically need to perform actions to control a virtual character (also known as a "virtual object") to quickly traverse a set game environment and ultimately reach a designated location. The game environment usually features a gravity field similar to the real world, and the virtual character's movement within this environment follows the principles of gravity. When the virtual object is positioned on a support surface formed by the surface of a support component within the game environment, it moves along that surface. When the player controls the virtual object to jump, it leaves the surface of the support component and leaps upwards. However, this method is quite common and fails to provide players with a diverse range of gameplay experiences.
[0022] Based on this, the present disclosure provides a method, apparatus, and electronic device for controlling virtual objects, which can be applied to various virtual scenarios that require parkour-like games.
[0023] In one embodiment of this disclosure, the virtual object control method can run on a local terminal device or a server. When the virtual object control method runs on a server, it can be implemented and executed based on a cloud interaction system, which includes a server and client devices.
[0024] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program's execution and the game screen presentation are separated. The storage and execution of virtual object control methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0025] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0026] See Figure 1 First, a method for controlling a virtual object provided by an embodiment of this disclosure will be introduced. This method further includes the following steps:
[0027] Step S102: A graphical user interface is provided through the terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; scene carrying components are set in the specific scene spaces; the specific scene spaces have corresponding specific gravity configuration parameters.
[0028] As mentioned above, the terminal devices can be mobile terminals, televisions, computers, PDAs, etc. The controlled virtual objects are typically controlled by players through these terminal devices. The game scene can be generated by the game system based on a 3D scene model. This 3D game scene model can be created by developers or by players using game accounts with editing permissions. Specific settings can be configured according to requirements and are not limited here.
[0029] The aforementioned specific scene spaces typically have preset closed spatial boundaries. Specific gravity configuration parameters corresponding to a specific scene space are effective only for the spatial region enclosed by that boundary. To provide players with a gaming experience of controlling virtual objects in different gravity spaces, different gravity configuration parameters can be set for different specific scene spaces. Common gravitational fields include parallel gravitational fields, spherical gravitational fields, cylindrical gravitational fields, and disk gravitational fields, as well as other irregularly shaped gravitational fields formed by shearing, splicing, deforming, or superimposing these gravitational fields, such as hemispherical gravitational fields and "donut-shaped" gravitational fields. Among them, the gravitational direction of a "donut-shaped" gravitational field points towards the inner central axis of the "donut," and this gravitational field can be seen as a gravitational field formed by bending a cylindrical gravitational field.
[0030] To create a specific type of gravitational field within a given scene space, the aforementioned specific gravitational configuration parameters need to include various gravitational information corresponding to the target gravitational field, such as the gravitational direction, magnitude, and trend of gravitational variation at the gravitational center in the specific scene space. These specific gravitational configuration parameters typically differ for different types of gravitational fields. Based on these specific gravitational configuration parameters corresponding to a specific scene space, it is necessary to determine the gravitational force corresponding to each spatial location within that scene space. This allows for the control of the virtual object's movement based on this gravitational force when the controlled virtual object is located at a certain spatial location.
[0031] To provide support for virtual characters within a specific scene space and to constrain their movement trajectory, scene support components are typically installed within that space. These components can take various shapes, such as flat, circular, cylindrical, or cubic. Their surfaces can be smooth or rough; they can be hard or have a degree of flexibility. Specific designs can be tailored to requirements and are not limited here.
[0032] The aforementioned scene-carrying components can be partially or entirely placed within a specific scene space. Different parts of the same scene-carrying component can reside in different specific scene spaces; these specific scene spaces may or may not overlap. The scene-carrying component can also be partially or entirely located in a spatial region formed by the overlap of different specific scene spaces. The position of the scene-carrying component in the game scene can be fixed or can move within the scene according to a set pattern. The position of the scene-carrying component in the game scene is generally not affected by the controlled virtual objects, and it can also interact with the controlled virtual objects according to preset patterns. Specific settings can be configured according to requirements and are not limited here.
[0033] Step S104: In response to a first movement control operation on the controlled virtual object, control the controlled virtual object to move within the game scene.
[0034] At the start of a game, the controlled virtual object typically resides in a different scene space than the designated scene space. Within these scene spaces, the gravitational force acting on the controlled virtual object simulates the gravitational force experienced by objects in the real world—that is, it experiences gravity. Under the player's movement controls, the controlled virtual object can walk, run, jump upwards along the surfaces of scene support components, or fall from higher scene support components to lower ones. The specific movement methods of the controlled virtual object can be configured based on requirements and are not restricted here.
[0035] Since controlled virtual objects are usually modeled after living beings, in order to simulate the movement posture of living beings in real scenes, the set parts of the controlled virtual object are usually bound to the direction of gravity in the scene space. For example, when the controlled virtual object has feet, it can be set that the direction of the feet of the controlled virtual object is consistent with the direction of gravity when the controlled virtual object is stationary and in basic motion state (such as walking, running, etc.), that is, the controlled virtual object can move upright in the game scene.
[0036] Step S106: In response to the controlled virtual object entering a specific scene space, a first gravitational field is generated based on the specific gravitational configuration parameters corresponding to the specific scene space; the first gravitational field is located in the specific scene space.
[0037] When a player controls a virtual object to move within the game scene, the system can instantly determine whether the virtual object's position falls within a specific scene space, thus determining whether the virtual object has entered that scene space. The game can also pre-define a collider that covers the spatial boundaries of a specific scene space. The collider is a crucial component for detecting and responding to collisions between objects; it can be used to simulate physical collisions, collision effects, collision detection, and physical behavior. Upon detecting a collision between a controlled virtual object and the collider corresponding to a specific scene space, the virtual object can be considered to have entered that scene space.
[0038] When a controlled virtual object enters a specific scene space, a first gravitational field corresponding to that scene space needs to be generated. A gravitational field is a theoretical model describing the attractive effect of an object extending into space on another object. After determining the first gravitational field corresponding to the specific scene space, the gravitational force experienced by the controlled virtual object can be determined when the controlled virtual object is at a certain position in that scene space.
[0039] The aforementioned specific gravity configuration parameters typically need to indicate the type of gravity corresponding to the first gravitational field, the location of the gravitational center (also known as the "gravity source"), the relationship between the distance between the location in the first gravitational field and the gravitational center and the gravity it generates, etc., in order to determine the gravity generated at each scene location in a specific scene space, thereby generating the first gravitational field.
[0040] When the type of gravity is a parallel gravitational field, its gravitational center can be considered to be at infinity. Specific gravitational configuration parameters also include the gravitational direction and magnitude, where the magnitude can be variable. In this case, the specific gravitational configuration parameters also need to include parameters indicating the variation of gravitational magnitude to indicate the gravitational change trend at different scene locations. Based on these specific gravitational configuration parameters, the gravity in a specific scene space can be determined, thereby establishing a parallel gravitational field.
[0041] When the gravitational field is spherical, specific gravitational configuration parameters typically include the location of the gravitational center, the direction of gravity, and the magnitude and variation parameters of gravity. The direction of gravity can be towards or away from the gravitational center. Based on these specific gravitational configuration parameters, the gravity in a specific scene space can be determined, thereby establishing a spherical gravitational field.
[0042] When the gravitational field is cylindrical, specific gravitational configuration parameters typically include the position of the gravitational axis, the direction of gravity, and the magnitude and variation parameters of gravity. The direction of gravity can be towards or away from the gravitational axis. Based on these specific gravitational configuration parameters, the gravity in a specific scene space can be determined, thereby establishing a cylindrical gravitational field. When the gravitational field is of another type, the specific gravitational configuration parameters typically include other parameters matching that gravitational type. The corresponding first gravitational field can be generated using the method described above.
[0043] Step S108: Based on the first gravitational field and the current motion parameters of the controlled virtual object, control the surface movement of the controlled virtual object in the scene-bearing component in a specific scene space.
[0044] When a scene-supporting component is placed in a specific scene space, the direction of gravity usually points towards the scene-supporting component. Under the influence of this gravity, the controlled virtual object can move on the scene-supporting component. The aforementioned current motion parameters typically include the direction of motion and the speed of motion. When a controlled virtual object enters a specific scene space from another specific scene space or a non-specific scene space, if there is a certain height difference between the scene-supporting components, the controlled virtual object can be controlled to move to the surface of the scene-supporting component based on its current direction of motion and speed, under the influence of gravity at its location.
[0045] like Figure 2 As shown, in a non-specific scene space, the controlled virtual object is subjected to a vertically downward gravitational force (i.e., gravity). In a specific scene space, the scene-supporting component is an inwardly concave curved surface, and the first gravitational field in the specific scene space is a spherical gravitational field. The center of the curved surface of the scene-supporting component coincides with the gravitational center of the first gravitational field. The gravitational direction of the first gravitational field is outward from the gravitational center. Therefore, the gravitational force experienced by the controlled virtual object on the surface of the scene-supporting component under the action of the first gravitational field is perpendicular to that surface.
[0046] Figure 2 The scene shown depicts a controlled virtual object's feet bound to a scene-supporting component. When the controlled virtual object's head is bound to the scene-supporting component, the controlled virtual object rotates as it falls onto the curved scene-supporting component. For example... Figure 3As shown, a scene will appear where a controlled virtual object walks upside down on a scene-supporting component. If the angle of the virtual camera capturing the game scene is rotated, a scene will also appear where the controlled virtual object walks with the scene-supporting component balanced on its head, as shown. Figure 4 As shown.
[0047] Step S110: Respond to the preset game event triggered by the controlled virtual object, and control the settlement based on the game behavior of the controlled virtual object.
[0048] The aforementioned preset game events can be: the controlled virtual object reaching a designated location in the game scene, completing the current game; the controlled virtual object staying in the game scene or a specific scene space for a specified time threshold, ending the current game; or all specified game items in the current game being acquired by other controlled virtual objects, or the number of controlled virtual objects in a specified area of the game scene reaching a specified number. Specific settings can be configured according to requirements and are not limited here.
[0049] The aforementioned game behaviors can include various aspects such as the movement time, distance traveled, number of specific scene spaces traversed, and number of designated game items acquired by the controlled virtual object within the game scene. Based on one or more of these game behaviors and a preset settlement method, the performance of the controlled virtual object in the current game can be calculated to obtain the settlement result.
[0050] The aforementioned method for controlling virtual objects provides a graphical user interface (GUI) via a terminal device. The GUI displays a game scene including multiple preset specific scene spaces. Each scene space contains a scene-carrying component and has corresponding specific gravity configuration parameters. In response to a first movement control operation on the controlled virtual object, the controlled virtual object is moved within the game scene. In response to the controlled virtual object entering a specific scene space, a first gravitational field is generated based on the specific gravity configuration parameters corresponding to that scene space. Based on the first gravitational field and the controlled virtual object's current motion parameters, the controlled virtual object's movement on the surface of the scene-carrying component within the specific scene space is controlled. In response to the controlled virtual object triggering a preset game event, a settlement is performed based on the controlled virtual object's game behavior. This method allows players to experience controlling virtual objects within various gravitational fields, enriching their gaming experience.
[0051] The following embodiments provide an implementation method for generating a first gravitational field based on specific gravitational configuration parameters corresponding to a specific scene space.
[0052] The aforementioned gravitational configuration parameters typically include a fundamental gravitational value, a fundamental gravitational direction, and gravitational variation parameters. Among these, the gravitational variation parameters indicate how the fundamental gravitational value and direction change with spatial location. Since common gravitational fields usually have predefined gravitational values and directions that change with spatial location, to reduce the complexity of the parameters describing these changes, the gravitational type can be defined as one of the gravitational variation parameters.
[0053] The location, shape, and gravity configuration parameters of the aforementioned specific scene space within the game scene can typically be configured by players with scene editing permissions through the game's scene editing interface. Several common gravitational fields, as well as other gravitational fields generated based on these, can be pre-defined as available shapes for the specific scene space. For example, a parallel gravitational field can be considered a cube, a spherical gravitational field a sphere, and hemispheres, cylinders, and other shapes can also be set as the shapes of the specific scene space. Correspondingly, the relationship between gravity and spatial position in these gravitational fields can also be used as the gravity variation parameters for the specific scene space corresponding to the shape.
[0054] Based on the above approach, various selection controls corresponding to different gravitational fields can be displayed in the game scene editing interface. After the player selects a control, the corresponding scene component will be displayed in the currently editable game scene. The shape of this scene component is the same as the shape of the gravitational field corresponding to the selected control, and the relationship between gravity and spatial position within its internal space is consistent with the relationship between gravity and spatial position in the corresponding gravitational field. To facilitate players in constructing diverse game scenes, players can drag scene components to change their position in the game scene through certain human-computer interaction operations; they can also scale, rotate, and mirror scene components to change the size of the scene space they enclose.
[0055] To set parameters such as the direction and magnitude of gravity in a specific scene space, a setting window for the basic gravity direction and value can be displayed on the interface. Typically, the basic gravity direction can have only two options, such as "up" or "down" based on a plane of a scene component as a reference point, or it can be a fixed direction that can only be reversed when the player rotates the scene component in the opposite direction. Alternatively, it can be based on a point as a reference point, offering "inward" or "outward" options, or it can be a fixed direction for that reference point, requiring different scene components to be set for different directions. The basic gravity value can be entered by the player or determined by sliding a preset numerical cursor.
[0056] After the player performs all configuration operations for the scene component and confirms that the configuration is effective, the position of the scene component in the game scene becomes the position of the corresponding specific scene space, and the internal area of the scene component becomes the internal area of the specific scene space. The basic gravity value, basic gravity direction, and gravity change parameters determined based on the player's configuration operations are the specific gravity configuration parameters for that specific scene space.
[0057] After a controlled virtual object enters the specific scene space, it is necessary to determine the gravitational parameters corresponding to each spatial location within the specific scene space based on the basic gravity value, basic gravity direction, and gravity variation parameters. Then, based on the gravitational parameters corresponding to each spatial location within the specific scene space, a first gravitational field is generated. This first gravitational field satisfies the player's configuration requirements for this specific scene space and can indicate the gravitational parameters corresponding to spatial locations within the specific scene space. These gravitational parameters typically include the gravitational direction and gravity value. The generated first gravitational field may exist only within the specific scene space, or its range may be greater than the specific scene space; the specific settings can be configured according to requirements and are not limited here.
[0058] The following embodiments provide an implementation method for controlling the surface movement of a controlled virtual object in a scene-carrying component in a specific scene space based on a first gravitational field and the current motion parameters of the controlled virtual object.
[0059] When the aforementioned first gravitational field can indicate the gravitational parameters corresponding to a spatial location in a specific scene space, in response to the controlled virtual object being located at a first position in the specific scene space, the gravitational parameters of the first position, such as the magnitude and direction of gravity at that position, can be determined based on the first gravitational field. Based on the gravitational parameters of the first position, the current motion parameters of the controlled virtual object are updated. In this process, based on the current motion speed and direction of the controlled virtual object, the motion speed and direction of the controlled virtual object after applying the gravitational force corresponding to the gravitational parameters at the first position can be calculated, and the calculation result is then determined as the updated current motion parameters. Furthermore, based on the updated current motion parameters, the movement of the controlled virtual object on the surface of the scene-supporting component in the specific scene space is controlled. To enable the controlled virtual object to move on the surface of the scene-supporting component, the gravitational direction of the gravity in the specific scene space is typically set to point towards the surface of the scene-supporting component.
[0060] In games, players typically use human-computer interaction devices to control the movement of virtual objects, thus controlling their trajectory within the game environment. Therefore, in response to a second movement control operation on the virtual object, it is necessary to control the movement of the virtual object on the surface of a scene-supporting component within a specific scene space, based on a first gravitational field, the virtual object's current motion parameters, and the operation parameters of the second movement control operation.
[0061] When a player controls a controlled virtual object to enter a specific scene space, in response to the controlled virtual object being located at a second position in the specific scene space, the gravitational parameters of the second position are determined based on the first gravitational field. Then, based on the gravitational parameters, the motion control parameters corresponding to the second movement control operation need to be determined. This step is because changes in the direction of gravity will cause changes in the field of view of the controlled virtual object or the shooting direction of the virtual camera that captures the scene. The control direction in determining the motion control parameters based on the operation parameters depends on the field of view of the controlled virtual object or the shooting direction of the virtual camera. Therefore, it is necessary to determine the motion control parameters based on the gravitational parameters.
[0062] Furthermore, based on motion control parameters and gravity parameters, the current motion parameters of the controlled virtual object can be updated, and based on the updated current motion parameters, the movement of the controlled virtual object on the surface of the scene-bearing component in a specific scene space can be controlled. This process is similar to that when the controlled virtual object is not subject to the player's movement control operation, except that the force situation of the controlled virtual object is different, which will not be elaborated here.
[0063] The game scene displayed in the graphical user interface is usually captured by a preset virtual camera. The shooting angle of the virtual camera and the standing direction of the controlled virtual object can be preset to have specified angular constraints, such as the angle between the shooting angle of the virtual camera and the standing direction of the controlled virtual object in the vertical plane being less than or equal to a preset angle threshold, so as to give the player a visual experience of observing the game scene while walking upright.
[0064] Motion control parameters include motion control direction. Typically, game interfaces use virtual joystick-like movement controls. The motion control direction resulting from the player's actions with these controls is usually as follows: when the player moves the control to the left, the controlled virtual object moves towards the left side of the game scene shown in the current view; when the player moves the control upwards, the controlled virtual object moves towards the front of the game scene shown in the current view, and so on for other directions. Since the scene is captured by a virtual camera, the motion control direction corresponding to the second movement control action needs to be determined using the following method when the virtual camera rotates following the controlled virtual object.
[0065] When the aforementioned gravity parameters typically include the direction of gravity, if the controlled virtual object enters a specific scene control, the gravity acting on the controlled virtual object will usually change abruptly. It is necessary to control the rotation of the controlled virtual object so that its standing direction after rotation is the same as or opposite to the direction of gravity. Then, a preset virtual camera is controlled to follow the rotation of the controlled virtual object so that the shooting angle of the rotated virtual camera satisfies a specified angle constraint condition with the standing direction of the controlled virtual object. Further, based on the shooting angle of the rotated virtual camera, the motion control direction corresponding to the second movement control operation is determined. Specifically, based on the shooting angle after rotation, the game scene corresponding to the current scene can be determined, and then, based on the control logic of the movement control operation, the corresponding motion control parameters can be determined.
[0066] When the direction of gravity points towards the scene-supporting component, the controlled virtual object can be moved on the scene-supporting component. To achieve the effect of the controlled virtual object moving upright on the scene-supporting component, the scene-supporting component can be bound to the feet of the controlled virtual object. Therefore, when controlling the rotation of the controlled virtual object, it is necessary to control the controlled virtual object to rotate until its standing direction is opposite to the direction of gravity. To achieve the effect of the controlled virtual object moving upside down on the scene-supporting component, the scene-supporting component can be bound to the head of the controlled virtual object, and the controlled virtual object can be controlled to rotate until its standing direction is the same as the direction of gravity.
[0067] To provide players with a rich gaming experience, the specific gravity configuration parameters for at least two specific scene spaces can be set differently. The type of gravity field corresponding to the specific gravity configuration parameters can be one of the following: a unidirectional gradient gravity field, a point-source radial gravity field, or a line-source radial gravity field, or a gravity field formed by the superposition of multiple gravity fields. Specifically, in a unidirectional gradient gravity field, the direction of gravity points to a specified plane, and the center of gravity can be considered to be at infinity; in a point-source radial gravity field, the direction of gravity points to a specified point, such as the direction of gravity in a spherical gravity field pointing to the center of the sphere; and in a line-source radial gravity field, the direction of gravity points to a specified axis, such as the direction of gravity in a cylindrical gravity field pointing to the axis of the cylinder.
[0068] Different scenes within the aforementioned multiple specific scene spaces can also have overlapping spatial regions. For example, the first scene space and the second scene space have an overlapping spatial region, which exists in both the first and second scene spaces. When setting the gravity configuration parameters for a specific scene space, a scene component can be directly dragged to an area that overlaps with another scene component. The gravitational field corresponding to this overlapping spatial region can be generated based on the gravity configuration parameters of the specific scene space that forms that region. Figure 5 As shown, the shaded areas represent overlapping spatial regions.
[0069] When a controlled virtual object enters the overlapping space region between the first scene space and the second scene space, in response to the controlled virtual object entering the overlapping space region between the first scene space and the second scene space, it is necessary to generate a second gravitational field for the overlapping space region between the first scene space and the second scene space based on the specific gravitational configuration parameters corresponding to the first scene space and the specific gravitational configuration parameters corresponding to the second scene space.
[0070] The aforementioned specific gravity configuration parameters can include gravity types; gravity types have preset priorities. For example, the priority of parallel gravitational fields, spherical gravitational fields, and cylindrical gravitational fields can be set to 1, i.e., the highest priority, while the priority of anti-cylindrical gravitational fields, quarter-cylindrical gravitational fields, and hemispherical gravitational fields can be set to 2, which is lower than the highest priority. When generating a gravitational field in an overlapping spatial region, a target space can be determined from the first scene space and the second scene space based on the gravity type corresponding to the first scene space and the corresponding gravity type in the second scene space; then, a second gravitational field is generated based on the gravity configuration parameters corresponding to the target space; wherein, the second gravitational field is located in the overlapping spatial region between the first scene space and the second scene space.
[0071] Specifically, the target space is determined as follows: First scene space is designated as the target space if the priority of its gravity type is higher than that of the second scene space; second scene space is designated as the target space if the priority of its gravity type is higher than that of the first scene space; or both scene spaces are designated as target spaces if the priority of its gravity type is equal to that of the second scene space. In short, the target space is determined as the higher-priority scene space among the specific scene spaces including overlapping spatial regions. If multiple scene spaces have the same priority, they are collectively designated as the target space.
[0072] After determining the target space, if the target space is a specific scene space, the specific gravitational configuration parameters corresponding to that specific scene space can be determined as the specific gravitational configuration parameters for the overlapping spatial region, and then a second gravitational field corresponding to the overlapping spatial region can be generated based on these parameters. When the target space includes multiple specific scene spaces, such as the aforementioned first scene space and second scene space, a second gravitational field needs to be generated based on the gravitational configuration parameters corresponding to the first scene space, the gravitational configuration parameters corresponding to the second scene space, and a preset gravitational superposition rule.
[0073] The gravity superposition rule can be set as follows: First, the maximum gravitational force in the first and second scene spaces at the same location can be used as the gravity of the second gravitational field at that location. Second, a vector operation can be performed on the gravitational forces in the first and second scene spaces at the same location, and the calculated gravity can be used as the gravity of the second gravitational field at that location. Third, weights can be set for the first and second scene spaces respectively, and the gravity of the second gravitational field at that location can be calculated based on these weights and the gravitational forces in the two spaces at the same location. Specific rules can be set according to requirements and are not limited here. Specific gravity superposition rules can be set when editing scene components. For example, when overlapping spatial regions appear in the game scene, multiple option controls corresponding to gravity superposition rules can be displayed in the game scene editing interface. When a player triggers a control, the gravity superposition rule corresponding to that control can be determined as the gravity superposition rule for the current overlapping spatial region.
[0074] In the game scene, other scene spaces besides a few specific scene spaces have preset basic gravity configuration parameters, which can correspond to the general gravity field in the game scene. Controlled virtual objects exhibit upright movement within the gravity field formed by these basic gravity configuration parameters. When a controlled virtual object is located in a scene space other than the several specific scene spaces, its movement within the game scene can be controlled based on the basic gravity field corresponding to the basic gravity configuration parameters and the object's current motion parameters.
[0075] For the above method embodiments, see Figure 6 The embodiment of this disclosure shown provides a control device for a virtual object. The device further includes:
[0076] The scene display module 602 is used to provide a graphical user interface through a terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; each specific scene space is equipped with a scene-carrying component; each specific scene space has corresponding specific gravity configuration parameters;
[0077] The first movement control module 604 is used to respond to a first movement control operation on the controlled virtual object and control the movement of the controlled virtual object in the game scene;
[0078] The gravity field generation module 606 is used to generate a first gravity field in response to a controlled virtual object entering a specific scene space, based on specific gravity configuration parameters corresponding to the specific scene space; the first gravity field is located in the specific scene space.
[0079] The second motion control module 608 is used to control the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object.
[0080] The settlement module 610 is used to respond to preset game events triggered by the controlled virtual object and control the settlement based on the game behavior of the controlled virtual object.
[0081] The aforementioned virtual object control device provides a graphical user interface (GUI) via a terminal device. The GUI displays a game scene including multiple preset specific scene spaces. Each specific scene space contains a scene-carrying component and has corresponding specific gravity configuration parameters. In response to a first movement control operation on the controlled virtual object, the device controls the movement of the controlled virtual object within the game scene. In response to the controlled virtual object entering a specific scene space, a first gravitational field is generated based on the specific gravity configuration parameters corresponding to that scene space. Based on the first gravitational field and the current motion parameters of the controlled virtual object, the device controls the movement of the controlled virtual object on the surface of the scene-carrying component within the specific scene space. In response to the controlled virtual object triggering a preset game event, the device controls the settlement of scores based on the controlled virtual object's game behavior. This method allows players to experience controlling the movement of virtual objects within various gravitational fields, enriching their gaming experience.
[0082] The aforementioned first gravitational field is used to indicate the gravitational parameters corresponding to spatial positions in a specific scene space; the gravitational configuration parameters include the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters; the gravitational variation parameters are used to indicate the relationship between the basic gravitational value and the basic gravitational direction and the spatial position; the gravitational field generation module is also used to: determine the gravitational parameters corresponding to each spatial position in the specific scene space based on the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters; and generate the first gravitational field based on the gravitational parameters corresponding to each spatial position in the specific scene space.
[0083] The aforementioned first gravitational field is used to indicate the gravitational parameters corresponding to a spatial position in a specific scene space; the second motion control module is further used to: in response to the controlled virtual object being located at a first position in a specific scene space, determine the gravitational parameters of the first position based on the first gravitational field; update the current motion parameters of the controlled virtual object based on the gravitational parameters of the first position; and control the surface movement of the controlled virtual object on the scene-bearing component in the specific scene space based on the updated current motion parameters.
[0084] The aforementioned second motion control module is further configured to: in response to a second motion control operation for the controlled virtual object, control the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second motion control operation.
[0085] The aforementioned second motion control module is further configured to: in response to the controlled virtual object being located at a second position in a specific scene space, determine the gravitational parameters of the second position based on the first gravitational field; determine the motion control parameters corresponding to the second motion control operation based on the gravitational parameters; update the current motion parameters of the controlled virtual object based on the motion control parameters and the gravitational parameters; and control the movement of the controlled virtual object on the surface of the scene-bearing component in the specific scene space based on the updated current motion parameters.
[0086] The aforementioned gravitational parameters include the gravitational direction; the scene of the game scene displayed in the graphical user interface is captured by a preset virtual camera; the shooting angle of the virtual camera and the standing direction of the controlled virtual object have a specified angular constraint condition; the motion control parameters include the motion control direction; the aforementioned second motion control module is also used to: control the rotation of the controlled virtual object so that the standing direction of the rotated controlled virtual object is the same as or opposite to the gravitational direction; control the preset virtual camera to follow the rotation of the controlled virtual object so that the shooting angle of the rotated virtual camera and the standing direction of the controlled virtual object satisfy the specified angular constraint condition; and determine the motion control direction corresponding to the second motion control operation based on the shooting angle of the rotated virtual camera.
[0087] The aforementioned direction of gravity points towards the scene-bearing component; the aforementioned second motion control module is also used to: in response to the scene-bearing component being bound to the feet of the controlled virtual object, control the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity; in response to the scene-bearing component being bound to the head of the controlled virtual object, control the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity.
[0088] The first scene space and the second scene space in the above-mentioned multiple specific scene spaces have overlapping spatial regions; the above-mentioned device further includes: a second gravitational field generation module, used to generate a second gravitational field of the overlapping spatial region between the first scene space and the second scene space in response to the controlled virtual object entering the overlapping spatial region between the first scene space and the second scene space, based on the specific gravitational configuration parameters corresponding to the first scene space and the specific gravitational configuration parameters corresponding to the second scene space.
[0089] The aforementioned specific gravity configuration parameters include gravity type; gravity type has a preset priority; the second gravity field generation module is also used to: determine a target space from the first scene space and the second scene space based on the gravity type corresponding to the first scene space and the gravity type corresponding to the second scene space; generate a second gravity field based on the gravity configuration parameters corresponding to the target space; the second gravity field is located in the overlapping space region between the first scene space and the second scene space.
[0090] The second gravitational field generation module is further configured to: determine the first scene space as the target space in response to the priority of the gravitational type of the first scene space being higher than the priority of the gravitational type of the second scene space; or, determine the second scene space as the target space in response to the priority of the gravitational type of the second scene space being higher than the priority of the gravitational type of the first scene space; or, determine both the first scene space and the second scene space as the target space in response to the priority of the gravitational type of the first scene space being equal to the priority of the gravitational type of the second scene space.
[0091] The target space mentioned above includes a first scene space and a second scene space; the second gravitational field generation module is also used to generate a second gravitational field based on the gravitational configuration parameters corresponding to the first scene space, the gravitational configuration parameters corresponding to the second scene space, and the preset gravitational superposition rules.
[0092] The game scene described above has preset basic gravity configuration parameters in other scene spaces besides multiple specific scene spaces; the device also includes: a third movement control module, used to control the movement of the controlled virtual object in the game scene in response to the controlled virtual object being located in other scene spaces besides multiple specific scene spaces, based on the basic gravitational field corresponding to the basic gravity configuration parameters and the current motion parameters of the controlled virtual object.
[0093] At least two of the aforementioned specific scene spaces correspond to different specific gravitational configuration parameters; the gravitational field type corresponding to the specific gravitational configuration parameter is one of a unidirectional gradient gravitational field, a point source radiative gravity field, and a line source radiative gravity field; the gravitational direction in the unidirectional gradient gravitational field points to a specified plane; the gravitational direction in the point source radiative gravity field points to a specified point; and the gravitational direction in the line source radiative gravity field points to a specified axis.
[0094] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the aforementioned control method for the virtual object. Specifically:
[0095] A graphical user interface is provided through a terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; scene-carrying components are set in the specific scene spaces; the specific scene spaces have corresponding specific gravity configuration parameters; in response to a first movement control operation for the controlled virtual object, the controlled virtual object is controlled to move in the game scene; in response to the controlled virtual object entering a specific scene space, a first gravity field is generated based on the specific gravity configuration parameters corresponding to the specific scene space; the first gravity field is located in the specific scene space; based on the first gravity field and the current motion parameters of the controlled virtual object, the controlled virtual object is controlled to move on the surface of the scene-carrying components in the specific scene space; in response to the controlled virtual object triggering a preset game event, the game is settled according to the game behavior of the controlled virtual object.
[0096] In the above methods, players can experience the gameplay of controlling the movement of virtual objects in various gravitational fields, enriching the player's gaming experience.
[0097] Optionally, the aforementioned first gravitational field is used to indicate the gravitational parameters corresponding to spatial locations in a specific scene space; the gravitational configuration parameters include a basic gravitational value, a basic gravitational direction, and gravitational variation parameters; the gravitational variation parameters are used to indicate the relationship between the basic gravitational value and the basic gravitational direction and the spatial location; the step of generating the first gravitational field based on the specific gravitational configuration parameters corresponding to the specific scene space includes: determining the gravitational parameters corresponding to each spatial location in the specific scene space based on the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters; and generating the first gravitational field based on the gravitational parameters corresponding to each spatial location in the specific scene space.
[0098] Optionally, the first gravitational field is used to indicate the gravitational parameters corresponding to a spatial position in a specific scene space; the step of controlling the surface movement of the controlled virtual object on the scene-bearing component in the specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: in response to the controlled virtual object being located at a first position in the specific scene space, determining the gravitational parameters of the first position based on the first gravitational field; updating the current motion parameters of the controlled virtual object based on the gravitational parameters of the first position; and controlling the surface movement of the controlled virtual object on the scene-bearing component in the specific scene space based on the updated current motion parameters.
[0099] Optionally, the step of controlling the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: in response to a second movement control operation for the controlled virtual object, controlling the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation.
[0100] Optionally, the step of controlling the surface movement of the controlled virtual object on the scene-carrying component in a specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation includes: in response to the controlled virtual object being located at a second position in the specific scene space, determining the gravitational parameters of the second position based on the first gravitational field; determining the motion control parameters corresponding to the second movement control operation based on the gravitational parameters; updating the current motion parameters of the controlled virtual object based on the motion control parameters and the gravitational parameters; and controlling the surface movement of the controlled virtual object on the scene-carrying component in the specific scene space based on the updated current motion parameters.
[0101] Optionally, the aforementioned gravity parameters include the direction of gravity; the scene of the game scene displayed in the graphical user interface is captured by a preset virtual camera; the shooting angle of the virtual camera and the standing direction of the controlled virtual object have a specified angular constraint; the motion control parameters include the direction of motion control; the step of determining the motion control parameters corresponding to the second movement control operation based on the gravity parameters includes: controlling the controlled virtual object to rotate so that the standing direction of the rotated controlled virtual object is the same as or opposite to the direction of gravity; controlling the preset virtual camera to follow the rotation of the controlled virtual object so that the shooting angle of the rotated virtual camera and the standing direction of the controlled virtual object satisfy the specified angular constraint; and determining the direction of motion control corresponding to the second movement control operation based on the shooting angle of the rotated virtual camera.
[0102] Optionally, the aforementioned direction of gravity points towards the scene-supporting component; the step of controlling the rotation of the controlled virtual object includes: in response to the scene-supporting component being bound to the feet of the controlled virtual object, controlling the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity; in response to the scene-supporting component being bound to the head of the controlled virtual object, controlling the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity.
[0103] Optionally, the first scene space and the second scene space in the above-mentioned multiple specific scene spaces have overlapping spatial regions; the above method further includes: in response to the controlled virtual object entering the overlapping spatial region between the first scene space and the second scene space, generating a second gravitational field of the overlapping spatial region between the first scene space and the second scene space based on specific gravitational configuration parameters corresponding to the first scene space and specific gravitational configuration parameters corresponding to the second scene space.
[0104] Optionally, the aforementioned specific gravity configuration parameters include gravity type; gravity type has a preset priority; the step of generating a second gravity field in the overlapping spatial region between the first scene space and the second scene space based on the specific gravity configuration parameters corresponding to the first scene space and the specific gravity configuration parameters corresponding to the second scene space includes: determining a target space from the first scene space and the second scene space based on the gravity type corresponding to the first scene space and the corresponding gravity type in the second scene space; generating a second gravity field based on the gravity configuration parameters corresponding to the target space; the second gravity field is located in the overlapping spatial region between the first scene space and the second scene space.
[0105] Optionally, the step of determining the target space from the first scene space and the second scene space based on the priority of the gravity type corresponding to the first scene space and the priority of the gravity type corresponding to the second scene space includes: determining the first scene space as the target space in response to the priority of the gravity type in the first scene space being higher than the priority of the gravity type in the second scene space; or, determining the second scene space as the target space in response to the priority of the gravity type in the second scene space being higher than the priority of the gravity type in the first scene space; or, determining both the first scene space and the second scene space as the target space in response to the priority of the gravity type in the first scene space being equal to the priority of the gravity type in the second scene space.
[0106] Optionally, the target space includes a first scene space and a second scene space; the step of generating a second gravitational field based on the gravitational configuration parameters corresponding to the target space includes: generating a second gravitational field based on the gravitational configuration parameters corresponding to the first scene space, the gravitational configuration parameters corresponding to the second scene space, and a preset gravitational superposition rule.
[0107] Optionally, the game scene other than the multiple specific scene spaces has preset basic gravity configuration parameters; the method further includes: in response to the controlled virtual object being located in other scene spaces other than the multiple specific scene spaces, controlling the controlled virtual object to move in the game scene based on the basic gravity field corresponding to the basic gravity configuration parameters and the current motion parameters of the controlled virtual object.
[0108] Optionally, at least two of the aforementioned specific scene spaces correspond to different specific gravitational configuration parameters; the gravitational field type corresponding to the specific gravitational configuration parameter is one of a unidirectional gradient gravitational field, a point source radiative gravity field, and a line source radiative gravity field; the gravitational direction in the unidirectional gradient gravitational field points to a specified plane; the gravitational direction in the point source radiative gravity field points to a specified point; and the gravitational direction in the line source radiative gravity field points to a specified axis.
[0109] See Figure 7As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the control method of the virtual object described above.
[0110] Furthermore, Figure 7 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0111] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0112] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0113] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the control method of the virtual object described above.
[0114] This disclosure provides a method, apparatus, and electronic device for controlling virtual objects, including a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the methods described in the preceding embodiments. Specifically:
[0115] A graphical user interface is provided through a terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; scene-carrying components are set in the specific scene spaces; the specific scene spaces have corresponding specific gravity configuration parameters; in response to a first movement control operation for the controlled virtual object, the controlled virtual object is controlled to move in the game scene; in response to the controlled virtual object entering a specific scene space, a first gravity field is generated based on the specific gravity configuration parameters corresponding to the specific scene space; the first gravity field is located in the specific scene space; based on the first gravity field and the current motion parameters of the controlled virtual object, the controlled virtual object is controlled to move on the surface of the scene-carrying components in the specific scene space; in response to the controlled virtual object triggering a preset game event, the game is settled according to the game behavior of the controlled virtual object.
[0116] In the above methods, players can experience the gameplay of controlling the movement of virtual objects in various gravitational fields, enriching the player's gaming experience.
[0117] Optionally, the aforementioned first gravitational field is used to indicate the gravitational parameters corresponding to spatial locations in a specific scene space; the gravitational configuration parameters include a basic gravitational value, a basic gravitational direction, and gravitational variation parameters; the gravitational variation parameters are used to indicate the relationship between the basic gravitational value and the basic gravitational direction and the spatial location; the step of generating the first gravitational field based on the specific gravitational configuration parameters corresponding to the specific scene space includes: determining the gravitational parameters corresponding to each spatial location in the specific scene space based on the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters; and generating the first gravitational field based on the gravitational parameters corresponding to each spatial location in the specific scene space.
[0118] Optionally, the first gravitational field is used to indicate the gravitational parameters corresponding to a spatial position in a specific scene space; the step of controlling the surface movement of the controlled virtual object on the scene-bearing component in the specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: in response to the controlled virtual object being located at a first position in the specific scene space, determining the gravitational parameters of the first position based on the first gravitational field; updating the current motion parameters of the controlled virtual object based on the gravitational parameters of the first position; and controlling the surface movement of the controlled virtual object on the scene-bearing component in the specific scene space based on the updated current motion parameters.
[0119] Optionally, the step of controlling the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: in response to a second movement control operation for the controlled virtual object, controlling the surface movement of the controlled virtual object in a specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation.
[0120] Optionally, the step of controlling the surface movement of the controlled virtual object on the scene-carrying component in a specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation includes: in response to the controlled virtual object being located at a second position in the specific scene space, determining the gravitational parameters of the second position based on the first gravitational field; determining the motion control parameters corresponding to the second movement control operation based on the gravitational parameters; updating the current motion parameters of the controlled virtual object based on the motion control parameters and the gravitational parameters; and controlling the surface movement of the controlled virtual object on the scene-carrying component in the specific scene space based on the updated current motion parameters.
[0121] Optionally, the aforementioned gravity parameters include the direction of gravity; the scene of the game scene displayed in the graphical user interface is captured by a preset virtual camera; the shooting angle of the virtual camera and the standing direction of the controlled virtual object have a specified angular constraint; the motion control parameters include the direction of motion control; the step of determining the motion control parameters corresponding to the second movement control operation based on the gravity parameters includes: controlling the controlled virtual object to rotate so that the standing direction of the rotated controlled virtual object is the same as or opposite to the direction of gravity; controlling the preset virtual camera to follow the rotation of the controlled virtual object so that the shooting angle of the rotated virtual camera and the standing direction of the controlled virtual object satisfy the specified angular constraint; and determining the direction of motion control corresponding to the second movement control operation based on the shooting angle of the rotated virtual camera.
[0122] Optionally, the aforementioned direction of gravity points towards the scene-supporting component; the step of controlling the rotation of the controlled virtual object includes: in response to the scene-supporting component being bound to the feet of the controlled virtual object, controlling the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity; in response to the scene-supporting component being bound to the head of the controlled virtual object, controlling the controlled virtual object to rotate until the standing direction of the controlled virtual object is opposite to the direction of gravity.
[0123] Optionally, the first scene space and the second scene space in the above-mentioned multiple specific scene spaces have overlapping spatial regions; the above method further includes: in response to the controlled virtual object entering the overlapping spatial region between the first scene space and the second scene space, generating a second gravitational field of the overlapping spatial region between the first scene space and the second scene space based on specific gravitational configuration parameters corresponding to the first scene space and specific gravitational configuration parameters corresponding to the second scene space.
[0124] Optionally, the aforementioned specific gravity configuration parameters include gravity type; gravity type has a preset priority; the step of generating a second gravity field in the overlapping spatial region between the first scene space and the second scene space based on the specific gravity configuration parameters corresponding to the first scene space and the specific gravity configuration parameters corresponding to the second scene space includes: determining a target space from the first scene space and the second scene space based on the gravity type corresponding to the first scene space and the corresponding gravity type in the second scene space; generating a second gravity field based on the gravity configuration parameters corresponding to the target space; the second gravity field is located in the overlapping spatial region between the first scene space and the second scene space.
[0125] Optionally, the step of determining the target space from the first scene space and the second scene space based on the priority of the gravity type corresponding to the first scene space and the priority of the gravity type corresponding to the second scene space includes: determining the first scene space as the target space in response to the priority of the gravity type in the first scene space being higher than the priority of the gravity type in the second scene space; or, determining the second scene space as the target space in response to the priority of the gravity type in the second scene space being higher than the priority of the gravity type in the first scene space; or, determining both the first scene space and the second scene space as the target space in response to the priority of the gravity type in the first scene space being equal to the priority of the gravity type in the second scene space.
[0126] Optionally, the target space includes a first scene space and a second scene space; the step of generating a second gravitational field based on the gravitational configuration parameters corresponding to the target space includes: generating a second gravitational field based on the gravitational configuration parameters corresponding to the first scene space, the gravitational configuration parameters corresponding to the second scene space, and a preset gravitational superposition rule.
[0127] Optionally, the game scene other than the multiple specific scene spaces has preset basic gravity configuration parameters; the method further includes: in response to the controlled virtual object being located in other scene spaces other than the multiple specific scene spaces, controlling the controlled virtual object to move in the game scene based on the basic gravity field corresponding to the basic gravity configuration parameters and the current motion parameters of the controlled virtual object.
[0128] Optionally, at least two of the aforementioned specific scene spaces correspond to different specific gravitational configuration parameters; the gravitational field type corresponding to the specific gravitational configuration parameter is one of a unidirectional gradient gravitational field, a point source radiative gravity field, and a line source radiative gravity field; the gravitational direction in the unidirectional gradient gravitational field points to a specified plane; the gravitational direction in the point source radiative gravity field points to a specified point; and the gravitational direction in the line source radiative gravity field points to a specified axis.
[0129] See Figure 7As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the control method of the virtual object described above.
[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0131] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0132] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0133] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0134] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for controlling a virtual object, characterized in that, The method includes: A graphical user interface is provided through a terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; each specific scene space is equipped with a scene-carrying component; each specific scene space has corresponding specific gravity configuration parameters; In response to a first movement control operation on the controlled virtual object, the controlled virtual object is controlled to move within the game scene; In response to the controlled virtual object entering the specific scene space, a first gravitational field is generated based on the specific gravitational configuration parameters corresponding to the specific scene space; Based on the first gravitational field and the current motion parameters of the controlled virtual object, control the surface movement of the scene-bearing component of the controlled virtual object in the specific scene space; In response to the controlled virtual object triggering a preset game event, the system controls the settlement based on the game behavior of the controlled virtual object; The first gravitational field is used to indicate the gravitational parameters corresponding to the spatial position in the specific scene space; the gravitational configuration parameters include a basic gravitational value, a basic gravitational direction, and gravitational variation parameters; the gravitational variation parameters are used to indicate the relationship between the basic gravitational value and the basic gravitational direction and the spatial position. The step of generating a first gravitational field based on specific gravitational configuration parameters corresponding to the specific scene space includes: Based on the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters, determine the gravitational parameters corresponding to each spatial location in the specific scene space; A first gravitational field is generated based on the gravitational parameters corresponding to each spatial location in the specific scene space.
2. The method for controlling virtual objects according to claim 1, characterized in that, The first gravitational field is used to indicate the gravitational parameters corresponding to the spatial location in the specific scene space; The step of controlling the surface movement of the scene-bearing component of the controlled virtual object in the specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: In response to the controlled virtual object being located at a first position in the specific scene space, the gravitational parameters of the first position are determined based on the first gravitational field; Based on the gravity parameters at the first position, update the current motion parameters of the controlled virtual object; Based on the updated current motion parameters, the controlled virtual object is controlled to move on the surface of the scene-bearing component in the specific scene space.
3. The method for controlling virtual objects according to claim 1, characterized in that, The step of controlling the surface movement of the scene-bearing component of the controlled virtual object in the specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object includes: In response to a second movement control operation for the controlled virtual object, the controlled virtual object is controlled to move on the surface of a scene-bearing component in the specific scene space, based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation.
4. The method for controlling virtual objects according to claim 3, characterized in that, The steps of controlling the surface movement of the controlled virtual object in the scene-bearing component of the specific scene space based on the first gravitational field, the current motion parameters of the controlled virtual object, and the operation parameters of the second movement control operation include: In response to the controlled virtual object being located at a second position in the specific scene space, the gravitational parameters of the second position are determined based on the first gravitational field; Based on the gravity parameters, determine the motion control parameters corresponding to the second movement control operation; Based on the motion control parameters and the gravity parameters, update the current motion parameters of the controlled virtual object; Based on the updated current motion parameters, the controlled virtual object is controlled to move on the surface of the scene-bearing component in the specific scene space.
5. The method for controlling virtual objects according to claim 4, characterized in that, The gravity parameters include the direction of gravity; the scene of the game scene displayed in the graphical user interface is captured by a preset virtual camera; the shooting angle of the virtual camera and the standing direction of the controlled virtual object are subject to a specified angular constraint; the motion control parameters include the direction of motion control. The step of determining the motion control parameters corresponding to the second movement control operation based on the gravity parameters includes: The controlled virtual object is rotated so that the standing direction of the rotated controlled virtual object is the same as or opposite to the direction of gravity; A preset virtual camera is controlled to rotate following the controlled virtual object, so that the shooting angle of the rotated virtual camera and the standing direction of the controlled virtual object satisfy the specified angle constraint condition. Based on the shooting angle of the rotated virtual camera, the motion control direction corresponding to the second motion control operation is determined.
6. The method for controlling virtual objects according to claim 5, characterized in that, The direction of the gravity points towards the scene-supporting component; The step of controlling the rotation of the controlled virtual object includes: In response to the scene-bearing component being bound to the feet of the controlled virtual object, the controlled virtual object is rotated so that its standing direction is opposite to the direction of gravity; In response to the scene carrier component being bound to the head of the controlled virtual object, the controlled virtual object is rotated so that the standing direction of the controlled virtual object is the same as the direction of gravity.
7. The method for controlling virtual objects according to claim 1, characterized in that, The first scene space and the second scene space in the plurality of specific scene spaces have overlapping spatial regions; the method further includes: In response to the controlled virtual object entering the overlapping spatial region between the first scene space and the second scene space, a second gravitational field is generated for the overlapping spatial region between the first scene space and the second scene space based on specific gravitational configuration parameters corresponding to the first scene space and specific gravitational configuration parameters corresponding to the second scene space.
8. The method for controlling virtual objects according to claim 7, characterized in that, The specific gravity configuration parameters include gravity type; the gravity type has a preset priority. The step of generating a second gravitational field in the overlapping spatial region between the first and second scene spaces based on specific gravitational configuration parameters corresponding to the first scene space and specific gravitational configuration parameters corresponding to the second scene space includes: Based on the priority of the gravity type corresponding to the first scene space and the priority of the gravity type corresponding to the second scene space, the target space is determined from the first scene space and the second scene space; A second gravitational field is generated based on the gravitational configuration parameters corresponding to the target space; the second gravitational field is located in the overlapping space region between the first scene space and the second scene space.
9. The method for controlling virtual objects according to claim 8, characterized in that, The steps for determining the target space from the first scene space and the second scene space based on the priority of the gravity type corresponding to the first scene space and the priority of the gravity type corresponding to the second scene space include: In response to the fact that the gravity type of the first scene space has a higher priority than the gravity type of the second scene space, the first scene space is determined as the target space; Alternatively, in response to the fact that the gravity type of the second scene space has a higher priority than the gravity type of the first scene space, the second scene space is determined as the target space; Alternatively, in response to the priority of the gravity type of the first scene space being equal to the priority of the gravity type of the second scene space, the first scene space and the second scene space are determined as target spaces.
10. The method for controlling virtual objects according to claim 8, characterized in that, The target space includes the first scene space and the second scene space; The step of generating a second gravitational field based on the gravitational configuration parameters corresponding to the target space includes: A second gravitational field is generated based on the gravitational configuration parameters corresponding to the first scene space, the gravitational configuration parameters corresponding to the second scene space, and the preset gravitational superposition rules.
11. The method for controlling virtual objects according to claim 1, characterized in that, The game scene, excluding the multiple specific scene spaces, has preset basic gravity configuration parameters for other scene spaces; The method further includes: In response to the controlled virtual object being located in a scene space other than the multiple specific scene spaces, the controlled virtual object is controlled to move in the game scene based on the basic gravitational field corresponding to the basic gravitational configuration parameters and the current motion parameters of the controlled virtual object.
12. The method for controlling virtual objects according to claim 1, characterized in that, At least two of the multiple specific scene spaces correspond to different specific gravity configuration parameters; The gravitational field type corresponding to the specific gravitational configuration parameters is one of a unidirectional gradient gravitational field, a point source radiative gravity field, and a line source radiative gravity field; the gravitational direction in the unidirectional gradient gravitational field points to a specified plane; the gravitational direction in the point source radiative gravity field points to a specified point; and the gravitational direction in the line source radiative gravity field points to a specified axis.
13. A control device for a virtual object, characterized in that, The device includes: A scene display module is used to provide a graphical user interface through a terminal device; the graphical user interface displays the game scene where the controlled virtual object is located; the game scene includes multiple preset specific scene spaces; each specific scene space is equipped with a scene-carrying component; each specific scene space has corresponding specific gravity configuration parameters; The first movement control module is configured to respond to a first movement control operation on the controlled virtual object and control the controlled virtual object to move in the game scene; A gravity field generation module is used to generate a first gravity field based on specific gravity configuration parameters corresponding to the specific scene space in response to the controlled virtual object entering the specific scene space; the first gravity field is located in the specific scene space; The second motion control module is used to control the surface movement of the scene-bearing component of the controlled virtual object in the specific scene space based on the first gravitational field and the current motion parameters of the controlled virtual object. The settlement module is used to respond to preset game events triggered by the controlled virtual object and control the settlement based on the game behavior of the controlled virtual object; The first gravitational field is used to indicate the gravitational parameters corresponding to the spatial position in the specific scene space; the gravitational configuration parameters include a basic gravitational value, a basic gravitational direction, and gravitational variation parameters; the gravitational variation parameters are used to indicate the relationship between the basic gravitational value and the basic gravitational direction and the spatial position. The gravitational field generation module is also used for: Based on the basic gravitational value, the basic gravitational direction, and the gravitational variation parameters, determine the gravitational parameters corresponding to each spatial location in the specific scene space; A first gravitational field is generated based on the gravitational parameters corresponding to each spatial location in the specific scene space.
14. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the control method for the virtual object according to any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the control method for the virtual object according to any one of claims 1-12.
Citation Information
Patent Citations
Obtaining method and apparatus of game operations of game accounts
CN107744665A
Method and device for handling collision of obstacles, storage medium and electronic device
CN108579085A