Object control method, system and equipment based on virtual rocker and storage medium

By obtaining the target coordinate points in the virtual rocker control system, determining the target direction and rotation angle difference, and adjusting the rotation speed according to the rotation completion ratio, the problem of irregular rotation amplitude in the virtual rocker control is solved, and the visual effect of smooth steering is achieved.

CN119868924APending Publication Date: 2025-04-25DUOYI NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510083063.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When controlling the target object, the virtual rocker is prone to irregular steering amplitude, which affects the user's operating experience.

Method used

By obtaining the target coordinate points of the virtual rocker, determining the target direction and rotation angle difference, controlling the target object to rotate from the starting direction toward the target direction, and adjusting the rotation speed according to the rotation completion ratio to achieve a smooth steering with a gradual deceleration.

Benefits of technology

Effectively prevent the target object from jumping directly, realize the visual effect of smooth steering of the virtual rocker, and improve the user's operating experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119868924A_ABST
    Figure CN119868924A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an object control method, system and device based on a virtual rocker and a storage medium, and belongs to the technical field of computers. The method comprises the steps of determining a target direction according to a center coordinate point and a target coordinate point of a virtual rocker in response to a target coordinate point of the virtual rocker, determining a rotation angle difference according to a starting direction and the target direction, then controlling a target object to rotate from the starting direction to the target direction, and obtaining a current direction of the target object in real time. In the rotation process, the rotation completion ratio of the target object is determined according to the current direction and the rotation angle difference of the target object, and when the rotation completion ratio is larger than the expected completion ratio, the target object is controlled to rotate from the current direction to the target direction in a decelerated mode, so that the gradual-decelerating smooth steering visual effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, device and storage medium for object control based on a virtual joystick. Background Art

[0002] A virtual joystick is a tool that simulates the functions of a traditional game controller or physical joystick. It usually uses the 2D coordinates of the screen touch to map the virtual scene's 3D coordinate system in real time, and uses the touch screen to control objects in the virtual scene. A virtual joystick generally consists of a circular area with a control point. Users can touch and move this point to control the direction or position of the target object. At present, compared with a physical joystick, the operation of a virtual joystick is more likely to produce jumpy changes. For example, when using a virtual joystick to adjust the direction, it is easy to have irregular jumping problems in the steering range, which affects the user's operating experience. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a virtual joystick-based object control method, system, device and storage medium, aiming to improve the visual effect of smooth steering of a target object controlled by a virtual joystick.

[0004] To achieve the above object, an embodiment of the present application provides an object control method based on a virtual joystick, comprising the following steps:

[0005] Get the target coordinate point of the virtual joystick;

[0006] Determine the target direction according to the center coordinate point of the virtual joystick and the target coordinate point;

[0007] Determining a rotation angle difference according to the starting direction and the target direction;

[0008] Controlling the target object to rotate from the starting direction toward the target direction, and obtaining the current direction of the target object;

[0009] determining a rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference;

[0010] When the rotation completion ratio is greater than the expected completion ratio, the target object is controlled to rotate from the current direction toward the target direction at a reduced speed.

[0011] In some embodiments, before acquiring the target coordinate point of the virtual joystick, the object control method based on the virtual joystick further includes the following steps:

[0012] Get the starting coordinate point;

[0013] The starting direction is determined according to the center coordinate point of the virtual joystick and the starting coordinate point.

[0014] In some embodiments, controlling the target object to rotate from the starting direction toward the target direction comprises the following steps:

[0015] Determine a first distance according to the target coordinate point and the center coordinate point;

[0016] determining an operation sensitivity according to the first distance, wherein the operation sensitivity is proportional to the first distance;

[0017] determining a first rotation speed according to the operation sensitivity and a basic rotation speed;

[0018] The target object is controlled to rotate uniformly at the first rotation speed from the starting direction toward the target direction.

[0019] In some embodiments, controlling the target object to rotate at a reduced speed from a current direction toward the target direction comprises the following steps:

[0020] Determining a rotation completion inverse ratio according to the rotation completion ratio;

[0021] determining a second rotation speed according to the rotation completion inverse ratio, the basic rotation speed, and the operation sensitivity;

[0022] The target object is controlled to rotate at a reduced speed at the second rotation speed from a current direction toward the target direction.

[0023] In some embodiments, the base rotation speed is calculated by the following steps:

[0024] Get the expected rotation time;

[0025] The rotation angle difference is divided by the expected rotation time to obtain a basic rotation speed.

[0026] In some embodiments, the virtual joystick-based object control method further includes the following steps:

[0027] Calculating a second distance between the starting coordinate point and the center coordinate point;

[0028] When the second distance is smaller than the blind spot radius, the target object is locked, wherein the blind spot radius is determined based on the radius of the disk where the virtual joystick is located.

[0029] In some embodiments, determining the rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference comprises the following steps:

[0030] Determine a current angle difference according to the current direction and the target direction;

[0031] A rotation completion ratio of the target object is determined according to the current angle difference and the rotation angle difference.

[0032] To achieve the above object, another aspect of the embodiment of the present application provides an object control system based on a virtual joystick, comprising:

[0033] The first module is used to obtain the target coordinate point of the virtual joystick;

[0034] The second module is used to determine the target direction according to the center coordinate point of the virtual joystick and the target coordinate point;

[0035] A third module is used to determine a rotation angle difference according to a starting direction and the target direction;

[0036] The fourth module is used to control the target object to rotate from the starting direction toward the target direction and obtain the current direction of the target object;

[0037] A fifth module, configured to determine a rotation completion ratio of the target object according to a current direction of the target object and the rotation angle difference;

[0038] The sixth module is used to control the target object to rotate from the current direction toward the target direction at a reduced speed when the rotation completion ratio is greater than the expected completion ratio.

[0039] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program implements the method described in the above embodiment when executed by the processor.

[0040] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the above embodiment.

[0041] The object control method, system, device and storage medium based on a virtual joystick proposed in the present application respond to the target coordinate point of the virtual joystick, determine the target direction according to the center coordinate point and the target coordinate point of the virtual joystick, determine the rotation angle difference according to the starting direction and the target direction, then control the target object to rotate from the starting direction toward the target direction, and obtain the current direction of the target object in real time. During the rotation process, the rotation completion ratio of the target object is determined according to the current direction of the target object and the rotation angle difference. When the rotation completion ratio is greater than the expected completion ratio, the target object is controlled to decelerate and rotate from the current direction toward the target direction, thereby achieving a smooth turning visual effect with gradual deceleration. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flow chart of an object control method based on a virtual joystick provided in an embodiment of the present application;

[0043] Figure 2 is a schematic diagram of a virtual joystick provided in an embodiment of the present application;

[0044] Figure 3 is a schematic diagram illustrating parameters of a rotation operation process provided in an embodiment of the present application;

[0045] Figure 4 is a blind spot diagram provided in an embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of the size ratio of different joysticks and discs provided in the embodiments of the present application;

[0047] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be noted that, although the functional modules are divided in the system and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] Based on this, the embodiments of the present application provide an object control method, system, device and storage medium based on a virtual joystick, aiming to improve the visual effect of smooth steering of a target object controlled by a virtual joystick.

[0052] The virtual joystick-based object control method, system, device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the virtual joystick-based object control method in the embodiments of the present application is described.

[0053] The object control method based on a virtual joystick provided in the embodiment of the present application relates to the field of computer technology. The object control method based on a virtual joystick provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the object control method based on a virtual joystick, etc., but is not limited to the above forms.

[0054] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0055] Figure 1is an optional flow chart of the object control method based on the virtual joystick provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0056] Step S101, obtaining the target coordinate point of the virtual joystick;

[0057] Step S102, determining the target direction according to the center coordinate point of the virtual joystick and the target coordinate point;

[0058] Step S103, determining a rotation angle difference according to the starting direction and the target direction;

[0059] Step S104, controlling the target object to rotate from the starting direction toward the target direction, and obtaining the current direction of the target object;

[0060] Step S105, determining a rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference;

[0061] Step S106: When the rotation completion ratio is greater than the expected completion ratio, the target object is controlled to rotate from the current direction toward the target direction at a reduced speed.

[0062] In step S101 of some embodiments, please refer to Figure 2 ,A virtual joystick is generally composed of a circular area with a control point in the middle of the circular area. The circular area is called a disc, and the control point is equivalent to a joystick. To operate the virtual joystick, the operator can click a certain position on the disc or drag from the control point in the middle to a certain position on the disc, which can simulate the actual operation of moving the joystick to the corresponding position. In a rotation operation, the target coordinate point can be determined based on the position where the operator touches the disc.

[0063] In step S102 of some embodiments, the center coordinate point of the virtual joystick refers to the midpoint of the disk, that is, the position of the control point. In this embodiment, the disk can be used as a coordinate system, and the default center coordinate point is (0, 0). After obtaining the target coordinate point input by the operator, the target direction can be determined according to the center coordinate point and the target coordinate point, that is, the target direction is the direction from the center coordinate point to the target coordinate point.

[0064] In step S103 of some embodiments, the target object of this embodiment may refer to a virtual character, a scene perspective, a character skill, or an indicator, etc. The indicator is a visual feedback tool for the result of the virtual joystick operation. The style of the indicator is usually designed as a dot / circle / arrow, etc., and the position and direction are marked by graphic feedback to help the operator understand complex operations. This embodiment can realize virtual task steering, scene perspective rotation adjustment, skill rotation, and indicator rotation, etc. through a virtual joystick. In a rotation operation, the starting direction may be the direction at the end of the last rotation operation, that is, for the target object of the virtual character or scene perspective, the starting direction is the direction before the current operation starts. In a rotation operation, the starting direction may also be the direction specified by the operator in the rotation operation, that is, for the target object of the skill or skill indicator, in a rotation operation, the operator slides from the starting coordinate point to the target coordinate point on the disk of the virtual joystick, and the direction corresponding to the starting coordinate point is the starting direction of the indicator. The absolute value of the angle of the starting direction is subtracted from the angle of the target direction to obtain the rotation angle difference.

[0065] In steps S104 to S106 of some embodiments, after determining the target direction, the target object is controlled to start rotating from the starting direction toward the target direction, and during the rotation of the target object, the real-time rotation completion ratio of the target object is determined according to the real-time current direction of the target object and the rotation angle difference, and at the same time, it is determined whether the rotation completion ratio is greater than the expected completion ratio. When the rotation completion ratio is greater than the expected completion ratio (for example, 20%), the target object is controlled to rotate from the current direction toward the target direction at a reduced speed. This embodiment controls the rotation process of the target object in stages based on the rotation completion ratio. In the second half of the rotation, the target object is controlled to rotate at a reduced speed, which can prevent the target object from directly changing in a jumpy manner and achieve the visual effect of smooth steering of the virtual joystick.

[0066] In some embodiments, before step S101, the object control method based on the virtual joystick of the embodiment of the present application may also include but is not limited to the following steps:

[0067] Step S201, obtaining a starting coordinate point;

[0068] Step S202, determining a starting direction according to the center coordinate point and the starting coordinate point of the virtual joystick.

[0069] In this embodiment, the target object is an indicator of auxiliary skill release in the game as an example, please refer to Figure 3In a steering operation, the operator slides from the starting coordinate point 301 (x0, y0) to the target coordinate point 303 (x, y) on the disk of the virtual joystick. In response to the operator's steering operation, the processor determines the starting direction according to the center coordinate point 302 (0, 0) of the virtual joystick and the starting coordinate point (i.e., the starting touch coordinate point), i.e., the direction in which the center coordinate point points to the starting coordinate point, and determines the target direction according to the center coordinate point of the virtual joystick and the target coordinate point (i.e., the current touch coordinate point). The starting direction is the starting direction of the skill on the indicator, and the target direction is the release direction of the skill on the indicator.

[0070] In some embodiments, the step of controlling the target object to rotate from the starting direction toward the target direction in step S104 may include, but is not limited to, steps S301 to S304:

[0071] Step S301, determining a first distance according to the target coordinate point and the center coordinate point;

[0072] Step S302, determining an operation sensitivity according to the first distance, wherein the operation sensitivity is proportional to the first distance;

[0073] Step S303, determining a first rotation speed according to the operation sensitivity and the basic rotation speed;

[0074] Step S304: Control the target object to rotate uniformly at the first rotation speed from the starting direction toward the target direction.

[0075] In this embodiment, considering the nonlinear angle change caused by the touch and swipe of the virtual joystick, within the range of the joystick's disc, the closer to the center of the circle, the greater the angle difference caused by a slight swipe, and the more difficult it is to control the accuracy of the touch point. When using the virtual joystick to adjust the direction, the problem of irregular steering amplitude jumps is prone to occur. This embodiment determines a first distance based on the target coordinate point and the center coordinate point. The first distance represents the operator's operating range on the disc. The operation sensitivity can be calculated in combination with the first distance. This embodiment defines the operation sensitivity as proportional to the first distance, that is, the sensitivity of the virtual joystick's disc center can be defined as 0, and the maximum edge is defined as 1. The operation sensitivity of the entire touch area is mapped in the interval [0, 1]. The operation sensitivity can change linearly according to the distance between the touch point (i.e., the target coordinate point) and the center of the disc (i.e., the center coordinate point), so that the closer to the coordinate center point, the lower the operation sensitivity, and vice versa.

[0076] In one example, the operational sensitivity can be calculated according to the following formula:

[0077] Sensitivity=(x 2 +y 2 ) / R 2 ;

[0078] Among them, Sensitivity represents the operation sensitivity, with a value range of 0 to 1, (x, y) represents the target coordinate point, R represents the radius of the disk, (x 2 +y 2 ) represents the square of the first distance.

[0079] In another example, the operation sensitivity may also be a ratio of the first distance to the radius of the disk.

[0080] The first rotation speed is determined according to the operation sensitivity and the basic rotation speed, and specifically, the first rotation speed can be obtained by multiplying the operation sensitivity by the basic rotation speed. In the first rotation stage of the target object (i.e., the stage where the rotation completion ratio is less than the expected completion ratio), the first rotation speed is used for uniform rotation, so that when the operator operates close to the center of the disc, the target object rotates at a lower speed, reducing the situation where the short-term steering amplitude is too large, making the operator's control more precise and the indicator performance more stable.

[0081] In some embodiments, the basic rotation speed may be obtained by, but not limited to, steps S401 to S402:

[0082] Step S401, obtaining the expected rotation time;

[0083] Step S402: Divide the rotation angle difference by the expected rotation time to obtain a basic rotation speed.

[0084] In this embodiment, the basic angular velocity is positively correlated with the rotation angle. The larger the rotation angle, the higher the basic velocity. The basic rotation velocity is calculated by dividing the rotation angle difference by the expected rotation time (for example, 0.15 seconds), so that the subsequent rotation process can be performed based on the basic rotation velocity. Regardless of the size of the required rotation angle difference, it can be completed within a certain range of the expected rotation time.

[0085] In some embodiments, step S105 may include but is not limited to steps S501 to S502:

[0086] Step S501, determining a current angle difference according to a current direction and a target direction;

[0087] Step S502: determining the rotation completion ratio of the target object according to the current angle difference and the rotation angle difference.

[0088] In this embodiment, please continue to refer to Figure 3, subtract the angle corresponding to the target direction from the angle corresponding to the current direction of the target object to get the current angle difference. The rotation completion ratio of the target object is determined based on the current angle difference and the rotation angle difference of the entire rotation process. The rotation completion ratio can be calculated using the following formula:

[0089] ratio = 1-delta / angle;

[0090] Among them, ratio represents the rotation completion ratio, delta represents the current angle difference, and angle represents the rotation angle difference.

[0091] In another example, the completed angle difference may be determined according to the current direction and the target direction, and the completed angle difference may be divided by the rotation angle difference of the entire rotation process to obtain the rotation completion ratio.

[0092] In some embodiments, controlling the target object to rotate from the current direction toward the target direction at a reduced speed in step S106 may include, but is not limited to, steps S601 to S603:

[0093] Step S601, determining a rotation completion inverse ratio according to the rotation completion ratio;

[0094] Step S602, determining a second rotation speed according to the rotation completion inverse ratio, the basic rotation speed and the operation sensitivity;

[0095] Step S603: Control the target object to rotate at a second rotation speed from the current direction toward the target direction.

[0096] In this embodiment, the rotation completion inverse ratio represents the proportion of the current unfinished partial angle of the target object. The second rotation speed is determined according to the rotation completion inverse ratio, the basic rotation speed and the operation sensitivity. Specifically, the second rotation speed can be obtained by multiplying the rotation completion inverse ratio, the operation sensitivity and the basic rotation speed. In the second rotation stage of the target object (i.e., the rotation completion ratio is greater than the expected completion ratio stage), since the rotation completion inverse ratio is reduced in real time, the second rotation speed is used in this stage to achieve the decelerated rotation of the target object. In this embodiment, the target object is rotated according to the dynamic speed curve through the rotation completion inverse ratio, the real-time coordinate change is converted into a smooth change process, the target object angle jump is reduced, and the operation sensitivity is dynamically adjusted, so as to achieve the effect of high control accuracy, more stable indicator performance or more stable character steering.

[0097] In some embodiments, the object control method based on the virtual joystick of the embodiment of the present application may also include but is not limited to steps S701 to S702:

[0098] Step S701, calculating a second distance between the starting coordinate point and the center coordinate point;

[0099] Step S702: When the second distance is less than the blind spot radius, the target object is locked, wherein the blind spot radius is determined based on the radius of the disk where the virtual joystick is located.

[0100] In this embodiment, considering that the virtual joystick contact point has poor stability, when the touch point is pressed and not moved, the unconscious movement of the finger will cause slight changes in the joystick; or when the finger is not dragged obviously, it will cause the indicator to shake, affecting the user experience. This embodiment can set a touch anti-shake mechanism, please refer to Figure 4 , a smaller circular blind spot is set at the center of the disk (the radius of the blind spot can be 20% of the radius of the disk), and no response is given to operations within the blind spot, and normal operation can be performed after leaving the blind spot. That is, in a rotation operation, when the distance between the starting coordinate point and the center coordinate point is less than the blind spot radius, it means that the starting touch point is in the blind spot, and it is considered that the operator has no intention of operation after pressing the joystick, and a certain distance may be caused by the operator's finger shaking. The system locks the target object, thereby reducing the situation where the target object shakes unexpectedly. In this embodiment, for the indicator, locking the target object means not activating the indicator. When the distance between the starting coordinate point and the center coordinate point generated by movement after the operator presses the joystick position is greater than the blind spot radius, the indicator is activated again at this time, and normal operation can be performed after leaving the blind spot.

[0101] In some embodiments, a certain time (such as 200 milliseconds) can be set as the touch activation time, and the operation within the activation time is defined as a click, and the operation outside the time is defined as a long press, thereby realizing diversified operations of the same set of components.

[0102] In some embodiments, please refer to Figure 5 , this embodiment takes into account that different size ratios of the joystick and the disc will affect the operator's operating speed. For example, to achieve the same rotation effect, the smaller the size ratio of the joystick and the disc, the greater the psychological expected distance given to the operator, requiring a larger swiping range and faster finger operation speed, and the change process is relatively slow; the size ratio of the joystick and the disc is moderate, and a balance can be achieved between the swiping range and the change speed; the size ratio of the joystick and the disc is too large, requiring a smaller swiping range and a faster change process. Based on this, in order to achieve a balance between the swiping range and the change speed, this embodiment can adjust the size ratio of the joystick and the disc, and it can be determined through test tuning that the size ratio of the joystick and the disc can be 35:100.

[0103] According to some embodiments of the present application, the embodiments of the present application have the following beneficial effects:

[0104] This embodiment controls the rotation process of the target object in stages based on the rotation completion ratio. In the second half of the rotation, the target object is controlled to slow down its rotation, which can prevent the target object from making direct jump changes and achieve the visual effect of smooth steering of the virtual joystick.

[0105] The operation sensitivity on the disc of this embodiment is proportional to the user's operation distance relative to the center of the disc. The closer to the center of the disc, the lower the operation sensitivity. This allows the user to accurately control the angle difference when operating in the area near the disc, thereby achieving precise steering control.

[0106] In this embodiment, the basic angular velocity is positively correlated with the rotation angle. The larger the rotation angle, the higher the basic velocity. The basic rotation velocity is calculated by dividing the rotation angle difference by the expected rotation time, so that the subsequent rotation process can be performed on the basis of the basic rotation velocity. Regardless of the size of the required rotation angle difference, it can be completed within a certain range of the expected rotation time.

[0107] In the deceleration stage, this embodiment realizes the rotation of the target object according to the dynamic speed curve by completing the inverse ratio through rotation, converts the real-time coordinate change into a smooth change process, reduces the angle jump of the target object, and dynamically adjusts the operation sensitivity, thereby achieving high control accuracy, more stable indicator performance or more stable character turning effect.

[0108] This embodiment sets a touch blind zone for starting operation. When the user stays at the center of the joystick and the finger makes an unconscious movement, the indicator is not activated because the movement is within the touch blind zone, which can reduce the user's misoperation.

[0109] The embodiment of the present application also provides an object control system based on a virtual joystick, comprising:

[0110] The first module is used to obtain the target coordinate point of the virtual joystick;

[0111] The second module is used to determine the target direction according to the center coordinate point of the virtual joystick and the target coordinate point;

[0112] The third module is used to determine the rotation angle difference according to the starting direction and the target direction;

[0113] The fourth module is used to control the target object to rotate from the starting direction toward the target direction and obtain the current direction of the target object;

[0114] A fifth module is used to determine a rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference;

[0115] The sixth module is used to control the target object to rotate from the current direction toward the target direction at a reduced speed when the rotation completion ratio is greater than the expected completion ratio.

[0116] It can be understood that the contents of the above-mentioned virtual joystick-based object control method embodiment are applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above-mentioned virtual joystick-based object control method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned virtual joystick-based object control method embodiment.

[0117] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned object control method based on the virtual joystick. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0118] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0119] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0120] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the object control method based on the virtual joystick in the embodiment of the present application;

[0121] Input / output interface 603, used to implement information input and output;

[0122] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0123] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );

[0124] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0125] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned virtual joystick-based object control method.

[0126] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0127] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0128] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0129] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0130] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0131] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0132] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0133] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0134] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0137] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for controlling an object based on a virtual joystick, characterized in that: The following steps are involved: Get the target coordinate point of the virtual joystick; Determine the target direction according to the center coordinate point of the virtual joystick and the target coordinate point; Determining a rotation angle difference according to the starting direction and the target direction; Controlling the target object to rotate from the starting direction toward the target direction, and obtaining the current direction of the target object; determining a rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference; When the rotation completion ratio is greater than the expected completion ratio, the target object is controlled to rotate from the current direction toward the target direction at a reduced speed.

2. The object control method based on a virtual joystick according to claim 1, characterized in that: Before acquiring the target coordinate point of the virtual joystick, the object control method based on the virtual joystick further includes the following steps: Get the starting coordinate point; The starting direction is determined according to the center coordinate point of the virtual joystick and the starting coordinate point.

3. The object control method based on a virtual joystick according to claim 1, characterized in that: The controlling the target object to rotate from the starting direction toward the target direction comprises the following steps: Determine a first distance according to the target coordinate point and the center coordinate point; determining an operation sensitivity according to the first distance, wherein the operation sensitivity is proportional to the first distance; determining a first rotation speed according to the operation sensitivity and a basic rotation speed; The target object is controlled to rotate uniformly at the first rotation speed from the starting direction toward the target direction.

4. The object control method based on a virtual joystick according to claim 3, characterized in that: The step of controlling the target object to rotate at a reduced speed from the current direction toward the target direction comprises the following steps: Determining a rotation completion inverse ratio according to the rotation completion ratio; determining a second rotation speed according to the rotation completion inverse ratio, the basic rotation speed, and the operation sensitivity; The target object is controlled to rotate at a reduced speed at the second rotation speed from a current direction toward the target direction.

5. The object control method based on a virtual joystick according to claim 3, characterized in that: The base rotation speed is calculated by the following steps: Get the expected rotation time; The rotation angle difference is divided by the expected rotation time to obtain a basic rotation speed.

6. The object control method based on a virtual joystick according to claim 2, characterized in that: The object control method based on the virtual joystick also includes the following steps: Calculating a second distance between the starting coordinate point and the center coordinate point; When the second distance is smaller than the blind spot radius, the target object is locked, wherein the blind spot radius is determined based on the radius of the disk where the virtual joystick is located.

7. The object control method based on a virtual joystick according to claim 1, characterized in that: The step of determining the rotation completion ratio of the target object according to the current direction of the target object and the rotation angle difference comprises the following steps: Determine a current angle difference according to the current direction and the target direction; A rotation completion ratio of the target object is determined according to the current angle difference and the rotation angle difference.

8. An object control system based on a virtual joystick, characterized in that: include: The first module is used to obtain the target coordinate point of the virtual joystick; The second module is used to determine the target direction according to the center coordinate point of the virtual joystick and the target coordinate point; A third module is used to determine a rotation angle difference according to a starting direction and the target direction; The fourth module is used to control the target object to rotate from the starting direction toward the target direction and obtain the current direction of the target object; A fifth module, configured to determine a rotation completion ratio of the target object according to a current direction of the target object and the rotation angle difference; The sixth module is used to control the target object to rotate from the current direction toward the target direction at a reduced speed when the rotation completion ratio is greater than the expected completion ratio.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method described in any one of claims 1 to 7 are realized.

10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of claims 1 to 7.