Method and device for controlling alert operation of virtual objects in UE4 virtual reality

By receiving control instructions in the UE4 engine, the virtual object is moved to the alert position and rotated, and performing preset alert operations, solving the problem of how the virtual object enters the alert state in virtual reality, and realizing that the virtual object is in virtual reality Effective alert operation control in.

CN114504821BActive Publication Date: 2024-12-31SHENZHEN RUICHANG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210051845.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2024-12-31
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

In the UE4 engine, how virtual objects in virtual reality effectively control their entry into alert combat state is an urgent problem.

Method used

Provides a method of alert operation control for virtual objects in UE4 virtual reality. By receiving control instructions, the virtual object can be moved to the alert position in place or rotated to face the arrow direction, performing preset alert operations, including squatting and playback. Alert action until exiting the alert state.

Benefits of technology

It realizes effective alert operation control of virtual objects in the UE4 virtual engine, meets the needs of game scenes, ensures that virtual objects perform preset alert actions in place or alert positions, and meets the needs of game scene settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114504821B_ABST
    Figure CN114504821B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, computer equipment and storage medium for controlling the alert operation of a virtual object in UE4 virtual reality. The method comprises: receiving a first control instruction for the alert operation of a virtual object; if the first control instruction is used to instruct the virtual object to perform the alert operation in situ, controlling the virtual object to perform a preset alert operation in situ; if the first control instruction is used to instruct the virtual object to move to a warning position to perform the alert operation, controlling the virtual object to move to the warning position, and rotating the virtual object so that the arrow of the virtual object faces the warning position, and after the rotation operation is completed, controlling the virtual object to perform the preset alert operation at the warning position. The above method can control the virtual object to perform the alert operation in the virtual reality implemented by the UE4 virtual engine to meet the needs of game scene setting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual engine technology, and in particular to a method, device, computer equipment and storage medium for controlling alert operations of virtual objects in UE4 virtual reality. Background Art

[0002] UE4 engine is an open source and cross-platform game development engine. UE4 engine is suitable for heavyweight game development, and it focuses more on PC games and high-end mobile games. UE4 engine supports blueprints and C++, and the learning cost is higher.

[0003] When using the UE4 engine for game development, virtual objects in the UE4 virtual reality need to enter an alert combat state according to the needs of the game scene. How to control virtual objects to execute an alert combat state in the UE4 virtual reality is an urgent problem to be solved in current UE4 engine game development. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, device, computer equipment and storage medium for controlling the alert operation of virtual objects in UE4 virtual reality, which can control the virtual objects to perform alert operations in the virtual reality implemented by the UE4 virtual engine to meet the needs of game scene setting.

[0005] In order to solve at least one of the above technical problems, an embodiment of the present invention provides a method for controlling a warning operation of a virtual object in UE4 virtual reality, the method comprising:

[0006] receiving a first control instruction for a warning operation of a virtual object;

[0007] If the first control instruction is used to instruct the virtual object to perform a warning operation at the location, then the virtual object is controlled to perform a preset warning operation at the location;

[0008] If the first control instruction is used to instruct the virtual object to move to the warning position to perform a warning operation, the virtual object is controlled to move to the warning position, and the virtual object is rotated so that the arrow of the virtual object is facing the warning position. After the rotation operation is completed, the virtual object is controlled to perform a preset warning operation at the warning position.

[0009] Preferably, after the rotation operation is completed, controlling the virtual object to perform a preset warning operation at the warning position includes:

[0010] After the rotation operation is completed, controlling the virtual object to perform a squatting operation at the alert position;

[0011] When the virtual object squats, the virtual object is controlled to perform a preset alert operation.

[0012] Preferably, after executing the preset alert operation, the method further includes:

[0013] When the alert operation is completed, if the virtual object is still in the alert state, the virtual object is controlled to perform the preset alert operation after a first preset time period.

[0014] Preferably, after controlling the virtual object to perform the preset alert operation, the method further comprises:

[0015] When the alert operation is completed, if the virtual object is still in the alert state, the virtual object is controlled to perform the preset alert operation after a second preset time period.

[0016] Preferably, after executing the preset alert operation, the method further comprises:

[0017] If a second control instruction for controlling the virtual object to exit the alert state is received, the virtual object is no longer controlled to perform the preset alert operation after the alert operation is completed.

[0018] Preferably, the performing of the preset alert operation includes:

[0019] Play the alert action of the virtual object.

[0020] Preferably, controlling the virtual object to move to the alert position comprises:

[0021] Reading the game team information of the virtual object, and identifying the target game team of the virtual object based on the game team information;

[0022] Identifying the guard position of the target gaming team;

[0023] The virtual object is controlled to move to the warning position.

[0024] A device for controlling the alert operation of a virtual object in UE4 virtual reality, the device comprising:

[0025] A receiving module, used for receiving a first control instruction of a warning operation of a virtual object;

[0026] A first control module, configured to control the virtual object to perform a preset alert operation at the location if the first control instruction is used to instruct the virtual object to perform an alert operation at the location;

[0027] The second control module is used to control the virtual object to move to the warning position and rotate the virtual object so that the arrow of the virtual object is facing the warning position if the first control instruction is used to instruct the virtual object to move to the warning position to perform a warning operation, and control the virtual object to perform a preset warning operation at the warning position after the rotation operation is completed.

[0028] In addition, an embodiment of the present invention further provides a computer device, which includes: a memory, a processor, and an application stored in the memory and executable on the processor, and the processor implements the steps of any of the above-mentioned method embodiments when executing the application.

[0029] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which an application is stored. When the application is executed by a processor, the steps of the method in any of the above embodiments are implemented.

[0030] In an embodiment of the present invention, a first control instruction for a virtual object's alert operation is received. If the first control instruction is used to instruct the virtual object to perform an alert operation in situ, the virtual object is controlled to perform a preset alert operation in situ. If the first control instruction is used to instruct the virtual object to move to an alert position to perform an alert operation, the virtual object is controlled to move to the alert position, and the virtual object is rotated so that the arrow of the virtual object is oriented toward the alert position. After the rotation operation is completed, the virtual object is controlled to perform a preset alert operation at the alert position. Therefore, the virtual object can be controlled to perform an alert operation in the virtual reality implemented by the UE4 virtual engine to meet the needs of game scene settings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flowchart of a method for controlling a warning operation of a virtual object in a UE4 virtual reality in an embodiment of the present invention;

[0032] Figure 2 is a schematic diagram of a UE4 virtual reality scene in an embodiment of the present invention;

[0033] Figure 3 It is a schematic diagram of a flow chart of a virtual object executing a warning operation of moving to a warning position in an embodiment of the present invention;

[0034] Figure 4 It is a virtual reality effect diagram corresponding to a method for controlling a warning operation of a virtual object in a UE4 virtual reality in an embodiment of the present invention;

[0035] Figure 5 It is a structural schematic diagram of a warning operation control device for a virtual object in UE4 virtual reality in an embodiment of the present invention;

[0036] Figure 6 It is a schematic diagram of the structural composition of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] 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.

[0038] The embodiment of the present invention provides a method for controlling the alert operation of a virtual object in UE4 virtual reality. Figure 1 As shown, the method comprises the following steps:

[0039] S102: Receive a first control instruction for a warning operation of a virtual object.

[0040] S104: If the first control instruction is used to instruct the virtual object to perform a warning operation at the location, control the virtual object to perform a preset warning operation at the location.

[0041] S106, if the first control instruction is used to instruct the virtual object to move to the warning position to perform a warning operation, control the virtual object to move to the warning position, and rotate the virtual object so that the arrow of the virtual object is facing the warning position. After the rotation operation is completed, control the virtual object to perform a preset warning operation at the warning position.

[0042] Specifically, a first control instruction for an alert operation of a virtual object is received. The first control instruction is used to instruct the virtual object to be on alert in place or to move to an alert position for alert. When the first control instruction instructs the virtual object to perform an alert operation in place, the virtual object is controlled to perform a preset alert operation in place. When the first control instruction instructs the virtual object to move to an alert position to perform an alert operation, the virtual object is controlled to move to the alert position, and the virtual object is rotated so that the virtual object faces the arrow pointing to the alert position. After the rotation operation is completed, the virtual object is controlled to perform a preset alert operation at the alert position. Executing the preset alert operation includes: playing the alert action of the virtual object.

[0043] Among them, the situation where the virtual object moves to the warning position to perform the warning operation corresponds to the following Figure 2 The virtual reality scene shown in Figure 1 is shown in Figure 2. Figure 2 As shown, one or more warning positions are set in the virtual reality, each warning position has corresponding position prompt information, and an arrow is used to prompt the player to control the virtual object to the direction of the arrow to perform a warning operation.

[0044] In one embodiment, controlling the virtual object to move to the alert position includes: reading game team information of the virtual object, identifying the target game team of the virtual object based on the game team information; identifying the alert position of the target game team; and controlling the virtual object to move to the alert position.

[0045] Specifically, various types of alert positions are set in UE4 virtual reality, and various alert positions correspond to different game teams. Assume that there are two game teams, Team 1 and Team 2, and the two teams are in a confrontational relationship. UE4 virtual reality sets alert positions for Team 1 and Team 2 respectively. By identifying the target game team of the virtual object, the alert position of the virtual object is determined, and then the virtual object is controlled to move to the alert position.

[0046] In one embodiment, after the rotation operation is completed, the virtual object is controlled to perform a preset warning operation at the warning position, including: after the rotation operation is completed, the virtual object is controlled to perform a squatting operation at the warning position; when the virtual object squats, the virtual object is controlled to perform a preset warning operation.

[0047] Specifically, when the virtual object moves to the alert position to perform the alert operation, see Figure 3 In the process shown, the virtual object performs the following steps:

[0048] 1. Move to the warning position and proceed to the next step after the move is completed;

[0049] 2. Rotate the virtual object so that it faces the direction of the arrow at the warning position. After the rotation is completed, proceed to the next step;

[0050] 3. If the virtual object needs to squat, let the virtual object play the squatting action. After completion, proceed to the next step; if the virtual object does not need to squat, proceed directly to the next step;

[0051] 4. The virtual object plays the alert action at the current position. The alert action is a preset action. After playing, if the virtual object is still in the alert state, wait for a few seconds and play the alert action again. If the virtual object is still in the alert state, wait for a few more seconds, and repeat this cycle until the virtual object exits the alert state.

[0052] In one embodiment, after executing the preset alert operation, the method further includes: after the alert operation is completed, if the virtual object is still in the alert state, then after a first preset time period, the virtual object is controlled to execute the preset alert operation. Preferably, after controlling the virtual object to execute the preset alert operation, the method further includes: after the alert operation is completed, if the virtual object is still in the alert state, then after a second preset time period, the virtual object is controlled to execute the preset alert operation.

[0053] Specifically, the first preset duration and the second preset duration may be equal. Alternatively, the first preset duration may be greater than or less than the second preset duration. When the virtual object needs to be on alert in place or move to an alert position for an alert operation, the alert action of the virtual object is the same. That is, the virtual object plays an alert action at its current location, and the alert action is a preset action. After the playback is completed, if the virtual object is still in an alert state, wait for a few seconds and play the alert action again. If the virtual object is still in an alert state, wait for a few more seconds, and repeat this cycle until the virtual object exits the alert state.

[0054] In one embodiment, after the preset alert operation is executed, the method further includes: if a second control instruction for controlling the virtual object to exit the alert state is received, then after the alert operation is completed, the virtual object is no longer controlled to execute the preset alert operation.

[0055] Specifically, if the virtual object is in the alert state, the virtual object will keep repeating the alert action until the virtual object exits the alert state. After exiting the alert state, the virtual object will no longer perform the alert action. The corresponding effect diagram in virtual reality is as follows: Figure 4 shown.

[0056] In summary, the present invention provides a method for controlling the alert operation of a virtual object in UE4 virtual reality, which enables the virtual object to be alerted in situ or moved to a warning position to perform an alert operation according to demand in UE4 virtual reality.

[0057] In one embodiment, the present invention also provides a device for controlling the alert operation of a virtual object in UE4 virtual reality, such as Figure 5 As shown, the device comprises:

[0058] The receiving module 502 is used to receive a first control instruction for a warning operation of a virtual object.

[0059] The first control module 504 is configured to control the virtual object to perform a preset alert operation at the location if the first control instruction is used to instruct the virtual object to perform an alert operation at the location.

[0060] The second control module 506 is used to control the virtual object to move to the warning position and rotate the virtual object so that the arrow of the virtual object is facing the warning position if the first control instruction is used to instruct the virtual object to move to the warning position to perform a warning operation, and control the virtual object to perform a preset warning operation at the warning position after the rotation operation is completed.

[0061] The specific definition of a device for controlling the alert operation of a virtual object in a UE4 virtual reality can be found in the definition of a method for controlling the alert operation of a virtual object in a UE4 virtual reality, which will not be repeated here. Each module in the above-mentioned device for controlling the alert operation of a virtual object in a UE4 virtual reality can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0062] An embodiment of the present invention provides a computer-readable storage medium, on which an application is stored. When the program is executed by a processor, a method for controlling the alert operation of a virtual object in UE4 virtual reality according to any one of the above embodiments is implemented. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the storage device includes any medium that can store or transmit information in a readable form by a device (for example, a computer, a mobile phone), which can be a read-only memory, a disk or an optical disk, etc.

[0063] An embodiment of the present invention further provides a computer application program, which runs on a computer and is used to execute a method for controlling a virtual object's alert operation in a UE4 virtual reality according to any one of the above embodiments.

[0064] also, Figure 6 It is a schematic diagram of the structural composition of a computer device in an embodiment of the present invention.

[0065] The embodiment of the present invention also provides a computer device, such as Figure 6 The computer device includes a processor 602, a memory 603, an input unit 604, a display unit 605 and other devices. Those skilled in the art will understand that Figure 6 The device structure device shown does not constitute a limitation on all devices, and may include more or fewer components than shown, or combine certain components. The memory 603 can be used to store the application 601 and various functional modules, and the processor 602 runs the application 601 stored in the memory 603, thereby executing various functional applications and data processing of the device. The memory can be an internal memory or an external memory, or include both internal and external memories. The internal memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. The external memory may include a hard disk, a floppy disk, a ZIP disk, a U disk, a magnetic tape, etc. The memory disclosed in the present invention includes but is not limited to these types of memories. The memory disclosed in the present invention is only used as an example and not as a limitation.

[0066] The input unit 604 is used to receive the input of the signal and the keyword input by the user. The input unit 604 may include a touch panel and other input devices. The touch panel can collect the user's touch operation on or near it (such as the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program; other input devices may include but are not limited to one or more of a physical keyboard, a function key (such as a playback control key, a switch key, etc.), a trackball, a mouse, a joystick, etc. The display unit 605 can be used to display the information input by the user or the information provided to the user and various menus of the terminal device. The display unit 605 can be in the form of a liquid crystal display, an organic light emitting diode, etc. The processor 602 is the control center of the terminal device, which uses various interfaces and lines to connect the various parts of the entire device, and executes various functions and processes data by running or executing software programs and / or modules stored in the memory 603, and calling data stored in the memory.

[0067] As an embodiment, the computer device includes: one or more processors 602, a memory 603, and one or more applications 601, wherein the one or more applications 601 are stored in the memory 603 and are configured to be executed by the one or more processors 602, and the one or more applications 601 are configured to execute a method for controlling an alert operation of a virtual object in a UE4 virtual reality in any of the above embodiments.

[0068] In addition, the above is a detailed introduction to the method, device, computer equipment and storage medium for controlling the alert operation of virtual objects in UE4 virtual reality provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for controlling the alert operation of a virtual object in UE4 virtual reality, characterized in that: The method comprises: receiving a first control instruction for a warning operation of a virtual object; If the first control instruction is used to instruct the virtual object to perform a warning operation at the location, then the virtual object is controlled to perform a preset warning operation at the location; If the first control instruction is used to instruct the virtual object to move to the alert position to perform an alert operation, the virtual object is controlled to move to the alert position, and the virtual object is rotated so that the virtual object faces the arrow pointing to the alert position, and after the rotation operation is completed, the virtual object is controlled to perform a preset alert operation at the alert position; After the rotation operation is completed, controlling the virtual object to perform a preset warning operation at the warning position includes: After the rotation operation is completed, controlling the virtual object to perform a squatting operation at the alert position; When the virtual object squats, controlling the virtual object to perform a preset alert operation; When the alert operation is completed, if the virtual object is still in the alert state, the virtual object is controlled to perform the preset alert operation after a first preset time period.

2. The alarm operation control method according to claim 1, characterized in that: After controlling the virtual object to perform the preset alert operation, the method further includes: When the alert operation is completed, if the virtual object is still in the alert state, the virtual object is controlled to perform the preset alert operation after a second preset time period.

3. The alarm operation control method according to claim 1, characterized in that: After the preset alert operation is executed, it includes: If a second control instruction for controlling the virtual object to exit the alert state is received, the virtual object is no longer controlled to perform the preset alert operation after the alert operation is completed.

4. The alarm operation control method according to claim 1, characterized in that: The execution of the preset alert operation includes: Play the alert action of the virtual object.

5. The alarm operation control method according to claim 1, characterized in that: The controlling the virtual object to move to the alert position comprises: Reading the game team information of the virtual object, and identifying the target game team of the virtual object based on the game team information; Identifying the guard position of the target gaming team; The virtual object is controlled to move to the warning position.

6. A warning operation control device for a virtual object in UE4 virtual reality, characterized in that: The device comprises: A receiving module, used for receiving a first control instruction of a warning operation of a virtual object; A first control module, configured to control the virtual object to perform a preset alert operation at the location if the first control instruction is used to instruct the virtual object to perform an alert operation at the location; a second control module, configured to control the virtual object to move to the alert position and rotate the virtual object so that the virtual object faces the arrow pointing to the alert position if the first control instruction is used to instruct the virtual object to move to the alert position to perform an alert operation, and to control the virtual object to perform a preset alert operation at the alert position after the rotation operation is completed; After the rotation operation is completed, controlling the virtual object to perform a preset warning operation at the warning position includes: After the rotation operation is completed, controlling the virtual object to perform a squatting operation at the alert position; When the virtual object squats, controlling the virtual object to perform a preset alert operation; When the alert operation is completed, if the virtual object is still in the alert state, the virtual object is controlled to perform the preset alert operation after a first preset time period.

7. A computer device comprising a memory, a processor, and an application program stored in the memory and executable on the processor, characterized in that: When the processor executes the application, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having an application program stored thereon, characterized in that: When the application is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.