CN112169338A - Control method and device for sphere motion, storage medium and computer equipment - Google Patents

Control method and device for sphere motion, storage medium and computer equipment Download PDF

Info

Publication number
CN112169338A
CN112169338A CN202011103230.2A CN202011103230A CN112169338A CN 112169338 A CN112169338 A CN 112169338A CN 202011103230 A CN202011103230 A CN 202011103230A CN 112169338 A CN112169338 A CN 112169338A
Authority
CN
China
Prior art keywords
parameter
movement
speed
initial
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011103230.2A
Other languages
Chinese (zh)
Other versions
CN112169338B (en
Inventor
任睿博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202011103230.2A priority Critical patent/CN112169338B/en
Publication of CN112169338A publication Critical patent/CN112169338A/en
Application granted granted Critical
Publication of CN112169338B publication Critical patent/CN112169338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/573Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/812Ball games, e.g. soccer or baseball
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8011Ball

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a method and a device for controlling the movement of a sphere, a storage medium and computer equipment, wherein the method for controlling the movement of the sphere comprises the following steps: receiving trigger operation information when the virtual sphere starts to move; determining a speed weight value of the virtual sphere according to the trigger operation information; determining the motion parameters of the virtual sphere in the motion process according to the speed weight value; the movement of the virtual sphere is controlled according to the movement parameters, so that the movement parameters of the sphere at any moment from the beginning of movement to the stopping of movement can be accurately calculated on the premise of small calculation amount when the movement of the sphere is simulated, and the accuracy and the efficiency of simulation are improved.

Description

Control method and device for sphere motion, storage medium and computer equipment
Technical Field
The application relates to the technical field of games, in particular to a method and a device for controlling ball motion, a storage medium and computer equipment.
Background
In sports-type network games, a realistic physics-based simulation of the movement of a sphere is often required. The existing technical scheme for simulating the physical motion of the sphere comprises methods of simulating the physical motion through a physical engine, simulating the physical motion by using a motion fitting formula by self, and the like.
However, these prior art solutions have problems that the calculation of the motion is not accurate enough and the efficiency is low due to the large amount of calculation.
Disclosure of Invention
The application aims to provide a method and a device for controlling the movement of a sphere, a storage medium and computer equipment, so as to improve the accuracy and efficiency of simulation when the movement of the sphere is simulated.
The embodiment of the application provides a control method of sphere motion, which comprises the following steps:
receiving trigger operation information when the virtual sphere starts to move;
determining a speed weight value of the virtual sphere according to the trigger operation information;
determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and controlling the movement of the virtual sphere according to the movement parameters.
The embodiment of the present application further provides a control device for spherical motion, including:
the receiving module is used for receiving trigger operation information when the virtual sphere starts to move;
the first determining module is used for determining the speed weight value of the virtual sphere according to the trigger operation information;
the second determining module is used for determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and the control module is used for controlling the movement of the virtual sphere according to the movement parameters.
The motion parameters comprise a speed parameter and an acceleration parameter, and the second determining module specifically comprises:
the first determining unit is used for determining at least one motion mode of the virtual sphere in the motion process according to the speed weight value;
the second determining unit is used for determining the initial speed parameter of the virtual sphere;
and the third determining unit is used for determining the speed parameter and the acceleration parameter corresponding to each motion mode according to the initial speed parameter.
The first determining unit is specifically configured to:
when the speed weight value is a preset value, determining that the movement mode of the virtual sphere in the movement process comprises pure rolling;
when the speed weight value is not a preset value, determining the movement modes of the virtual sphere in the movement process to comprise sliding and rolling and pure rolling.
When the motion mode includes sliding and rolling and pure rolling, the initial speed parameter includes an initial sliding linear speed parameter, an initial rotation speed parameter and an initial rolling linear speed parameter, and the second determining unit specifically includes:
the acquisition subunit is used for acquiring an initial sliding linear velocity parameter of the virtual sphere;
the first determining subunit is used for determining an initial rotation speed parameter of the virtual sphere according to the initial sliding linear speed parameter and the speed weight value;
and the second determining subunit is used for determining the initial rolling linear velocity parameter of the virtual sphere according to the initial sliding linear velocity parameter, the velocity weight value and a preset critical velocity proportion value.
Wherein, the third determining unit specifically includes:
the third determining subunit is used for determining a first acceleration parameter corresponding to sliding and rolling according to the initial rolling linear velocity parameter, the initial rotation speed parameter, the initial sliding linear velocity parameter and a preset sliding acceleration parameter;
the fourth determining subunit is used for determining the first speed parameter corresponding to sliding and rolling according to the initial sliding linear speed parameter, the sliding acceleration parameter, the initial rotating speed parameter and the first acceleration parameter;
and the fifth determining subunit is used for taking the preset rolling acceleration parameter as a second acceleration parameter corresponding to pure rolling, and determining a second speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the second acceleration parameter.
Wherein, the control module is specifically configured to:
controlling the virtual sphere to slide and roll according to the first speed parameter and the first acceleration parameter;
and in the sliding and rolling movement process, when the sliding linear speed of the virtual sphere is equal to the initial rolling linear speed parameter, controlling the virtual sphere to perform pure rolling movement by using the second speed parameter and the second acceleration parameter.
Wherein the obtaining subunit is specifically configured to:
receiving an input motion trajectory line through the game interface;
determining a movement displacement of the virtual sphere based on the movement trajectory line;
and determining an initial sliding linear velocity parameter of the virtual sphere according to the velocity weight value, the movement displacement and the preset movement duration.
When the motion mode includes pure scrolling, the initial speed parameter includes an initial scrolling linear speed parameter, and the third determining unit specifically includes:
a sixth determining subunit, configured to use the preset rolling acceleration parameter as a third acceleration parameter corresponding to pure rolling, and determine a third speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the third acceleration parameter;
the control module is specifically configured to:
and controlling the virtual sphere to perform pure rolling motion according to the third speed parameter and the third acceleration parameter.
The embodiment of the application also provides a computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute any one of the above control methods for the movement of the sphere.
The embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in any one of the above methods for controlling the movement of the sphere when executing the computer program.
According to the control method, the device, the storage medium and the computer equipment for the sphere motion, the triggering operation information when the virtual sphere starts to move is received, the speed weighted value of the virtual sphere is determined according to the triggering operation information, the motion parameter of the virtual sphere in the motion process is determined according to the speed weighted value, and the motion of the virtual sphere is controlled according to the motion parameter, so that when the sphere motion is simulated, the motion parameter of the sphere at any moment from the beginning to the stopping of the motion can be accurately calculated on the premise of small calculation amount, and the accuracy and the efficiency of simulation are improved.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic view of a scene of a control system for sphere movement provided by an embodiment of the present application;
fig. 2 is a schematic flow chart of a control method for sphere movement provided by an embodiment of the present application;
FIG. 3 is a schematic view of a game interface before movement of a virtual sphere provided by an embodiment of the present application;
fig. 4 is another schematic flow chart of a control method for sphere movement provided by an embodiment of the present application;
fig. 5 is another schematic flow chart of a control method for sphere movement provided by an embodiment of the present application;
FIG. 6 is another schematic view of a virtual sphere pre-motion game interface provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of the relationship between the linear velocity or rotational speed and time during the movement of the virtual sphere provided by the embodiment of the present application;
FIG. 8 is a schematic diagram illustrating another relationship between a line speed or a rotation speed and time during a movement of a virtual sphere provided by an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a control device for controlling the movement of a sphere provided by an embodiment of the present application;
fig. 10 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a method and a device for controlling spherical motion, a storage medium and computer equipment.
Referring to fig. 1, fig. 1 is a schematic view of a scene of a control system of a sphere motion provided in an embodiment of the present application, where the control system of the sphere motion may include any one of the control devices of the sphere motion provided in the embodiment of the present application, and the control device of the sphere motion may be specifically integrated in a terminal or a server, and the terminal may be a smart phone, a tablet Computer, an intelligent bluetooth device, a notebook Computer, or a Personal Computer (PC), and the server may be a single server or a server cluster including a plurality of servers.
Taking a computer device as an example, the terminal can receive trigger operation information when the virtual sphere starts to move; determining a speed weight value of the virtual sphere according to the trigger operation information; determining the motion parameters of the virtual sphere in the motion process according to the speed weight value; and controlling the movement of the virtual sphere according to the movement parameters.
The terminal can be a device for running a game, and the game can be a virtual ball game such as a virtual football game, a virtual ice hockey game, a virtual hockey game or a virtual billiards game. The velocity weight value can be used for representing the ratio of the rotating speed to the linear velocity when the virtual sphere starts to move. Different virtual ball games may have different ways for a player to trigger a virtual ball to start moving, and different trigger operation information in the same virtual ball game may correspond to different speed weight values, where the trigger operation information may include ball hitting manners (e.g., a high-stick ball hitting manner and a flat-stick ball hitting manner in a virtual billiards game) and/or ball hitting positions that may affect the size of the speed weight values. The motion parameters may include a velocity parameter and an acceleration parameter at any time between the start of the movement and the stop of the movement of the virtual sphere.
For example, as shown in fig. 1, in a game interface of a virtual ball game, when a player directly triggers a virtual ball 1 in the game interface to start moving through a touch screen or indirectly triggers the virtual ball 1 in the game interface to start moving through a touch screen by manipulating a virtual club 2 in the game interface, the terminal may receive trigger operation information when the player triggers the virtual ball 1 to start moving, that is, position information and manner information of a hitting point 3 selected when the player triggers the virtual ball 1 to start moving, and determine a corresponding speed weight value according to the received position information and manner information of the hitting point 3, for example, when the position of the hitting point 3 is a middle position of the virtual ball 1 and the manner of hitting is a manner of hitting 1 (e.g., a high-stick manner), the corresponding speed weight value may be equal to 0.5, so as to represent that a rotating speed and a linear speed of the virtual ball 1 at the start of moving are the same direction and a large rotating speed of the virtual ball 1 The small value is half of the linear velocity, then the motion parameters, namely, the velocity parameter and the acceleration parameter, of the virtual sphere 1 in the motion process can be determined according to the velocity weight value, and the virtual sphere 1 is controlled to move on the virtual plane 4 by the velocity parameter and the acceleration parameter, so that the simulation of the sphere motion is realized.
As shown in fig. 2, fig. 2 is a schematic flow chart of a control method of a sphere motion provided in an embodiment of the present application, and a specific flow of the control method of the sphere motion may be as follows:
s101, receiving trigger operation information when the virtual sphere starts to move.
In the present embodiment, the control method of the ball motion can be applied, but not limited to, different virtual ball game applications, for example, a virtual football game, a virtual ice hockey game, a virtual billiards game, and the like.
Wherein, in different virtual ball games, a player can trigger a virtual ball to start moving, and the manner of triggering the virtual ball to start moving by the player may be different, for example, in a virtual football game, the player can directly trigger the virtual ball in the game interface to start moving by a touch screen manner, and in a virtual billiards game, the player can indirectly trigger the virtual ball in the game interface to start moving by manipulating a virtual ball rod in the game interface by a touch screen manner. The trigger operation information may include a hitting mode (for example, a high-backswing mode or a flat-backswing mode in a virtual billiard game, or a big-backswing mode or a kick-out mode in a virtual football game) selected by a player when the virtual ball starts to move, and/or a hitting point position (that is, a contact point position of a finger of the player or a virtual ball and the virtual ball) and/or the like, which may affect the magnitude of the ratio between the rotational speed and the linear speed when the virtual ball starts to move.
In specific implementation, as shown in fig. 3, a game interface of a virtual ball game may include a plurality of ball hitting mode function keys corresponding to a plurality of ball hitting modes, for example, a ball hitting mode 1 function key, a ball hitting mode 2 function key, a ball hitting mode 3 function key, and a ball hitting mode 4 function key, and when a player triggers a virtual ball 1 in the game interface to start moving, the player may select a corresponding ball hitting mode by clicking the ball hitting mode function key, and may adjust a position of a contact point 3 between a virtual ball 2 and the virtual ball 1 by dragging on a touch screen to select a position of a ball hitting point of a heart instrument, so as to control subsequent movement of the virtual ball 1 on a virtual plane 4 by the selected ball hitting mode and the position of the ball hitting point.
And S102, determining the speed weight value of the virtual sphere according to the trigger operation information.
In the same virtual ball game, different trigger operation information can correspond to different speed weight values. In addition, in specific implementation, the trigger operation information may be matched with the speed weight value to establish a corresponding relationship between the trigger operation information and the speed weight value, and the terminal may query to obtain the corresponding speed weight value based on the corresponding relationship when receiving the trigger operation information.
In this embodiment, the speed weight value may be used to represent a ratio between a rotation speed and a linear speed when the ball starts to move, and the speed weight value is only related to the trigger operation information when the player triggers the virtual ball to start moving, that is, only related to the ball hitting operation of the player, and is not related to the linear speed when the virtual ball starts to move. Therefore, when the movement of the ball body is simulated, the speed weight value is introduced, so that the movement of the virtual ball body is controlled by one more dimension in the game, different influences of different batting operations of a player on the subsequent movement of the virtual ball body can be reflected, and the subsequent sense of reality of the ball body movement simulation is further enhanced.
Specifically, different hitting operations for the above players can be distinguished by changing the magnitude of the velocity weight value. In one embodiment, when it is predefined that the rotation speed at the time of starting the movement of the virtual sphere is not greater than the linear velocity, the value range of the velocity weight value may be [ -1, 1], where if the velocity weight value is a negative value, it indicates that the rotation speed and the linear velocity direction at the time of starting the movement of the virtual sphere are opposite, if the velocity weight value is a positive value, it indicates that the rotation speed and the linear velocity direction at the time of starting the movement of the virtual sphere are the same, further, if the velocity weight value is 1, it indicates that the rotation speed and the linear velocity direction at the time of starting the movement of the virtual sphere are the same and equal, and if the velocity weight value is 0, it indicates that the rotation speed at the time of starting the movement of the virtual sphere is 0. In some alternative embodiments, when it is not limited that the rotation speed at which the virtual sphere starts to move is not greater than the linear speed, the boundary value of the range of the velocity weight value may also be a value having an absolute value greater than 1, for example, may be [ -5, 5 ].
In this embodiment, the direction of the rotation speed may be a rolling direction when the virtual sphere performs a rolling motion at the rotation speed, and the ratio between the rotation speed and the linear velocity may be calculated after converting the units of the rotation speed and the linear velocity into the same, where the conversion relationship is v ═ 2 pi nr, where v is the linear velocity, n is the rotation speed, and r is the radius. Further, in order to reduce the subsequent operation amount for simulating the ball movement, the direction of the rotation speed during the virtual ball movement may be predefined as the same as or opposite to the direction of the linear velocity, that is, if the direction of the linear velocity during the virtual ball movement is forward, the direction of the rotation speed during the virtual ball movement may only be forward or backward, but not be other directions such as left or right. Therefore, the rotation speed in the virtual sphere movement process is concerned, and the direction of the rotation speed is simplified, so that the accuracy of subsequent simulation of the sphere movement can be met, and the calculation amount can be reduced.
S103, determining the motion parameters of the virtual sphere in the motion process according to the speed weight value.
As shown in fig. 4, the motion parameters may specifically include a speed parameter and an acceleration parameter, and the S103 may specifically include:
and S1031, determining at least one motion mode of the virtual sphere in the motion process according to the speed weight value.
Specifically, the movement modes involved from the start movement to the complete stop movement of the virtual sphere at most can include three movement modes of bouncing in the air, sliding and rolling on a virtual plane and pure rolling, and during the movement of the real sphere, the bouncing movement of the real sphere in the air occurs before the sliding and rolling movement on the virtual plane, and the sliding and rolling movement on the virtual plane occurs before the pure rolling movement on the virtual plane.
In this embodiment, in order to reduce the subsequent computation amount for simulating the ball motion, it may be considered that the virtual ball is only subjected to the gravity action when performing the bouncing motion in the air, and the linear velocity component in the height direction is attenuated according to a preset proportion each time the virtual ball touches the ground (i.e., contacts the virtual plane), and is zeroed when the linear velocity component in the height direction is smaller than a preset threshold, and then the virtual ball is considered to subsequently only move on the virtual plane. Furthermore, it can be understood that the rotation speed and the linear velocity component in the horizontal direction of the virtual sphere are not affected when the virtual sphere performs bouncing movement in the air, and at least one movement mode of the virtual sphere during movement can be understood as a movement mode involved in the movement of the virtual sphere from the start to the complete stop of the movement.
In a specific embodiment, the S1031 may specifically include:
and S1-1, when the speed weight value is a preset value, determining that the movement mode of the virtual sphere in the movement process comprises pure rolling.
For example, the preset value may be 1, that is, when the ratio of the rotation speed to the linear speed when the virtual sphere starts to move is 1, the terminal may determine that the movement manner of the virtual sphere during the movement process includes pure rolling, and accordingly, the virtual sphere only performs rolling movement on a virtual plane subsequently.
And S1-2, when the speed weight value is not a preset value, determining the movement modes of the virtual sphere in the movement process, including sliding and rolling, and pure rolling.
In the above example, when the rate weight value is not equal to 1, that is, the rotation speed and the linear speed of the virtual sphere when the virtual sphere starts to move are different in at least one of magnitude and direction, the terminal may determine that the movement modes of the virtual sphere during the movement include sliding and rolling, and pure rolling, and accordingly, the virtual sphere may subsequently perform sliding movement and rolling movement simultaneously on the virtual plane, and then perform only rolling movement on the virtual plane.
S1032, determining an initial speed parameter of the virtual sphere.
In an embodiment, as shown in fig. 5, when the movement mode of the virtual sphere during the movement includes sliding and rolling, and pure rolling, the initial speed parameter may include an initial sliding linear speed parameter, an initial rotation speed parameter, and an initial rolling linear speed parameter, and the S1032 may specifically include:
s11, obtaining initial sliding linear speed parameters of the virtual sphere.
Specifically, with reference to fig. 3, a hitting power control bar may be further included in the game interface of the virtual ball game, and when the player triggers the virtual ball in the game interface to start moving, the player may drag the hitting power control bar through the touch screen to adjust a hitting power, so as to control a subsequent movement of the virtual ball through the selected hitting power.
Accordingly, the S11 may specifically include: the method comprises the steps of receiving batting strength information when a player triggers a virtual ball to start moving, and determining a corresponding initial sliding linear velocity parameter according to the batting strength information, wherein the larger the batting strength selected by the player when the player triggers the virtual ball in a game interface to start moving is, the larger the initial sliding linear velocity corresponding to the virtual ball is.
In some alternative embodiments, the S11 may specifically include:
s2-1-1, receiving the input motion trajectory line through the game interface.
Specifically, as shown in fig. 6, when the player triggers the virtual sphere 1 in the game interface to start moving, the motion trajectory Line of the virtual sphere 1 may also be drawn on the game interface through a touch screen manner, so that the virtual sphere 1 may subsequently move along the motion trajectory Line.
S2-1-2, determining the movement displacement of the virtual sphere based on the movement trajectory line.
Specifically, the movement displacement of the virtual sphere may be equal to the length of the movement trajectory line, and the movement trajectory line may be a straight line segment.
And S2-1-2, determining an initial sliding linear velocity parameter of the virtual sphere according to the velocity weight value, the motion displacement and the preset motion duration.
In particular, the terminal can be obtained by solving the equation Ax2And + Bx + C is 0 to obtain the initial sliding linear velocity parameter of the virtual sphere, wherein:
A=[(1-k)2*(a1-a2)]/(2*a12);
B=[a1*T*k+a2*T*(1-k)]/a1;
C=-0.5*a2*T2-L;
k=Vpc+Sr-Vpc*Sr;
wherein Sr is a velocity weight value, L is a motion displacement, T is a motion duration, Vpc is a preset critical velocity ratio value, a1 is a preset sliding acceleration parameter, a2 is a preset rolling acceleration parameter, and a positive solution obtained by solving the equation is an initial sliding linear velocity parameter of the virtual sphere.
And S12, determining an initial rotation speed parameter of the virtual sphere according to the initial sliding linear speed parameter and the speed weight value.
Specifically, the speed weight value is used to represent a ratio between a rotation speed and a linear speed when the virtual sphere starts to move, and accordingly, the initial rotation speed parameter may be a product of the initial sliding linear speed parameter and the speed weight value.
And S13, determining an initial rolling linear velocity parameter of the virtual sphere according to the initial sliding linear velocity parameter, the velocity weight value and a preset critical velocity proportion value.
In this embodiment, the initial sliding linear velocity parameter is used to represent a linear velocity when the virtual sphere starts to slide and roll on a virtual plane, the initial rotation speed parameter is used to represent a rotation speed when the virtual sphere starts to slide and roll on the virtual plane, and the initial rolling linear velocity parameter is used to represent a linear velocity when the virtual sphere starts to perform pure rolling on the virtual plane. The critical speed ratio value (e.g., 0.45) is used to determine a linear speed boundary value of the two motion modes, i.e., sliding and rolling and pure rolling, and can be obtained by optimizing a motion simulation effect through experiments performed by research and development personnel.
In specific implementation, the terminal may calculate the initial sliding linear velocity parameter of the virtual sphere through a preset calculation formula 1, where the calculation formula 1 may be as follows:
v1=(Vpc+Sr-Vpc*Sr)*v0;
wherein v1 is the initial rolling linear velocity parameter, Vpc is the critical velocity ratio value, Sr is the velocity weight value, and v0 is the initial sliding linear velocity parameter.
S1033, determining a speed parameter and an acceleration parameter corresponding to each motion mode according to the initial speed parameter.
Specifically, with continued reference to fig. 5, the above S1033 may specifically include:
s14, determining a first acceleration parameter corresponding to sliding and rolling according to the initial rolling linear speed parameter, the initial rotating speed parameter, the initial sliding linear speed parameter and a preset sliding acceleration parameter.
The terminal may calculate the first acceleration parameter by using a calculation formula 2, where the calculation formula 2 may be as follows:
a3=(v2-v1)/(v0-v1)*a1;
wherein a3 is a first acceleration parameter, v0 is an initial sliding linear velocity parameter, v1 is an initial rolling linear velocity parameter, v2 is an initial rotation velocity parameter, and a1 is a sliding acceleration parameter.
And S15, determining a first speed parameter corresponding to sliding and rolling according to the initial sliding linear speed parameter, the sliding acceleration parameter, the initial rotating speed parameter and the first acceleration parameter.
Specifically, the terminal may calculate the linear sliding velocity parameter by using a calculation formula 3, that is, v 11-v 0-a1 × t1, and may calculate the first rotational speed parameter by using a calculation formula 4, that is, v 12-v 2-a3 × t1, where v11 is the linear sliding velocity parameter, v0 is the initial linear sliding velocity parameter, a1 is the sliding acceleration parameter, v12 is the first rotational speed parameter, v2 is the initial rotational speed parameter, a3 is the first acceleration parameter, and t1 is the real-time movement time length when the virtual sphere performs sliding and rolling movement.
And S16, taking the preset rolling acceleration parameter as a second acceleration parameter corresponding to pure rolling, and determining a second speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the second acceleration parameter.
Specifically, the terminal may calculate the first rolling linear velocity parameter and the second rotational velocity parameter by using a calculation formula 5, that is, v 21-v 22-v 1-a 2-t 2, where v21 is the first rolling linear velocity parameter, v22 is the second rotational velocity parameter, v1 is the initial rolling linear velocity parameter, a2 is the rolling acceleration parameter, and t2 is the real-time movement duration when the virtual sphere performs pure rolling movement.
In another embodiment, with continuing reference to fig. 5, when the movement manner of the virtual sphere during the movement process includes pure scrolling, the initial speed parameter may include an initial scrolling line speed parameter, and the S1032 may specifically include:
s21, acquiring initial rolling linear speed parameters of the virtual sphere.
Specifically, with reference to fig. 3, a hitting power control bar may be further included in the game interface of the virtual ball game, and when the player triggers the virtual ball in the game interface to start moving, the player may drag the hitting power control bar through the touch screen to adjust a hitting power, so as to control a subsequent movement of the virtual ball through the selected hitting power. Accordingly, the S21 may specifically include: the method comprises the steps of receiving batting strength information when a player triggers a virtual ball to start moving, and determining a corresponding initial rolling linear velocity parameter according to the batting strength information, wherein the larger the batting strength selected by the player when the player triggers the virtual ball in a game interface to start moving is, the larger the initial rolling linear velocity corresponding to the virtual ball is.
In some alternative embodiments, the S21 may specifically include: when the player is detected to input the motion trajectory line on the game interface, determining the motion displacement of the virtual sphere based on the motion trajectory line; and determining an initial rolling linear speed parameter of the virtual sphere according to the speed weight value, the movement displacement and the preset movement duration. The movement displacement of the virtual sphere may be equal to the length of the movement trajectory, and the movement trajectory may be a straight line segment, and in the specific implementation, the terminal may be calculated according to formula 6, that is, v1 ═ L-1/2 a 2T2) and/T, calculating to obtain the initial rolling linear velocity parameter, wherein v 1' is the initial rolling linear velocity parameter, L is the movement displacement, T is the movement duration, and a2 is a preset rolling acceleration parameter.
Further, the S1033 may further include:
s22, taking the preset rolling acceleration parameter as a third acceleration parameter corresponding to pure rolling, and determining a third speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the third acceleration parameter.
Specifically, the terminal may calculate the second rolling linear velocity parameter and the third rotational velocity parameter by using a calculation formula 7, that is, v 31-v 32-v 1 '-a 2 × t3, where v31 is the second rolling linear velocity parameter, v32 is the third rotational velocity parameter, v 1' is the initial rolling linear velocity parameter, a2 is a preset rolling acceleration parameter, and t3 is a real-time movement duration when the virtual sphere performs pure rolling movement.
And S104, controlling the movement of the virtual sphere according to the movement parameters.
Although the real world ball is simultaneously subjected to the sliding friction force and the rolling friction force when sliding and rolling, in the embodiment, in order to reduce the amount of operation for simulating the virtual ball motion, since the sliding friction force is large, only the influence of the sliding friction force on the sliding linear velocity of the virtual ball motion is considered in the sliding and rolling process of the virtual ball.
Specifically, the preset sliding acceleration parameter may be understood as an acceleration generated by a sliding friction force acting on the virtual sphere, and when the virtual sphere slides and rolls, if the sliding linear velocity of the virtual sphere is greater than the rotation speed, the sliding linear velocity of the virtual sphere is affected by the sliding friction force and is reduced by the sliding acceleration parameter, and the rotation speed is increased by the first acceleration parameter in the direction of the sliding linear velocity, and if the sliding linear velocity of the virtual sphere is smaller than the rotation speed, the sliding linear velocity of the virtual sphere is affected by the sliding friction force and is increased by the sliding acceleration parameter, and the rotation speed is reduced by the first acceleration parameter in the direction of the sliding linear velocity.
Then, when the sliding linear velocity and the rotating speed of the virtual sphere are equal in magnitude and same in direction, the movement mode of the virtual sphere is switched from sliding and rolling to pure rolling, and when the virtual sphere performs pure rolling movement, the rolling linear velocity and the rotating speed in the movement process of the virtual sphere are the same at all times and are influenced by rolling friction force to be reduced together by a preset rolling acceleration parameter, wherein the rolling acceleration parameter can be understood as acceleration generated by the rolling friction force acting on the virtual sphere.
In the present embodiment, the rolling acceleration parameter and the sliding acceleration parameter are fixed values, for example, may be 7m/s respectively2And 1.5m/s2The first acceleration parameter is not related to the hitting operation of the player, and can be determined by referring to the sliding friction force and the rolling friction force which are applied to the ball in the real world when the ball performs the sliding motion and the rolling motion.
In this way, since the friction does not need to be completely simulated, the computation amount is greatly reduced, so that the method for controlling the sphere motion in the above embodiment can be applied to the mobile terminal. Meanwhile, although the calculation method is simplified, the motion and the rotation of the virtual sphere are integrally in accordance with the physical law and the operation of the player, so that the entertainment of the game and the immersion of the player can be ensured.
In an embodiment, with continuing reference to fig. 5, when the movement manner of the virtual sphere during the movement process includes sliding and rolling, and pure rolling, the initial speed parameter may specifically include an initial sliding linear speed parameter, an initial rotation speed parameter, and an initial rolling linear speed parameter, and the S104 may specifically include:
and S17, controlling the virtual sphere to slide and roll by using the first speed parameter and the first acceleration parameter.
Specifically, the first speed parameter may include a sliding linear speed parameter and a first rotation speed parameter, and the S17 may specifically include: and controlling the virtual sphere to perform sliding motion by using the sliding linear velocity parameter and the sliding acceleration parameter, and controlling the virtual sphere to perform rolling motion by using the first rotation speed parameter and the first acceleration parameter, so that the simulation of sliding and rolling motion of the virtual sphere is realized.
And S18, in the sliding and rolling movement process, when the sliding linear speed of the virtual sphere is equal to the initial rolling linear speed parameter, controlling the virtual sphere to perform pure rolling movement according to a second speed parameter and a second acceleration parameter.
Specifically, during the sliding and rolling motion, when the sliding linear velocity parameter and the first rotational velocity parameter of the virtual sphere are equal in size and same in direction, the terminal may switch the motion mode of the virtual sphere from sliding and rolling to pure rolling, and when the virtual sphere performs pure rolling motion, the first rolling linear velocity parameter and the second rotational velocity parameter of the virtual sphere during the pure rolling motion may be always the same and decrease with the second acceleration parameter.
For example, if the initial sliding linear velocity parameter V0 is 10m/s, the velocity weight Sr is 0.4, and the calculated initial rolling linear velocity V1 is 6.7m/s, a schematic diagram of the linear velocity (including the sliding linear velocity in the sliding and rolling motion phase and the rolling linear velocity in the pure rolling motion phase) and the change of the rotational velocity with the motion duration t of the virtual sphere in the two motion phases of sliding and rolling and pure rolling may be as shown in fig. 7, where a short dashed line represents the linear velocity change curve, a long dashed line represents the rotational velocity change curve, and in the sliding and rolling motion phase (0 to t1), the sliding linear velocity of the virtual sphere gradually decreases and the rotational velocity gradually increases, and when the two are equal, the virtual sphere enters the pure rolling motion phase (t1 to t2), and the changes of the two are kept consistent.
In another embodiment, when the movement mode of the virtual sphere in the movement process includes pure scrolling, the initial speed parameter may specifically include an initial scrolling linear speed parameter, and the S104 may further include:
and S23, controlling the virtual sphere to perform pure rolling motion according to the third speed parameter and the third acceleration parameter.
The third speed parameter may specifically include a second rolling linear speed parameter and a third rotation speed parameter, and specifically, in the pure rolling motion process, the second rolling linear speed parameter and the third rotation speed parameter of the virtual sphere are always the same and are reduced by the third acceleration parameter.
For example, if the weight value Sr is 1.0, and the initial rolling linear velocity parameter V1 and the initial rotation speed V2 are both 10m/s, a schematic diagram of the linear velocity (i.e., the rolling linear velocity) and the rotation speed of the virtual sphere changing with the movement time length t may be as shown in fig. 8, where a short dotted line represents a linear velocity change curve, a long dotted line represents a rotation speed change curve, and when both of the entire movement stages (0 to t3) of the virtual sphere are always overlapped, it indicates that the virtual sphere only performs the pure rolling movement.
In the above embodiment, the above S12 and S13 may be performed synchronously, and there is no sequence therebetween, and similarly, the above S14 and S15 and the above S16 may also be performed simultaneously, that is, the above S16 may be performed simultaneously during the execution of S14 and S15.
As can be seen from the above, in the method for controlling sphere movement provided in this embodiment, the trigger operation information when the virtual sphere starts to move is received, the speed weight value of the virtual sphere is determined according to the trigger operation information, the movement parameter of the virtual sphere in the movement process is determined according to the speed weight value, and the movement of the virtual sphere is controlled according to the movement parameter, so that when the sphere movement is simulated, the movement parameter of the sphere at any time from the start of movement to the stop of movement can be accurately calculated, the calculation amount is within the bearable range of the mobile terminal, and the calculation result is unique and determined, thereby improving the accuracy and efficiency of simulation.
On the basis of the method described in the above embodiment, the present embodiment will be further described from the perspective of a control device for sphere movement, please refer to fig. 9, and fig. 9 specifically describes the control device for sphere movement provided in the present embodiment, which may include: a receiving module 301, a first determining module 302, a second determining module 303, and a control module 304, wherein:
(1) receiving module 301
The receiving module 301 is configured to receive trigger operation information when the virtual sphere starts to move.
(2) First determination module 302
The first determining module 302 is configured to determine a velocity weight value of the virtual sphere according to the trigger operation information.
(3) Second determination module 303
And the second determining module 303 is configured to determine a motion parameter of the virtual sphere in the motion process according to the velocity weight value.
The motion parameters may specifically include a speed parameter and an acceleration parameter, and the second determining module 303 may specifically include:
the first determining unit is used for determining at least one motion mode of the virtual sphere in the motion process according to the speed weight value;
the second determining unit is used for determining the initial speed parameter of the virtual sphere;
and the third determining unit is used for determining the speed parameter and the acceleration parameter corresponding to each motion mode according to the initial speed parameter.
In a specific embodiment, the first determining unit may be specifically configured to:
when the speed weight value is a preset value, determining that the movement mode of the virtual sphere in the movement process comprises pure rolling;
when the speed weight value is not a preset value, determining the movement modes of the virtual sphere in the movement process to comprise sliding and rolling and pure rolling.
In an embodiment, when the movement mode of the virtual sphere in the movement process includes sliding and rolling, and pure rolling, the initial speed parameter may include an initial sliding linear speed parameter, an initial rotation speed parameter, and an initial rolling linear speed parameter, and the second determining unit may specifically include:
the acquisition subunit is used for acquiring an initial sliding linear velocity parameter of the virtual sphere;
the first determining subunit is used for determining an initial rotation speed parameter of the virtual sphere according to the initial sliding linear speed parameter and the speed weight value;
and the second determining subunit is used for determining the initial rolling linear velocity parameter of the virtual sphere according to the initial sliding linear velocity parameter, the velocity weight value and a preset critical velocity proportion value.
Specifically, the obtaining subunit may be specifically configured to:
receiving an input motion trajectory line through the game interface;
determining a movement displacement of the virtual sphere based on the movement trajectory line;
and determining an initial sliding linear velocity parameter of the virtual sphere according to the velocity weight value, the movement displacement and the preset movement duration.
Further, the third determining unit may specifically include:
the third determining subunit is used for determining a first acceleration parameter corresponding to sliding and rolling according to the initial rolling linear velocity parameter, the initial rotation speed parameter, the initial sliding linear velocity parameter and a preset sliding acceleration parameter;
the fourth determining subunit is used for determining the first speed parameter corresponding to sliding and rolling according to the initial sliding linear speed parameter, the sliding acceleration parameter, the initial rotating speed parameter and the first acceleration parameter;
and the fifth determining subunit is used for taking the preset rolling acceleration parameter as a second acceleration parameter corresponding to pure rolling, and determining a second speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the second acceleration parameter.
In another embodiment, when the movement mode of the virtual sphere in the movement process includes pure scrolling, the initial speed parameter may include an initial scrolling linear speed parameter, and the second determining unit may be specifically configured to:
and acquiring initial rolling linear speed parameters of the virtual sphere.
Further, the third determining unit specifically includes:
and the sixth determining subunit is configured to use the preset rolling acceleration parameter as a third acceleration parameter corresponding to pure rolling, and determine the third speed parameter corresponding to pure rolling according to the initial rolling linear speed parameter and the third acceleration parameter.
(4) Control module 304
And a control module 304 for controlling the movement of the virtual sphere according to the movement parameters.
In an embodiment, when the movement modes of the virtual sphere during the movement process include sliding and rolling, and pure rolling, the control module 304 may be specifically configured to:
controlling the virtual sphere to slide and roll according to the first speed parameter and the first acceleration parameter;
and in the sliding and rolling movement process, when the sliding linear speed of the virtual sphere is equal to the initial rolling linear speed parameter, controlling the virtual sphere to perform pure rolling movement by using the second speed parameter and the second acceleration parameter.
In another embodiment, when the movement manner of the virtual sphere during the movement process includes pure scrolling, the control module 304 may be specifically configured to:
and controlling the virtual sphere to perform pure rolling motion according to the third speed parameter and the third acceleration parameter.
As can be seen from the above, the control device for sphere movement provided by this embodiment includes a receiving module, configured to receive trigger operation information when the virtual sphere starts to move; the first determining module is used for determining the speed weight value of the virtual sphere according to the trigger operation information; the second determining module is used for determining the motion parameters of the virtual sphere in the motion process according to the speed weight value; the control module is used for controlling the movement of the virtual sphere according to the movement parameters, so that the movement parameters of the sphere at any moment from the beginning of movement to the stopping of movement can be accurately calculated when the movement of the sphere is simulated, the calculation amount is within the range which can be borne by the mobile terminal, the calculation result is unique and determined, and the simulation accuracy and efficiency are improved.
Correspondingly, the embodiment of the present application further provides a computer device, where the computer device may be a terminal or a server, and the terminal may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game machine, a Personal computer, and a Personal Digital Assistant (PDA). As shown in fig. 10, fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer apparatus 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 401 is a control center of the computer device 400, connects the respective parts of the entire computer device 400 using various interfaces and lines, performs various functions of the computer device 400 and processes data by running or loading software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device 400 as a whole.
In the embodiment of the present application, the processor 401 in the computer device 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions:
receiving trigger operation information when the virtual sphere starts to move;
determining a speed weight value of the virtual sphere according to the trigger operation information;
determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and controlling the movement of the virtual sphere according to the movement parameters.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 10, the computer device 400 further includes: touch-sensitive display screen 403, radio frequency circuit 404, audio circuit 405, input unit 406 and power 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power source 407. Those skilled in the art will appreciate that the computer device architecture illustrated in FIG. 10 is not intended to be limiting of computer devices and may include more or less components than those illustrated, or combinations of certain components, or different arrangements of components.
The touch display screen 403 may be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 401, and can receive and execute commands sent by the processor 401. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel may transmit the touch operation to the processor 401 to determine the type of the touch event, and then the processor 401 may provide a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display screen 403 may also be used as a part of the input unit 406 to implement an input function.
In this embodiment of the application, a game application is executed by the processor 401 to generate a picture of a virtual three-dimensional scene on the touch display screen 403, where the picture includes a graphical user interface (UI interface), the graphical user interface includes a second spatial orientation indicator, a spatial orientation identifier corresponding to a target object is displayed on the second spatial orientation indicator, and the spatial orientation identifier is used to indicate an orientation where the target object is located.
The touch display screen 403 may be used for presenting a picture of a virtual three-dimensional scene, a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface.
The rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other computer device via wireless communication, and for transceiving signals with the network device or other computer device.
The audio circuit 405 may be used to provide an audio interface between a user and a computer device through speakers, microphones. The audio circuit 405 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, which is then processed by the audio data output processor 401, and then sent to, for example, another computer device via the radio frequency circuit 404, or output to the memory 402 for further processing. The audio circuit 405 may also include an earbud jack to provide communication of a peripheral headset with the computer device.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the computer device 400. Optionally, the power source 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 407 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, or any other component.
Although not shown in fig. 10, the computer device 400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
From the above, the computer device provided by the embodiment can improve the accuracy and efficiency of the control method of the sphere motion.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, where the computer programs can be loaded by a processor to execute the steps in any one of the methods for controlling the movement of a sphere provided by the embodiments of the present application. For example, the computer program may perform the steps of:
receiving trigger operation information when the virtual sphere starts to move;
determining a speed weight value of the virtual sphere according to the trigger operation information;
determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and controlling the movement of the virtual sphere according to the movement parameters.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any method for controlling a spherical motion provided in the embodiments of the present application, the beneficial effects that can be achieved by any method for controlling a spherical motion provided in the embodiments of the present application can be achieved, and the detailed description is omitted here for the sake of detail in the foregoing embodiments.
The method, the apparatus, the storage medium, and the computer device for controlling the spherical motion provided by the embodiments of the present application are described in detail above, and a specific example is applied to illustrate the principle and the implementation of the present application, and the description of the embodiments above is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A method of controlling ball movement, comprising:
receiving trigger operation information when the virtual sphere starts to move;
determining a speed weight value of the virtual sphere according to the trigger operation information;
determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and controlling the movement of the virtual sphere according to the movement parameters.
2. The method for controlling sphere movement according to claim 1, wherein the movement parameters include a speed parameter and an acceleration parameter, and the determining the movement parameters of the virtual sphere in the movement process according to the speed weight value specifically includes:
determining at least one motion mode of the virtual sphere in the motion process according to the speed weight value;
determining an initial velocity parameter of the virtual sphere;
and determining a speed parameter and an acceleration parameter corresponding to each motion mode according to the initial speed parameter.
3. The method for controlling sphere movement according to claim 2, wherein the determining at least one movement mode of the virtual sphere in the movement process according to the velocity weight value specifically includes:
when the speed weight value is a preset value, determining that the movement mode of the virtual sphere in the movement process comprises pure rolling;
and when the speed weight value is not the preset value, determining that the movement modes of the virtual sphere in the movement process comprise sliding and rolling and pure rolling.
4. The method for controlling the movement of the ball according to claim 2, wherein when the movement modes include sliding and rolling and pure rolling, the initial speed parameters include an initial sliding linear speed parameter, an initial rotation speed parameter and an initial rolling linear speed parameter, and the determining the initial speed parameter of the virtual ball specifically includes:
acquiring an initial sliding linear velocity parameter of the virtual sphere;
determining an initial rotation speed parameter of the virtual sphere according to the initial sliding linear speed parameter and the speed weight value;
and determining an initial rolling linear velocity parameter of the virtual sphere according to the initial sliding linear velocity parameter, the velocity weight value and a preset critical velocity proportion value.
5. The method for controlling movement of a sphere according to claim 4, wherein the determining a speed parameter and an acceleration parameter corresponding to each of the movement modes according to the initial speed parameter specifically comprises:
determining a first acceleration parameter corresponding to the sliding and rolling according to the initial rolling linear velocity parameter, the initial rotation speed parameter, the initial sliding linear velocity parameter and a preset sliding acceleration parameter;
determining a first speed parameter corresponding to the sliding and rolling according to the initial sliding linear speed parameter, the sliding acceleration parameter, the initial rotation speed parameter and the first acceleration parameter;
and taking a preset rolling acceleration parameter as a second acceleration parameter corresponding to the pure rolling, and determining a second speed parameter corresponding to the pure rolling according to the initial rolling linear speed parameter and the second acceleration parameter.
6. The method for controlling the movement of the sphere according to claim 5, wherein the controlling the movement of the virtual sphere according to the movement parameter specifically comprises:
controlling the virtual sphere to slide and roll according to the first speed parameter and the first acceleration parameter;
and in the sliding and rolling movement process, when the sliding linear speed of the virtual sphere is equal to the initial rolling linear speed parameter, controlling the virtual sphere to perform pure rolling movement according to the second speed parameter and the second acceleration parameter.
7. The method for controlling the movement of a sphere according to claim 4, wherein the obtaining of the initial sliding linear velocity parameter of the virtual sphere specifically comprises:
receiving an input motion trajectory line through the game interface;
determining a motion displacement of the virtual sphere based on the motion trajectory line;
and determining an initial sliding linear velocity parameter of the virtual sphere according to the velocity weight value, the movement displacement and a preset movement duration.
8. The method for controlling ball movement according to claim 2, wherein when the movement pattern includes pure scrolling, the initial speed parameter includes an initial scrolling linear speed parameter, and the determining the speed parameter and the acceleration parameter corresponding to each movement pattern according to the initial speed parameter specifically includes:
taking a preset rolling acceleration parameter as a third acceleration parameter corresponding to the pure rolling, and determining a third speed parameter corresponding to the pure rolling according to the initial rolling linear speed parameter and the third acceleration parameter;
the controlling the motion of the virtual sphere according to the motion parameter specifically includes:
and controlling the virtual sphere to perform pure rolling motion according to the third speed parameter and the third acceleration parameter.
9. A control device for ball movement, comprising:
the receiving module is used for receiving trigger operation information when the virtual sphere starts to move;
the first determining module is used for determining the speed weight value of the virtual sphere according to the trigger operation information;
the second determining module is used for determining the motion parameters of the virtual sphere in the motion process according to the speed weight value;
and the control module is used for controlling the movement of the virtual sphere according to the movement parameters.
10. A computer-readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor for performing the steps of the method of controlling the movement of a sphere according to any one of claims 1-8.
11. A computer device, characterized in that the computer device comprises a memory in which a computer program is stored and a processor that executes the steps in the method of controlling the movement of a sphere according to any one of claims 1-8 by calling the computer program stored in the memory.
CN202011103230.2A 2020-10-15 2020-10-15 Sphere motion control method and device, storage medium and computer equipment Active CN112169338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011103230.2A CN112169338B (en) 2020-10-15 2020-10-15 Sphere motion control method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011103230.2A CN112169338B (en) 2020-10-15 2020-10-15 Sphere motion control method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN112169338A true CN112169338A (en) 2021-01-05
CN112169338B CN112169338B (en) 2024-06-11

Family

ID=73949610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011103230.2A Active CN112169338B (en) 2020-10-15 2020-10-15 Sphere motion control method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN112169338B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113713382A (en) * 2021-09-10 2021-11-30 腾讯科技(深圳)有限公司 Virtual prop control method and device, computer equipment and storage medium
CN117180752A (en) * 2023-11-07 2023-12-08 北京格如灵科技有限公司 Method, device, computer equipment and medium for controlling movement of control object model

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1876211A (en) * 2001-05-21 2006-12-13 世嘉股份有限公司 Image processing apparatus and game apparatus
US20100001952A1 (en) * 2008-07-03 2010-01-07 Nintendo Co., Ltd. Storage medium storing information processing program, information processing apparatus and information processing method
US20180104573A1 (en) * 2016-10-17 2018-04-19 Aquimo, Llc Method and system for using sensors of a control device for control of a game
CN109173249A (en) * 2018-08-27 2019-01-11 广州要玩娱乐网络技术股份有限公司 Virtual passing method, computer storage medium and terminal
KR20190038730A (en) * 2017-09-29 2019-04-09 주식회사 파이브브릭스 Apparatus, method and computer for controlling a virtual cricket game
CN109758760A (en) * 2018-12-06 2019-05-17 网易(杭州)网络有限公司 Shooting control method, apparatus, computer equipment and storage medium in football game
KR102009271B1 (en) * 2018-03-19 2019-08-14 (주)에스엔 Smart stick and terminal for virtual reality game
CN110694273A (en) * 2019-10-18 2020-01-17 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for controlling virtual object to use prop
CN111249719A (en) * 2020-01-20 2020-06-09 腾讯科技(深圳)有限公司 Track prompting method and device, storage medium and electronic device
CN111494927A (en) * 2020-04-20 2020-08-07 张洋 Maze with haptic feedback and method of generating maze haptic feedback

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1876211A (en) * 2001-05-21 2006-12-13 世嘉股份有限公司 Image processing apparatus and game apparatus
US20100001952A1 (en) * 2008-07-03 2010-01-07 Nintendo Co., Ltd. Storage medium storing information processing program, information processing apparatus and information processing method
US20180104573A1 (en) * 2016-10-17 2018-04-19 Aquimo, Llc Method and system for using sensors of a control device for control of a game
CN110382064A (en) * 2016-10-17 2019-10-25 阿奎默有限公司 The method and system of game is controlled for using the sensor of control device
KR20190038730A (en) * 2017-09-29 2019-04-09 주식회사 파이브브릭스 Apparatus, method and computer for controlling a virtual cricket game
KR102009271B1 (en) * 2018-03-19 2019-08-14 (주)에스엔 Smart stick and terminal for virtual reality game
CN109173249A (en) * 2018-08-27 2019-01-11 广州要玩娱乐网络技术股份有限公司 Virtual passing method, computer storage medium and terminal
CN109758760A (en) * 2018-12-06 2019-05-17 网易(杭州)网络有限公司 Shooting control method, apparatus, computer equipment and storage medium in football game
CN110694273A (en) * 2019-10-18 2020-01-17 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for controlling virtual object to use prop
CN111249719A (en) * 2020-01-20 2020-06-09 腾讯科技(深圳)有限公司 Track prompting method and device, storage medium and electronic device
CN111494927A (en) * 2020-04-20 2020-08-07 张洋 Maze with haptic feedback and method of generating maze haptic feedback

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
季云峰;施之皓;任杰;王朝立;: "基于单目视觉伺服系统的高速旋转球体三维速度测定", 中国体育科技, no. 02, 15 March 2017 (2017-03-15) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113713382A (en) * 2021-09-10 2021-11-30 腾讯科技(深圳)有限公司 Virtual prop control method and device, computer equipment and storage medium
CN113713382B (en) * 2021-09-10 2023-06-16 腾讯科技(深圳)有限公司 Virtual prop control method and device, computer equipment and storage medium
CN117180752A (en) * 2023-11-07 2023-12-08 北京格如灵科技有限公司 Method, device, computer equipment and medium for controlling movement of control object model
CN117180752B (en) * 2023-11-07 2024-01-26 北京格如灵科技有限公司 Method, device, computer equipment and medium for controlling movement of control object model

Also Published As

Publication number Publication date
CN112169338B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
WO2019153824A1 (en) Virtual object control method, device, computer apparatus, and storage medium
JP2023162233A (en) Virtual object control method and apparatus, terminal, and storage medium
US20150199030A1 (en) Hover-Sensitive Control Of Secondary Display
CN112587925B (en) Guide information display method and device, storage medium and computer equipment
EP3107632A1 (en) Advanced game mechanics on hover-sensitive devices
CN112169338B (en) Sphere motion control method and device, storage medium and computer equipment
CN113559518A (en) Interaction detection method and device of virtual model, electronic equipment and storage medium
CN113398590A (en) Sound processing method, sound processing device, computer equipment and storage medium
CN113546419A (en) Game map display method, device, terminal and storage medium
CN114782605A (en) Rendering method and device of hair virtual model, computer equipment and storage medium
CN112843719A (en) Skill processing method, skill processing device, storage medium and computer equipment
CN116212381A (en) Shooting operation method and device in game, electronic equipment and storage medium
WO2024045528A1 (en) Game control method and apparatus, and computer device and storage medium
WO2023246166A1 (en) Method and apparatus for adjusting video progress, and computer device and storage medium
CN117111742A (en) Image interaction method and device, electronic equipment and storage medium
CN108829329B (en) Operation object display method and device and readable medium
CN115920385A (en) Game signal feedback method and device, electronic equipment and readable storage medium
CN115193046A (en) Game display control method and device, computer equipment and storage medium
CN115999153A (en) Virtual character control method and device, storage medium and terminal equipment
CN112245914B (en) Viewing angle adjusting method and device, storage medium and computer equipment
CN115040867A (en) Game card control method and device, computer equipment and storage medium
CN113521725B (en) Pattern effect display method, storage medium and computer device
WO2024152504A1 (en) Game interaction method and apparatus, and computer device and storage medium
CN116351059A (en) Non-player character control method, device, computer equipment and storage medium
CN115068936A (en) Animation playing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant