Method, device and equipment for virtual object motion control and storage medium
By obtaining and processing real-time operation instructions of the button module, presetting the action response relationship, and controlling the action of the subject matter in the virtual window, the problem of single function of virtual object rotation and position synchronization in the existing technology is solved, and diversified interactions and Efficient data transmission improves user experience.
Patent Information
- Application Number
- CN202411072812.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-12
AI Technical Summary
In the existing technology, in virtual reality and augmented reality applications, the rotation and position synchronization implementation functions of virtual objects are relatively single, which cannot meet complex interaction needs and affects the user experience.
By obtaining real-time operation instructions of the button module, including click, double-click and long-press instructions, preset the action response relationship, control the object in the virtual window to display, flip and drop, and use wireless connection and data processing modules to transmit data , improve portability and flexibility.
It realizes diversified interactive operations, simplifies user operations, improves the portability and user experience of the device, and enhances the functions and efficiency of virtual object motion control.
Smart Images

Figure CN118939124A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a method, device, equipment and storage medium for controlling the motion of a virtual object. Background Art
[0002] In virtual reality and augmented reality applications, the rotation of virtual objects and synchronization with the actual operation position are key technologies for achieving an immersive user experience. At present, there are a variety of rotation and position synchronization solutions on the market, such as using high-precision wired sensors for data collection, and transmitting operation data to the host or computing device through a wired connection. This type of method is limited by data cables. There is also a method of wireless data transmission through Bluetooth technology, but although this method avoids the limitation of data cables, the Bluetooth transmission distance is limited. There is also a method of remote operation through a handheld controller, but this method mostly achieves the purpose of command control through basic click operations. Its implementation function is relatively simple and cannot meet complex interaction needs, affecting the user experience. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device, equipment and storage medium for controlling the motion of a virtual object to solve the problems raised in the above background technology.
[0004] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a method for controlling the action of a virtual object, comprising obtaining real-time operation instructions of a button module, the real-time operation instructions including a single-click instruction generated by a user clicking the switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module; obtaining a preset action response associated with the real-time operation instruction; and controlling an object in a virtual window to perform a real-time execution action according to the preset action response, the real-time execution action including displaying, flipping and dropping the object.
[0005] Preferably, before the step of obtaining the real-time operation instruction of the button module, the step further includes: pre-storing the association relationship between the real-time operation instruction and the preset action response by manual entry;
[0006] Among them, the association relationship is: when the real-time operation instruction is confirmed as a single-click instruction, the preset action response obtained is a target object display instruction; when the real-time operation instruction is confirmed as a double-click instruction, the preset action response obtained is a target object flip instruction; when the real-time operation instruction is confirmed as a long press instruction, the preset action response obtained is a target object dropping instruction.
[0007] In the above steps, the pre-stored association relationship is achieved through manual entry, that is, multiple operation instructions and execution actions corresponding to the operation instructions are stored in the preset database of the controller through manual entry. The execution actions include single-click, double-click and long-press actions of the button, and the operation instructions include single-click instructions, double-click instructions and long-press instructions, among which the single-click instruction corresponds to the execution action of single-click, the double-click instruction corresponds to the execution action of double-click, and the long-press instruction corresponds to the execution action of long-press. The association relationship generated between the above two is synchronously stored in the preset database.
[0008] Preferably, the step of obtaining a preset action response associated with the real-time operation instruction includes: analyzing the implementation code of the real-time operation instruction; selecting an execution action category of the preset action response corresponding to the implementation code according to the implementation code, wherein the implementation code includes code one reflecting a single click instruction, code two reflecting a double-click instruction, and code three reflecting a long press instruction, code one corresponds to one category of execution actions, code two corresponds to two category of execution actions, and code three corresponds to three category of execution actions, the one category of execution actions is display of the target object, the second category of execution actions is flipping of the target object, and the third category of execution actions is dropping of the target object from the top to the bottom of the virtual window.
[0009] Preferably, the step of controlling the target object in the virtual window to perform a real-time execution action according to the preset action response includes: obtaining a real-time operation instruction according to the preset action response, wherein: when the preset action response is confirmed as the first type of execution action, confirming that a target object display instruction is obtained; when the preset action response is confirmed as the second type of execution action, confirming that a target object flip instruction is obtained; when the preset action response is confirmed as the third type of execution action, confirming that a target object drop instruction is obtained;
[0010] According to the real-time operation instruction, the target object in the virtual window is controlled to perform real-time execution action.
[0011] In addition, to achieve the above-mentioned purpose, the present invention further provides a device for controlling the action of a virtual object, wherein a button switch is provided on the control device, and the control device is wirelessly connected to a virtual window display device. The device is operated using the method for controlling the action of a virtual object as described above, and the device includes a data processing module, a data analysis module and an interaction module. The data processing module is connected to the button switch, and is used to obtain real-time operation instructions of the button module, and the real-time operation instructions include a single-click instruction generated by a user clicking the switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module; the data analysis module is connected to the data processing module, and is used to obtain a preset action response associated with the real-time operation instruction; the interaction module is connected to the data analysis module, and is used to control the target object in the virtual window to perform a real-time execution action according to the preset action response, and the real-time execution action includes the display, flipping and dropping of the target object.
[0012] Preferably, the device for controlling the action of a virtual object further comprises an input module, which is connected to the data analysis module and is used to pre-store the association relationship between the real-time operation instruction and the preset action response by manual input;
[0013] Among them, the association relationship is: when the real-time operation instruction is confirmed as a single-click instruction, the preset action response obtained is a target object display instruction; when the real-time operation instruction is confirmed as a double-click instruction, the preset action response obtained is a target object flip instruction; when the real-time operation instruction is confirmed as a long press instruction, the preset action response obtained is a target object dropping instruction.
[0014] Preferably, the data analysis module is connected to a wireless transmission module for long-distance information data transmission, and the wireless transmission module is an ESP8266 wifi module.
[0015] Preferably, the device is also provided with a power supply module, which includes a charging source module board and a battery, and the battery is connected to the charging source module board.
[0016] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the method for virtual object action control as described in any one of the above items.
[0017] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a program for virtual object action control is stored, and when the program for virtual object action control is executed by a processor, the steps of the method for virtual object action control as described in any of the above items are implemented.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] (1) The present invention collects user interaction operations in real time by setting a data processing module, and the interaction operations are generated by the user operation button module, including click, double-click and long press actions, with diversified modes, and the interaction functions can be quickly realized and the operation is simple;
[0020] (2) By setting up the ESP8266 wifi module instead of wired connection, the complexity of wiring is reduced and the portability and flexibility of the device are improved;
[0021] (3) The association degree is set in advance, so that the speed of data transmission and response is effectively improved, and the input module is set up, which can be replaced and expanded as needed, with higher flexibility in use, which can effectively improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the method for controlling the motion of a virtual object according to the present invention;
[0023] Figure 2 It is a schematic diagram of the structure of the device for controlling the motion of a virtual object according to the present invention.
[0024] Figure 3 It is a simplified structural diagram of the computer device of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] Embodiment 1:
[0027] See also Figure 1 The present invention provides a technical solution: a method, device, equipment and storage medium for controlling the motion of a virtual object to solve the problems raised in the above background technology.
[0028] To achieve the above object, the present invention provides the following technical solution: a method for controlling the motion of a virtual object, comprising:
[0029] Step S1, obtaining a real-time operation instruction of a button module, wherein the real-time operation instruction includes a single-click instruction generated by a user clicking a switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module;
[0030] In the above step S1, the user inputs a real-time operation instruction through the button module, and the data processing module obtains the real-time operation instruction, that is, obtains the instruction input by the user. The real-time operation instruction reflects the user's actual operation on the button, including real-time operations of clicking once, double-clicking or long pressing;
[0031] Before the method is executed, the association between the real-time operation instruction and the preset action response is pre-stored by manual entry;
[0032] The association relationship is:
[0033] When the real-time operation instruction is confirmed to be a one-click instruction, the preset action response obtained is a target object display instruction;
[0034] When the real-time operation instruction is confirmed to be a double-click instruction, the preset action response obtained is an object flip instruction;
[0035] When the real-time operation instruction is confirmed to be a long press instruction, the preset action response obtained is a target object drop instruction.
[0036] In actual use, the above-mentioned association relationship is connected with an external module, which can be connected to an external road entrance to set different association relationships.
[0037] Step S2, obtaining a preset action response associated with the real-time operation instruction;
[0038] In order to obtain the preset action response in the above step S2, the following steps need to be performed:
[0039] Step S21, analyzing the implementation code of the real-time operation instruction;
[0040] Step S22, selecting an execution action category of the preset action response corresponding to the implementation code according to the implementation code, wherein:
[0041] The implementation code includes code one reflecting a single click instruction, code two reflecting a double-click instruction, and code three reflecting a long press instruction. Code one corresponds to one type of execution action, code two corresponds to two types of execution actions, and code three corresponds to three types of execution actions. The one type of execution action is display of the target object, the second type of execution action is flipping of the target object, and the third type of execution action is dropping of the target object from the top to the bottom of the virtual window.
[0042] Step S3, controlling the target object in the virtual window to perform a real-time execution action according to the preset action response, wherein the real-time execution action includes displaying, flipping and dropping the target object.
[0043] In the above step S3, in order to achieve, the implementation steps are:
[0044] Step S31, obtaining a real-time operation instruction according to the preset action response, wherein:
[0045] Step S32, when the preset action response is confirmed to be the execution action of the first type, confirming that the target object display instruction is obtained;
[0046] When the preset action response is confirmed to be the second type of execution action, confirming that the target object flipping instruction is obtained;
[0047] When the preset action response is confirmed to be the execution action of the three categories, it is confirmed that the target object drop instruction is obtained;
[0048] According to the real-time operation instruction, the target object in the virtual window is controlled to perform real-time execution action.
[0049] During implementation, the above-mentioned embodiment can trigger corresponding interaction time through button operation, and can be applied to menu navigation, tool selection and action triggering.
[0050] Embodiment 2:
[0051] In addition, to achieve the above-mentioned purpose, the present invention further provides a device for controlling the action of a virtual object, wherein the control device is provided with a button switch, and the control device is wirelessly connected to a virtual window display device. The device is operated by the method for controlling the action of a virtual object as described above, and the device comprises:
[0052] a data processing module, the data processing module being connected to the button switch and being used to obtain real-time operation instructions of the button module, the real-time operation instructions including a single-click instruction generated by a user clicking the switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module;
[0053] A data analysis module, the data analysis module is connected to the data processing module and is used to obtain a preset action response associated with the real-time operation instruction;
[0054] An interaction module, which is connected to the data analysis module, is used to control the target object in the virtual window to perform real-time execution actions according to the preset action response, and the real-time execution actions include displaying, flipping and dropping the target object.
[0055] In a possible design, the device for controlling the action of a virtual object further includes an input module, which is connected to the data analysis module and is used to pre-store the association relationship between the real-time operation instruction and the preset action response by manual input;
[0056] The association relationship is:
[0057] When the real-time operation instruction is confirmed to be a one-click instruction, the preset action response obtained is a target object display instruction;
[0058] When the real-time operation instruction is confirmed to be a double-click instruction, the preset action response obtained is an object flip instruction;
[0059] When the real-time operation instruction is confirmed to be a long press instruction, the preset action response obtained is a target object drop instruction.
[0060] In one possible design, the data analysis module is connected to a wireless transmission module for long-distance information data transmission, and the wireless transmission module is an ESP8266 wifi module; the device is also provided with a power supply module, and the power supply module includes a charging source module board and a battery, and the battery is connected to the charging source module board.
[0061] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be referred to the method for controlling the motion of a virtual object described in the first aspect or any possible design of the first aspect, and will not be described in detail here.
[0062] like Figure 3 As shown, the third aspect of this embodiment provides a computer device for executing the method for controlling the action of a virtual object as described in the first aspect or any possible design of the first aspect, the computer device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for controlling the action of a virtual object as described in any of the above items.
[0063] The working process, working details and technical effects of the aforementioned computer device provided in the third aspect of this embodiment can be referred to the method for controlling the motion of a virtual object described in the first aspect or any possible design of the first aspect, and will not be repeated here.
[0064] In a fourth aspect of this embodiment, there is provided a computer-readable storage medium storing instructions for a method for controlling the motion of a virtual object as described in the first aspect or any possible design of the first aspect, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the method for controlling the motion of a virtual object as described in the first aspect or any possible design of the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include, but is not limited to, computer-readable storage media such as floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0065] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be referred to the method for controlling the motion of a virtual object as described in the first aspect or any possible design of the first aspect, and will not be repeated here.
[0066] In a fifth aspect, the present embodiment provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the method for controlling the motion of a virtual object as described in the first aspect or any possible design of the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0067] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for controlling the motion of a virtual object, characterized in that: include: Acquire a real-time operation instruction sent by the button module, wherein the real-time operation instruction includes a single-click instruction generated by a user clicking a switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module; Acquire a preset action response associated with the real-time operation instruction; According to the preset action response, the target object in the virtual window is controlled to perform a real-time execution action, and the real-time execution action includes displaying, flipping and dropping of the target object.
2. The method for controlling the motion of a virtual object according to claim 1, characterized in that: The step of obtaining the real-time operation instruction of the button module also includes: Pre-storing the association relationship between the real-time operation instruction and the preset action response by manual entry; The association relationship is: When the real-time operation instruction is confirmed to be a one-click instruction, the preset action response obtained is a target object display instruction; When the real-time operation instruction is confirmed to be a double-click instruction, the preset action response obtained is an object flip instruction; When the real-time operation instruction is confirmed to be a long press instruction, the preset action response obtained is a target object drop instruction.
3. The method for controlling the motion of a virtual object according to claim 2, characterized in that: The step of obtaining a preset action response associated with the real-time operation instruction comprises: Analyzing the implementation code of the real-time operation instruction; According to the implementation code, an execution action category of the preset action response corresponding to the implementation code is selected, wherein: The implementation code includes code one reflecting a single click instruction, code two reflecting a double-click instruction, and code three reflecting a long press instruction. Code one corresponds to one type of execution action, code two corresponds to two types of execution actions, and code three corresponds to three types of execution actions. The one type of execution action is display of the target object, the second type of execution action is flipping of the target object, and the third type of execution action is dropping of the target object from the top to the bottom of the virtual window.
4. The method for controlling the motion of a virtual object according to claim 3, characterized in that: The step of controlling the object in the virtual window to perform a real-time execution action according to the preset action response comprises: Acquire real-time operation instructions according to the preset action response, wherein: When the preset action response is confirmed to be the execution action of the type, confirming that the target object display instruction is obtained; When the preset action response is confirmed to be the second type of execution action, confirming that the target object flipping instruction is obtained; When the preset action response is confirmed to be the execution action of the three categories, it is confirmed that the target object drop instruction is obtained; According to the real-time operation instruction, the target object in the virtual window is controlled to perform real-time execution action.
5. A device for controlling the movement of a virtual object, wherein the control device is provided with a button switch, and the control device is wirelessly connected to a virtual window display device, characterized in that: The method for controlling the motion of a virtual object according to any one of claims 1 to 4 is used, wherein the device comprises: a data processing module, the data processing module being connected to the button switch and being used to obtain real-time operation instructions of the button module, the real-time operation instructions including a single-click instruction generated by a user clicking the switch of the button module once, a double-click instruction generated by the user double-clicking the switch of the button module, and a long-press instruction generated by the user long-pressing the switch of the button module; A data analysis module, the data analysis module is connected to the data processing module and is used to obtain a preset action response associated with the real-time operation instruction; An interaction module, which is connected to the data analysis module, is used to control the target object in the virtual window to perform real-time execution actions according to the preset action response, and the real-time execution actions include displaying, flipping and dropping the target object.
6. The device for controlling the motion of a virtual object according to claim 5, characterized in that: Also includes: An input module, the input module is connected to the data analysis module, and is used to pre-store the association relationship between the real-time operation instruction and the preset action response by manual input; The association relationship is: When the real-time operation instruction is confirmed to be a one-click instruction, the preset action response obtained is a target object display instruction; When the real-time operation instruction is confirmed to be a double-click instruction, the preset action response obtained is an object flip instruction; When the real-time operation instruction is confirmed to be a long press instruction, the preset action response obtained is a target object drop instruction.
7. The device for controlling the motion of a virtual object according to claim 5, characterized in that: The data analysis module is connected with a wireless transmission module for long-distance information data transmission, and the wireless transmission module is an ESP8266 wifi module.
8. The device for controlling the motion of a virtual object according to claim 7, characterized in that: The device is also provided with a power supply module, which includes a charging source module board and a battery, and the battery is connected to the charging source module board.
9. A computer device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for controlling the motion of a virtual object as described in any one of claims 1 to 4.
10. A computer storage medium, characterized in that: The computer storage medium stores a program for controlling the motion of a virtual object. When the program for controlling the motion of a virtual object is executed by a processor, the steps of the method for controlling the motion of a virtual object as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Application control method and device
CN104461304A
Method for generating signals for remotely controlling unmanned aerial vehicle and accessories through hand motions and gestures
CN106020492A
Virtual object control method and device, equipment and medium
CN117369622A
KR20240033087A
