An interactive control method and device, computer equipment and storage medium
Patent Information
- Application Number
- CN202311203958.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-18
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2043-09-18
AI Technical Summary
[0003]相关技术中,受限于虚拟现实游戏的制作成本、游戏开发者的制作水平、虚拟现实技术瓶颈等因素,使得虚拟道具可能会出现穿模的情况,这种情况下的进一步交互操作可能会出现不符合现实交互体验的问题,比如虚拟枪械穿过虚拟墙体后还会开火,这种情况一方面影响游戏交互的公平性,另一方面不符合现实交互的合理性
[0052]The interactive control method, apparatus, computer device, and storage medium provided in this disclosure detect the positional relationship between the target virtual prop and a target scene object in a virtual scene containing the target virtual prop during movement, using at least two detection dimensions, including collision detection and line-of-sight occlusion. This allows the target virtual prop's functional state to be switched from a first functional state to a second functional state if the detected positional relationship in any detection dimension satisfies a preset positional relationship corresponding to that dimension. By performing collision detection and line-of-sight occlusion detection on the target virtual prop and the target scene object in the virtual scene, collision detection and line-of-sight occlusion detection can effectively detect whether the target virtual prop is clipping through objects. When clipping is detected, the functional state of the target virtual prop is switched promptly to prevent the target virtual prop from performing operations that do not conform to the real-world interactive experience, thereby ensuring the fairness and rationality of game interaction and improving the realism of the interactive experience.
Smart Images

Figure CN117101128B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to an interactive control method, apparatus, computer device, and storage medium. Background Technology
[0002] With the rapid development of extended reality (XR) technologies such as Virtual Reality (VR) and Augmented Reality (AR), more and more related content consumption formats, including games, videos, and applications, have entered people's daily lives and become one of their forms of entertainment. Taking virtual reality games in a virtual reality scenario as an example, when experiencing virtual reality games, users need to wear virtual reality display devices (such as VR headsets) and virtual reality control devices (such as VR controllers) so that they can control virtual characters or virtual props in the virtual scene displayed by the virtual reality display device through the virtual reality control device.
[0003] In related technologies, due to limitations such as the production cost of virtual reality games, the production level of game developers, and the bottlenecks of virtual reality technology, virtual props may experience clipping issues. In such cases, further interactive operations may result in problems that do not conform to the real-world interactive experience. For example, a virtual gun may still fire after passing through a virtual wall. This situation affects the fairness of game interaction on the one hand, and does not conform to the rationality of real-world interaction on the other.
[0004] Therefore, how to solve the problem that the interactive operation in the above-mentioned clipping situation does not conform to the real interactive experience has become an urgent technical problem to be solved in this field. Summary of the Invention
[0005] This disclosure provides at least one interactive control method, apparatus, computer device, and storage medium.
[0006] In a first aspect, embodiments of this disclosure provide an interactive control method, including:
[0007] The system displays a virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position.
[0008] During the movement of the target virtual prop, the positional relationship between the target virtual prop and the target scene object is detected in at least two detection dimensions; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension.
[0009] In response to the fact that the positional relationship detected in any of the at least two detection dimensions satisfies the preset positional relationship corresponding to any of the detection dimensions, the functional state of the target virtual prop is switched from the first functional state to the second functional state.
[0010] The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
[0011] In one possible implementation, the target virtual prop is equipped with a collision detection area; the positional relationship detection between the target virtual prop and the target scene object in the collision detection dimension includes:
[0012] Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object;
[0013] When there is an overlap between the part detection area and the object area, it is determined that the positional relationship detected in the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0014] In one possible implementation, the part detection area is a three-dimensional detection area, and the object area is a three-dimensional object area;
[0015] The overlap between the part detection area and the object area includes: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
[0016] In one possible implementation, the target virtual prop is provided with an occlusion detection area; the user wears a display device, which is used to display the scene image of the virtual scene;
[0017] Detecting the positional relationship between the target virtual prop and the target scene object under the dimension of line-of-sight occlusion detection includes:
[0018] Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object;
[0019] When the line connecting the target location and the occlusion detection area overlaps with the target scene object, a preset positional relationship between the target virtual prop and the target scene object is determined to satisfy the line-of-sight occlusion detection dimension.
[0020] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the method further includes:
[0021] The scene screen displays a status prompt indicating the switch to the second function state; the status prompt includes text prompts and / or graphic prompts.
[0022] In one possible implementation, the first functional state is a functional state that supports the target function, and the second functional state is a functional state that does not support the target function.
[0023] After switching the functional state of the target virtual item from the first functional state to the second functional state, the process further includes:
[0024] If the user triggers the target function of the target virtual item, a target sound effect matching the second function state is played; the target sound effect is used to prompt the user that the target virtual item cannot currently perform the target function.
[0025] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the method further includes:
[0026] The scene screen displays guidance information to help the user move and switch the functional state of the target virtual prop from the second functional state back to the first functional state;
[0027] In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
[0028] Secondly, embodiments of this disclosure also provide an interactive control device, including:
[0029] The display module is used to display the scene of a virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position.
[0030] The detection module is used to detect the positional relationship between the target virtual prop and the target scene object in at least two detection dimensions during the movement of the target virtual prop; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension.
[0031] The switching module is used to switch the functional state of the target virtual prop from a first functional state to a second functional state in response to the fact that the positional relationship detected in any one of the at least two detection dimensions satisfies the preset positional relationship corresponding to any one of the detection dimensions.
[0032] The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
[0033] In one possible implementation, the target virtual prop is equipped with a collision detection area; the detection module, when detecting the positional relationship between the target virtual prop and the target scene object in the collision detection dimension, is used to:
[0034] Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object;
[0035] When there is an overlap between the part detection area and the object area, it is determined that the positional relationship detected in the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0036] In one possible implementation, the part detection area is a three-dimensional detection area, and the object area is a three-dimensional object area;
[0037] The overlap between the part detection area and the object area includes: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
[0038] In one possible implementation, the target virtual prop is provided with an occlusion detection area; the user wears a display device, which is used to display the scene image of the virtual scene;
[0039] The detection module, when performing positional relationship detection between the target virtual prop and the target scene object in the dimension of line-of-sight occlusion detection, is used for:
[0040] Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object;
[0041] When the line connecting the target location and the occlusion detection area overlaps with the target scene object, a preset positional relationship between the target virtual prop and the target scene object is determined to satisfy the line-of-sight occlusion detection dimension.
[0042] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the switching module is further configured to:
[0043] The scene screen displays a status prompt indicating the switch to the second function state; the status prompt includes text prompts and / or graphic prompts.
[0044] In one possible implementation, the first functional state is a functional state that supports the target function, and the second functional state is a functional state that does not support the target function.
[0045] After switching the functional state of the target virtual item from the first functional state to the second functional state, the switching module is further configured to:
[0046] If the user triggers the target function of the target virtual item, a target sound effect matching the second function state is played; the target sound effect is used to prompt the user that the target virtual item cannot currently perform the target function.
[0047] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the switching module is further configured to:
[0048] The scene screen displays guidance information to help the user move and switch the functional state of the target virtual prop from the second functional state back to the first functional state;
[0049] In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
[0050] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0051] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0052] The interactive control method, apparatus, computer device, and storage medium provided in this disclosure detect the positional relationship between the target virtual prop and a target scene object in a virtual scene containing the target virtual prop during movement, using at least two detection dimensions, including collision detection and line-of-sight occlusion. This allows the target virtual prop's functional state to be switched from a first functional state to a second functional state if the detected positional relationship in any detection dimension satisfies a preset positional relationship corresponding to that dimension. By performing collision detection and line-of-sight occlusion detection on the target virtual prop and the target scene object in the virtual scene, collision detection and line-of-sight occlusion detection can effectively detect whether the target virtual prop is clipping through objects. When clipping is detected, the functional state of the target virtual prop is switched promptly to prevent the target virtual prop from performing operations that do not conform to the real-world interactive experience, thereby ensuring the fairness and rationality of game interaction and improving the realism of the interactive experience.
[0053] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0055] Figure 1 A flowchart of an interactive control method provided in some embodiments of this disclosure is shown;
[0056] Figure 2a A schematic diagram of a target virtual prop is shown in some embodiments of the interactive control method provided in this disclosure;
[0057] Figure 2b This diagram illustrates a part detection area in an interactive control method provided by some embodiments of the present disclosure;
[0058] Figure 2c This diagram illustrates an occlusion detection area in an interactive control method provided by some embodiments of the present disclosure.
[0059] Figure 3aThis diagram illustrates a scene screen of a virtual scene before displaying graphical prompts in an interactive control method provided by some embodiments of the present disclosure.
[0060] Figure 3b This diagram illustrates a scene view of a virtual scene after displaying graphical prompts in an interactive control method provided by some embodiments of the present disclosure.
[0061] Figure 4 This diagram illustrates the architecture of an interactive control device provided by some embodiments of the present disclosure;
[0062] Figure 5 A schematic diagram of the structure of a computer device provided in some embodiments of this disclosure is shown. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0064] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0065] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0066] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0067] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0068] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0069] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0070] Research has found that due to limitations in the production costs of virtual reality games, the skill level of game developers, and technological bottlenecks in virtual reality, virtual props may experience clipping issues. Further interaction in such cases may result in problems that do not conform to the real-world interactive experience. For example, a virtual gun may fire even after passing through a virtual wall. This situation affects both the fairness of game interaction and the rationality of real-world interaction.
[0071] Taking shooting games as an example of virtual reality games, users can control virtual characters and use virtual weapons to play games through virtual reality control devices. However, if the virtual weapon clips through the walls in the virtual reality scene, and the virtual weapon is still usable, the user can hide behind the wall and use the virtual weapon to attack game objects on the other side of the wall. This is obviously not in line with the rationality of real-world interaction and affects the fairness of game interaction, making it impossible for users to obtain a good gaming experience through normal game mechanics and scene design.
[0072] Therefore, how to solve the problem that the interactive operation in the above-mentioned clipping situation does not conform to the real interactive experience has become an urgent technical problem to be solved in this field.
[0073] Based on the above research, this disclosure provides an interactive control method, device, computer equipment, and storage medium. By detecting the positional relationship between the target virtual prop and a target scene object in a virtual scene during movement, using at least two detection dimensions including collision detection and line-of-sight occlusion, the functional state of the target virtual prop can be switched from a first functional state to a second functional state if the detected positional relationship in any detection dimension satisfies a preset positional relationship corresponding to that dimension. Thus, by performing collision detection and line-of-sight occlusion detection on the target virtual prop and the target scene object in the virtual scene, it is possible to effectively detect whether the target virtual prop is clipping through objects. When clipping is detected, the functional state of the target virtual prop is switched promptly to avoid performing operations that do not conform to the real-world interactive experience even when clipping occurs. This ensures the fairness and rationality of game interaction and enhances the realism of the interactive experience.
[0074] To facilitate understanding of this embodiment, a detailed description of the interactive control method disclosed in this disclosure is provided first. The executing entity of the interactive control method provided in this disclosure is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a smart terminal device with virtual scene display capabilities, such as a VR headset, VR glasses, AR glasses, or a smart wearable device. In some possible implementations, this interactive control method can be implemented by a processor calling computer-readable instructions stored in memory.
[0075] See Figure 1 The diagram shows a flowchart of an interactive control method provided in an embodiment of this disclosure. The method includes steps S101 to S103, wherein:
[0076] S101: Display the scene of the virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position.
[0077] S102: During the movement of the target virtual prop, the positional relationship between the target virtual prop and the target scene object is detected in at least two detection dimensions; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension.
[0078] S103: In response to the positional relationship detected in any of the at least two detection dimensions satisfying the preset positional relationship corresponding to any of the detection dimensions, the functional state of the target virtual prop is switched from a first functional state to a second functional state; wherein, the interactive operation effect of the target virtual prop is different in the first functional state and the second functional state.
[0079] The following is a detailed explanation of the steps described above.
[0080] The process of displaying scene images for S101:
[0081] Here, the user can wear a display device to display the scene of the virtual scene; the virtual scene can be an augmented reality (AR) scene, a virtual reality (VR) scene, a mixed reality (MR) scene, etc.; the target virtual prop can be a virtual prop that the user can trigger, such as a virtual weapon; the target scene object can be a scene object with a fixed position in the virtual scene, such as a virtual door or a virtual wall; or, the target scene object can be a scene object with a non-fixed position in the virtual scene, such as a moving target or a moving car; the user position can be the position of a virtual character controlled by the user in the virtual scene, and the target virtual prop can be the virtual weapon used by the virtual character, so that the target virtual prop can move along with the user's position of the virtual character.
[0082] The method of changing the user's location may include any of the following:
[0083] Method 1: Control the user of the virtual character to change their position in the real space.
[0084] Here, the user's position in the predefined target space can be detected in real time, and if the user's position in the real space changes, the position of the virtual character in the virtual scene controlled by the user (i.e., the user's position) can be changed.
[0085] Method 2: Movement operation for the virtual character.
[0086] Here, users can change the position of the virtual character in the virtual scene by moving the virtual character.
[0087] For example, taking the virtual scene as a virtual reality scene, the user can initiate a movement operation on the virtual character by triggering the movement button in the virtual reality control device, or by triggering a movement target point to update the position of the virtual character from its current position to the position of the movement target point, thereby completing the movement operation on the virtual character; wherein, when updating the position of the virtual character from its current position to the position of the movement target point, the virtual character can be controlled to directly reach the position of the movement target point, or the virtual character can be controlled to gradually reach the position of the movement target point through automatic movement.
[0088] Continuing the previous example, taking the virtual scene as a virtual reality scene, the scene visuals of the virtual scene can be displayed on a virtual reality display device, and the schematic diagram of the target virtual prop can be as follows: Figure 2a As shown, Figure 2a In this context, the target virtual prop is a virtual firearm that can be triggered by the user. The user can control the virtual firearm through a virtual reality control device. Controlling the virtual firearm can include controlling the virtual firearm to fire virtual bullets, changing the magazine of the virtual firearm, loading virtual bullets into the virtual firearm, inspecting the virtual firearm, and switching to use different virtual firearms.
[0089] Regarding the positional relationship detection process of S102:
[0090] Here, the positional relationship detection can be performed in real time, that is, during the movement of the target virtual prop, or it can be performed after the virtual character enters the preset target area. The target area can be a pre-defined area where clipping may occur. The positional relationship detection can be performed after the target area is detected to avoid affecting the fairness and rationality of the game interaction. The target virtual prop can be equipped with a collision detection part. Taking the target virtual prop as a virtual firearm as an example, the collision detection part can be the gun body of the virtual firearm. The target virtual prop can also be equipped with an occlusion detection area. The occlusion detection area can be different from the part detection area corresponding to the collision detection part. Again, taking the target virtual prop as a virtual firearm as an example, if the collision detection part can be the gun body of the virtual firearm, then the occlusion detection area can be located in the grip area of the virtual firearm.
[0091] For example, a schematic diagram of the detection area can be shown as follows: Figure 2b As shown, Figure 2b In the middle, the part detection area is located in the area where the gun body of the target virtual prop is located (i.e., Figure 2b(As shown in the darker areas); a schematic diagram of the occlusion detection area can be shown as follows Figure 2c As shown, Figure 2c In this context, the occlusion detection area is located in the area where the grip of the target virtual prop is located (i.e., Figure 2c (As shown in the medium-dark area).
[0092] In this way, by setting matching detection areas for different detection methods, it is possible to accurately determine whether the target virtual item meets the functional state switching conditions under each detection dimension. This allows for more accurate control over the timely switching of the target virtual item's functional state, avoiding the impact on the fairness and rationality of game interaction caused by untimely switching of the target virtual item's functional state. This ensures the fairness and rationality of game interaction and enhances the realism of the interaction experience.
[0093] Below, we will introduce the detection methods under the collision detection dimension and the line-of-sight occlusion detection dimension respectively:
[0094] In one possible implementation, when detecting the positional relationship between the target virtual prop and the target scene object in the collision detection dimension, the following steps A1 to A2 can be used:
[0095] A1: Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object.
[0096] Here, the part detection area can be a three-dimensional detection area, and the object area can be a three-dimensional object area; the overlap between the part detection area and the object area can include: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
[0097] Specifically, when determining whether the part detection area and the object area overlap, a first collision detection box for representing the part detection area, a second collision detection box for representing the object area, and a preset collision detection algorithm can be used to determine whether the part detection area and the object area overlap.
[0098] A2: When there is an overlap between the part detection area and the object area, determine that the positional relationship detected under the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0099] Here, if the detection area of the part overlaps with the object area, it means that the target virtual prop has collided with the target scene object and that the target virtual prop has clipped through the target scene object. Therefore, it can be determined that the collision detection result of the target virtual prop is not passed, that is, it is determined that the positional relationship detected under the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0100] Furthermore, if the detection area of the part does not overlap with the object area, it indicates that the target virtual prop and the target scene object do not collide. Therefore, it can be determined that the collision detection result of the target virtual prop is passed, that is, it is determined that the positional relationship detected under the collision detection dimension does not satisfy the preset positional relationship corresponding to the collision detection dimension.
[0101] In this way, by using the collision detection area corresponding to the collision detection part of the target virtual prop to perform collision detection with the object area corresponding to the target scene object, it is possible to determine whether the target virtual prop needs to switch its functional state under the collision detection dimension. This can avoid the impact on the fairness and rationality of game interaction caused by clipping between target virtual props, thereby ensuring the fairness and rationality of game interaction and improving the realism of the interaction experience.
[0102] In one possible implementation, when detecting the positional relationship between the target virtual prop and the target scene object in the dimension of line-of-sight occlusion detection, the following steps B1 to B2 can be used:
[0103] B1: Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object.
[0104] Here, the target position of the display device in the virtual scene can be the position of the virtual camera corresponding to the display device in the virtual scene. The scene images in the virtual scene captured by the virtual camera can be displayed on the display device to simulate the scene images seen by the virtual character through the scene images in the virtual scene captured by the virtual camera, thereby enabling the user to have an immersive experience.
[0105] Therefore, by connecting the target position of the display device in the virtual scene with the occlusion detection area, the line of sight of the user-controlled virtual character viewing the target virtual device in the virtual scene can be simulated. By detecting whether the line of sight between the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object, it can be determined whether the target scene object obstructs the line of sight of the virtual character viewing the target virtual device in the virtual scene, that is, whether the target scene object obstructs the target virtual device.
[0106] B2: When the line connecting the target location and the occlusion detection area overlaps with the target scene object, determine the preset positional relationship between the target virtual prop and the target scene object under the line-of-sight occlusion detection dimension.
[0107] Here, if the line connecting the target location and the occlusion detection area overlaps with the target scene object, it indicates that the target scene object occludes the target virtual prop. Therefore, it can be determined that the line of sight occlusion detection of the target virtual prop is not passed, that is, it is determined that the positional relationship detected under the line of sight occlusion detection dimension satisfies the preset positional relationship corresponding to the line of sight occlusion detection dimension.
[0108] Furthermore, if the line connecting the target location and the occlusion detection area does not overlap with the target scene object, it indicates that the target scene object does not occlude the target virtual prop. Therefore, it can be determined that the line-of-sight occlusion detection result of the target virtual prop is passed, that is, it is determined that the positional relationship detected under the line-of-sight occlusion detection dimension does not satisfy the preset positional relationship corresponding to the line-of-sight occlusion detection dimension.
[0109] In this way, by determining whether the line connecting the target position of the display device in the virtual scene to the occlusion detection area overlaps with the target scene object, the visual occlusion detection of the target virtual prop can determine whether the target virtual prop needs to switch its function state under the visual occlusion detection dimension. In addition, since the occlusion detection area and the collision detection area can be different, it is possible to detect whether the user actively avoids collision detection. That is, when the target virtual prop clips through the target virtual prop and the user actively avoids collision detection, the collision detection is supplemented, thereby more comprehensively avoiding the impact on the fairness and rationality of game interaction caused by the clipping of the target virtual prop. In other words, the visual occlusion detection under the visual occlusion dimension can supplement the collision detection under the collision detection dimension, thereby achieving a more accurate detection effect, ensuring the fairness and rationality of game interaction, and improving the realism of the interaction experience.
[0110] It should be noted that the positional relationship detection under the collision detection dimension and the line-of-sight occlusion detection dimension mentioned above are only two of the multiple detection dimensions. In actual applications, other detection dimensions can also be included, such as detecting whether the distance between the target virtual prop and the target scene object meets the preset safe operating distance. Taking the target virtual prop as a virtual gun that can be triggered by the user as an example, since operating the virtual gun when it is too close to the scene object may cause ricochets and other dangerous results to the virtual character, a safe operating distance can be set for the virtual gun. When it is detected that the distance between the position of the virtual scene object and the position of the target virtual prop is less than the safe operating distance, it can be determined that the target virtual prop and the target scene object meet the preset positional relationship under the safe operating distance dimension, thereby allowing users to experience a more realistic virtual prop operation experience.
[0111] Regarding the function state switching process of S103:
[0112] Here, the first functional state can be a functional state that supports the target function, and the second functional state can be a functional state that does not support the target function; the target function can be the triggering function of the target virtual prop. Taking the target virtual prop as a virtual firearm as an example, the triggering function of the virtual firearm can be firing virtual bullets, attacking with the stock of the virtual firearm, attacking with the virtual knife attached to the virtual firearm, etc.
[0113] Furthermore, after switching the functional state of the target virtual prop from the first functional state to the second functional state, a status prompt message indicating the switch to the second functional state can also be displayed in the scene screen; the status prompt message includes text prompt message and / or graphic prompt message.
[0114] The text prompts may include messages such as "Fire is prohibited at the current location" to indicate the current location of the target virtual item, which is in a second functional state that does not support the target function; the graphic prompts may be graphic prompts indicating the current location of the target virtual item, which is in a second functional state that does not support the target function.
[0115] Specifically, when displaying graphic prompts, the display state of the target graphic in the current scene can be changed, switching the display state of the target graphic from the initial display state to a target display state for performing prompt operations, so as to display the graphic prompts; the target graphic can be a graphic in the scene that represents whether the current functional state supports the target function.
[0116] For example, still taking the target virtual item as a virtual firearm that can be triggered by the user, the schematic diagram of the scene screen of the virtual scene before displaying the graphic prompt information can be as follows: Figure 3a As shown, Figure 3a The target virtual prop displayed is a virtual firearm. Nearby, the corresponding status of the target firearm is displayed, including the remaining virtual bullets "7 / 36" and the virtual character's current health "100". A target graphic indicating whether the current functional status supports the target function is shown. Figure 3a The shape in the image is a bullet; after displaying the graphic prompt, a schematic diagram of the virtual scene can be shown as follows: Figure 3b As shown, Figure 3b In the process, the positional relationship between the virtual weapon and the target scene object satisfies the preset positional relationship under the preset detection dimension. That is, at this time, the functional state of the virtual weapon switches from the first functional state to the second functional state. At this time, the target graphic (i.e., Figure 3a The bullet in the target display state is switched from the initial display state to the target display state for performing a prompt operation (that is, prompting that it cannot fire). The bullet displays an "×" indicating that it cannot fire.
[0117] In this way, by displaying prompts through text and graphic information, the current functional status of the target virtual item can be effectively indicated to the user, thereby facilitating guidance for subsequent user operations.
[0118] Furthermore, after switching the functional state of the target virtual prop from the first functional state to the second functional state, a target sound effect matching the second functional state can be played when the user triggers the target function of the target virtual prop; the target sound effect is used to prompt the user that the target virtual prop cannot currently perform the target function.
[0119] Here, taking the target virtual item as a virtual firearm that can be triggered by the user as an example, the target sound effect matching the second functional state can include a sound effect indicating that the trigger of the virtual firearm is triggered after the firearm safety device of the virtual firearm is set to be activated. Since the firearm safety device of the virtual firearm is set to be activated at this time, the trigger cannot be triggered normally, and the target sound effect at this time is the sound effect corresponding to the trigger not being triggered normally; or, the target sound effect can also include a sound effect indicating that the trigger of the virtual firearm is triggered when the magazine of the virtual firearm is empty. Since the magazine of the virtual firearm is empty at this time, the target sound effect at this time is the sound effect of the trigger being triggered normally but the virtual bullet cannot be fired.
[0120] In this way, when the target virtual item is a virtual firearm that can be triggered by the user, the various target sound effects that indicate that the virtual bullets cannot be fired normally can more intuitively indicate to the user that the current location is where the virtual firearm cannot be used normally.
[0121] In one possible implementation, after switching the functional state of the target virtual item from the first functional state to the second functional state, the functional state can be switched again through the following steps C1 to C2:
[0122] C1: Displaying guidance information in the scene to instruct the user to move and switch the functional state of the target virtual prop from the second functional state back to the first functional state.
[0123] C2: In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
[0124] The guidance information may include a function state restoration position for the target virtual prop when its function state is in the first function state. The function state restoration position may be determined based on the current positional relationship between the target virtual prop and the target scene object, as well as the preset positional relationship corresponding to the at least two detection dimensions, and is a position that allows the function state of the target virtual prop to switch from the second function state to the first function state. The user movement may be the movement of a user-controlled virtual character in the virtual scene.
[0125] In this way, by displaying guidance information to switch the functional state of the target virtual prop from the second functional state back to the first functional state, users can be quickly guided to switch the functional state of the target virtual prop from the second functional state that does not support the target function back to the first functional state that supports the target function when the target virtual prop is in the second functional state that does not support the target function, thus ensuring the user's virtual scene experience.
[0126] The interactive control method provided in this disclosure performs positional relationship detection on the target virtual prop and a target scene object in a virtual scene during movement, using at least two detection dimensions, including collision detection and line-of-sight occlusion. This allows the target virtual prop's functional state to be switched from a first functional state to a second functional state if the detected positional relationship in any detection dimension satisfies a preset positional relationship corresponding to that dimension. By performing collision detection and line-of-sight occlusion detection on the target virtual prop and the target scene object in the virtual scene, it is possible to effectively detect whether the target virtual prop is clipping through objects. When clipping is detected, the functional state of the target virtual prop is switched promptly to prevent the target virtual prop from performing operations that do not conform to the real-world interactive experience, thus ensuring the fairness and rationality of the game interaction and improving the realism of the interactive experience.
[0127] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0128] Based on the same inventive concept, this disclosure also provides an interactive control device corresponding to the interactive control method. Since the principle of the device in this disclosure for solving the problem is similar to the interactive control method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0129] Reference Figure 4 The diagram shown is an architectural schematic of an interactive control device provided in an embodiment of this disclosure. The device includes: a display module 401, a detection module 402, and a switching module 403; wherein,
[0130] The display module 401 is used to display the scene of a virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position.
[0131] Detection module 402 is used to detect the positional relationship between the target virtual prop and the target scene object in at least two detection dimensions during the movement of the target virtual prop; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension;
[0132] The switching module 403 is used to switch the functional state of the target virtual prop from a first functional state to a second functional state in response to the fact that the positional relationship detected in any one of the at least two detection dimensions satisfies the preset positional relationship corresponding to any one detection dimension.
[0133] The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
[0134] In one possible implementation, the target virtual prop is provided with a collision detection area; the detection module 402, when detecting the positional relationship between the target virtual prop and the target scene object in the collision detection dimension, is used to:
[0135] Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object;
[0136] When there is an overlap between the part detection area and the object area, it is determined that the positional relationship detected in the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0137] In one possible implementation, the part detection area is a three-dimensional detection area, and the object area is a three-dimensional object area;
[0138] The overlap between the part detection area and the object area includes: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
[0139] In one possible implementation, the target virtual prop is provided with an occlusion detection area; the user wears a display device, which is used to display the scene image of the virtual scene;
[0140] The detection module 402, when detecting the positional relationship between the target virtual prop and the target scene object in the dimension of line-of-sight occlusion detection, is used for:
[0141] Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object;
[0142] When the line connecting the target location and the occlusion detection area overlaps with the target scene object, a preset positional relationship between the target virtual prop and the target scene object is determined to satisfy the line-of-sight occlusion detection dimension.
[0143] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the switching module 403 is further configured to:
[0144] The scene screen displays a status prompt indicating the switch to the second function state; the status prompt includes text prompts and / or graphic prompts.
[0145] In one possible implementation, the first functional state is a functional state that supports the target function, and the second functional state is a functional state that does not support the target function.
[0146] After switching the functional state of the target virtual item from the first functional state to the second functional state, the switching module 403 is further configured to:
[0147] If the user triggers the target function of the target virtual item, a target sound effect matching the second function state is played; the target sound effect is used to prompt the user that the target virtual item cannot currently perform the target function.
[0148] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the switching module 403 is further configured to:
[0149] The scene screen displays guidance information to help the user move and switch the functional state of the target virtual prop from the second functional state back to the first functional state;
[0150] In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
[0151] The interactive control device provided in this disclosure performs positional relationship detection on the target virtual prop and a target scene object in a virtual scene during movement, using at least two detection dimensions, including collision detection and line-of-sight occlusion. If the detected positional relationship in any detection dimension satisfies a preset positional relationship corresponding to that dimension, the functional state of the target virtual prop is switched from a first functional state to a second functional state. By performing collision detection and line-of-sight occlusion detection on the target virtual prop and the target scene object in the virtual scene, it is possible to effectively detect whether the target virtual prop is clipping through objects. When clipping is detected, the functional state of the target virtual prop is switched promptly to prevent the target virtual prop from performing operations that do not conform to the real-world interactive experience, thereby ensuring the fairness and rationality of the game interaction and improving the realism of the interactive experience.
[0152] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0153] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 5 The diagram shows the structure of a computer device 500 provided in this embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. The memory 502 stores execution instructions and includes main memory 5021 and external memory 5022. The main memory 5021, also called internal memory, is used to temporarily store computational data in the processor 501 and data exchanged with external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the main memory 5021. When the computer device 500 is running, the processor 501 and the memory 502 communicate through the bus 503, causing the processor 501 to execute the following instructions:
[0154] The system displays a virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position.
[0155] During the movement of the target virtual prop, the positional relationship between the target virtual prop and the target scene object is detected in at least two detection dimensions; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension.
[0156] In response to the fact that the positional relationship detected in any of the at least two detection dimensions satisfies the preset positional relationship corresponding to any of the detection dimensions, the functional state of the target virtual prop is switched from the first functional state to the second functional state.
[0157] The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
[0158] In one possible implementation, the instructions of the processor 501 include a collision detection component for the target virtual prop; and the detection of the positional relationship between the target virtual prop and the target scene object in the collision detection dimension, including:
[0159] Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object;
[0160] When there is an overlap between the part detection area and the object area, it is determined that the positional relationship detected in the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
[0161] In one possible implementation, in the instructions of the processor 501, the part detection area is a three-dimensional detection area, and the object area is a three-dimensional object area;
[0162] The overlap between the part detection area and the object area includes: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
[0163] In one possible implementation, the processor 501's instructions include a target virtual prop having an occlusion detection area; the user wears a display device for displaying the scene of the virtual scene;
[0164] Detecting the positional relationship between the target virtual prop and the target scene object under the dimension of line-of-sight occlusion detection includes:
[0165] Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object;
[0166] When the line connecting the target location and the occlusion detection area overlaps with the target scene object, a preset positional relationship between the target virtual prop and the target scene object is determined to satisfy the line-of-sight occlusion detection dimension.
[0167] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the instructions of the processor 501 further include:
[0168] The scene screen displays a status prompt indicating the switch to the second function state; the status prompt includes text prompts and / or graphic prompts.
[0169] In one possible implementation, in the instructions of the processor 501, the first functional state is a functional state that supports the target function, and the second functional state is a functional state that does not support the target function.
[0170] After switching the functional state of the target virtual item from the first functional state to the second functional state, the process further includes:
[0171] If the user triggers the target function of the target virtual item, a target sound effect matching the second function state is played; the target sound effect is used to prompt the user that the target virtual item cannot currently perform the target function.
[0172] In one possible implementation, after switching the functional state of the target virtual item from a first functional state to a second functional state, the instructions of the processor 501 further include:
[0173] The scene screen displays guidance information to help the user move and switch the functional state of the target virtual prop from the second functional state back to the first functional state;
[0174] In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
[0175] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the interactive control method described in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0176] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the interactive control method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0177] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0178] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0180] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0181] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0182] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. An interactive control method, characterized in that, include: The system displays a virtual scene; the virtual scene contains target virtual props and target scene objects; the target virtual props move with the user's position. During the movement of the target virtual prop, the positional relationship between the target virtual prop and the target scene object is detected in at least two detection dimensions; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension. In response to the fact that the positional relationship detected in any of the at least two detection dimensions satisfies the preset positional relationship corresponding to any of the detection dimensions, the functional state of the target virtual prop is switched from the first functional state to the second functional state. The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
2. The method according to claim 1, characterized in that, The target virtual prop is equipped with a collision detection area; the positional relationship between the target virtual prop and the target scene object is detected in the collision detection dimension, including: Detect whether there is an overlap between the collision detection area corresponding to the collision detection part and the object area of the target scene object; When there is an overlap between the part detection area and the object area, it is determined that the positional relationship detected in the collision detection dimension satisfies the preset positional relationship corresponding to the collision detection dimension.
3. The method according to claim 2, characterized in that, The part detection area is a three-dimensional detection area, and the object area is a three-dimensional object area; The overlap between the part detection area and the object area includes: the three-dimensional coordinate range of the part detection area in the virtual scene and the three-dimensional coordinate range of the object area in the virtual scene have overlapping coordinate ranges.
4. The method according to claim 1, characterized in that, The target virtual prop is equipped with an occlusion detection area; the user wears a display device, which is used to display the scene of the virtual scene; Detecting the positional relationship between the target virtual prop and the target scene object under the dimension of line-of-sight occlusion detection includes: Detect whether the line connecting the target position of the display device in the virtual scene and the occlusion detection area overlaps with the target scene object; When the line connecting the target location and the occlusion detection area overlaps with the target scene object, a preset positional relationship between the target virtual prop and the target scene object is determined to satisfy the line-of-sight occlusion detection dimension.
5. The method according to claim 1, characterized in that, After switching the functional state of the target virtual item from the first functional state to the second functional state, the process further includes: The scene screen displays a status prompt indicating the switch to the second function state; the status prompt includes text prompts and / or graphic prompts.
6. The method according to claim 1, characterized in that, The first functional state is a functional state that supports the target function, and the second functional state is a functional state that does not support the target function; After switching the functional state of the target virtual item from the first functional state to the second functional state, the process further includes: If the user triggers the target function of the target virtual item, play the target sound effect that matches the second function state; The target sound effect is used to notify the user that the target virtual item cannot currently perform the target function.
7. The method according to claim 1, characterized in that, After switching the functional state of the target virtual item from the first functional state to the second functional state, the process further includes: The scene screen displays guidance information to help the user move and switch the functional state of the target virtual prop from the second functional state back to the first functional state; In response to the user moving, if the positional relationship between the target virtual prop and the target scene object does not satisfy the preset positional relationship, the functional state of the target virtual prop is switched from the second functional state back to the first functional state.
8. An interactive control device, characterized in that, include: The display module is used to showcase the scene visuals of the virtual environment. The virtual scene contains target virtual props and target scene objects; the target virtual props move as the user's position moves; The detection module is used to detect the positional relationship between the target virtual prop and the target scene object in at least two detection dimensions during the movement of the target virtual prop; the at least two detection dimensions include a collision detection dimension and a line-of-sight occlusion detection dimension. The switching module is used to switch the functional state of the target virtual prop from a first functional state to a second functional state in response to the fact that the positional relationship detected in any one of the at least two detection dimensions satisfies the preset positional relationship corresponding to any one of the detection dimensions. The interactive effects of the target virtual prop differ in the first functional state and the second functional state.
9. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the interactive control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the interactive control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Synchronization method and device of motion states, storage medium and electronic device
CN109847361A
Method for controlling virtual object to use virtual prop, terminal and storage medium
CN110613938A