Information processing method and device in game, storage medium and electronic device
By generating virtual holes on virtual reality devices and controlling the movement of virtual cameras, the problem of limited information interaction in games is solved, enabling free movement of virtual cameras and expansion of the field of view, thus enhancing the player experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2022-11-04
- Publication Date
- 2026-06-09
AI Technical Summary
The game suffers from limited information interaction, a virtual camera that cannot move freely, and a narrow viewing angle, resulting in a poor player experience.
The system displays the original scene on the virtual reality device, responds to the attack operation of the virtual weapon to determine the hit location, generates a virtual hole, and controls the virtual camera to move to the target position according to the motion of the virtual reality device, updating the scene.
It enables free movement of the virtual camera and expansion of the field of view, improving the richness of information interaction in the game and the player experience.
Smart Images

Figure CN115607966B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for information processing in games. Background Technology
[0002] In related technologies, gameplay involving attacking virtual objects with virtual weapons is merely used as an embellishment to enhance the realism of the game. Furthermore, the inability of the camera to move freely and the limited viewing angle result in a lack of diverse information interaction within the game.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] At least some embodiments of this application provide an information processing method, apparatus, storage medium, and electronic device for games, so as to at least solve the technical problem of limited information interaction in games.
[0005] According to one embodiment of this application, an information processing method for a game is provided. The method may include: displaying an original scene image on a virtual reality device, wherein the original scene image is obtained by a virtual camera capturing the virtual reality scene, the virtual camera moving with the movement of the virtual reality device, and the virtual reality scene containing virtual weapons and virtual objects; determining the impact position of the virtual weapon hitting the virtual object in response to an attack operation of the virtual weapon on the virtual object; generating a first virtual hole in the virtual object based on the impact position; and controlling the virtual camera to move to a first target position in response to the movement of the virtual reality device, so as to update the original scene image to a target scene image, wherein the target scene image includes a virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole.
[0006] According to one embodiment of this application, an information processing device for a game is also provided. The device may include: a display unit for displaying an original scene image on a virtual reality device, wherein the original scene image is obtained by a virtual camera capturing the virtual reality scene, the virtual camera moving with the movement of the virtual reality device, and the virtual reality scene containing virtual weapons and virtual objects; a determination unit for determining the impact position of the virtual weapon hitting the virtual object in response to an attack operation of the virtual weapon on the virtual object; a generation unit for generating a first virtual hole in the virtual object based on the impact position; and a control unit for controlling the virtual camera to move to a first target position in response to the movement of the virtual reality device, so as to update the original scene image to a target scene image, wherein the target scene image includes a virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole.
[0007] According to one embodiment of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the information processing method in the game described above when it is run.
[0008] According to one embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the information processing method in any of the above-mentioned games.
[0009] In at least some embodiments of this application, the original scene image is displayed on a virtual reality device; in response to an attack operation of a virtual weapon on a virtual object, the impact position of the virtual weapon hitting the virtual object is determined; a first virtual hole in the virtual object is generated based on the impact position; and in response to the movement of the virtual reality device, a virtual camera is controlled to move to a first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image. That is, embodiments of this application can generate a first virtual hole in a virtual object based on the impact position of the virtual weapon hitting the virtual object determined when the virtual weapon attacks the virtual object. Then, based on the movement of the virtual reality device, the virtual camera is controlled to move to the first target position along with the movement of the virtual reality device, obtaining a virtual reality scene image of the other side of the first virtual hole captured by the virtual camera through the first virtual hole, thereby updating the original scene image on the virtual reality device to the target scene image. This allows the virtual camera to move with the movement of the virtual reality device, and by capturing images at the first target position, different angles of the virtual reality scene image on the other side of the first virtual hole are obtained, achieving the purpose of observing different virtual reality scene images opposite the bullet hole. This solves the technical problem of limited information interaction in games and achieves the technical effect of improving the richness of information interaction in games. Attached Figure Description
[0010] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0011] Figure 1 This is a hardware structure block diagram of a terminal device for an information processing method in a game according to an embodiment of this application;
[0012] Figure 2 This is a flowchart of an information processing method in a game according to an embodiment of this application;
[0013] Figure 3 This is a schematic diagram of a game interface that generates holes in a wall by shooting at a wall, according to an embodiment of this application.
[0014] Figure 4 This is a schematic diagram of a game interface for observing the opposite side through a hole in a wall, according to an embodiment of this application.
[0015] Figure 5 This is a schematic diagram of 2D planar meshing using a triangulation algorithm according to an embodiment of this application;
[0016] Figure 6 This is a schematic diagram of the game interface of a VR shooting game according to an embodiment of this application;
[0017] Figure 7 This is a schematic diagram of the game interface in a VR shooting game according to an embodiment of this application, showing a gun shooting through a hole in a wall;
[0018] Figure 8 This is a schematic diagram of the game interface of a VR shooting game that dynamically generates holes in a wall when shooting at a wall, according to an embodiment of this application;
[0019] Figure 9 This is a schematic diagram of an information processing device in a game according to an embodiment of this application;
[0020] Figure 10 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] According to one embodiment of this application, an embodiment of an information processing method in a game is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0024] The methods described in this application can be executed in a terminal device, computer terminal, or similar computing device. For example, when running on a terminal device, the terminal device can be a smartphone, tablet computer, PDA, mobile internet device, PAD, game console, or other similar device. Figure 1 This is a hardware structure block diagram of a terminal device for a game information processing method according to an embodiment of this application. Figure 1 As shown, the terminal device may include one or more ( Figure 1 Only one is shown in the image. Processor 102 (processor 102 may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and memory 104 for storing data. In one embodiment of this application, it may also include: input / output device 108 and display device 110.
[0025] In some optional embodiments primarily focused on gaming scenarios, the aforementioned device may also provide a human-computer interaction interface with a touch-sensitive surface. This interface can sense finger contact and / or gestures to interact with a graphical user interface (GUI). The human-computer interaction functions may include the following: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the aforementioned human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0026] Those skilled in the art will understand that Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0027] In one possible implementation, this application provides an information processing method for games. Figure 2 This is a flowchart of an information processing method in a game according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0028] Step S202: Display the original scene on the virtual reality device.
[0029] In the technical solution provided by step S202 of this application, the original scene image captured by a virtual camera of a virtual reality scene can be displayed on a virtual reality device (VR). The virtual reality device can be a technological device used to simulate the real world, and can include head-mounted virtual reality devices (also called head-mounted displays) and handheld virtual reality devices, such as VR glasses and handheld sensors. In this embodiment, the virtual reality device is preferably a head-mounted virtual reality device.
[0030] The virtual reality scene in this embodiment may include virtual weapons and virtual items. Virtual weapons can be weapons used to destroy other objects in the virtual reality scene, such as guns in shooting games. Virtual items can be objects or blocks destroyed by virtual weapons in the virtual reality scene, such as walls in shooting games. The original scene screen can be the virtual reality scene screen in the virtual reality scene before the virtual weapons and virtual items have interacted, such as the scene screen before the gun shoots the wall in a shooting game. This is only an example and is not specifically limited.
[0031] In this embodiment, the virtual camera, also known as a virtual video camera, is used to capture images of the virtual reality scene in the virtual reality scene. It can move with the movement of the virtual reality device. That is, the virtual camera can rotate or move with the virtual reality device. For example, if the virtual reality device moves to the left, the viewpoint of the virtual camera in the virtual reality scene also moves to the left. This is only an example and is not a specific limitation.
[0032] Optionally, in a virtual reality scene, since the fragments of a destroyed virtual object are fixed and need to be pre-made, a virtual object can be composed of multiple virtual sub-objects. Each virtual sub-object can be a block prefab. Multiple block prefabs can be created using an engine (e.g., Unity), and these prefabs can be applied to various locations within the virtual reality scene. The virtual sub-objects can be parts of a virtual object destroyed by a virtual weapon, such as wall fragments; this is merely an example and not a specific limitation. It should be noted that a prefab can be a complete block model composed of object fragments, rather than simply object fragments.
[0033] Step S204: In response to the virtual weapon's attack on the virtual object, determine the location where the virtual weapon hits the virtual object.
[0034] In the technical solution provided by step S204 of this application, if a virtual weapon attacks a virtual object in a virtual reality scene, the hitting position of the virtual weapon hitting the virtual object is determined. The attack operation can be an operation to destroy the virtual object, such as shooting a wall with a gun in a shooting game. The hitting position can be the position on the virtual object that is hit by the virtual weapon, such as the shooting position on the wall when the gun is shot at.
[0035] Optionally, when the number of times the virtual weapon attacks the virtual object exceeds the preset number of attack operations, rigid body parameters and gravity parameters can be added to the virtual object to achieve the purpose of destroying the virtual object, so that the virtual object can break into multiple pieces and fall off. Furthermore, collision body attributes and object attributes can be added to the fallen pieces, so that the fallen pieces can also be picked up and used for attack operations, thereby achieving the technical effect of improving the richness of information interaction in the game.
[0036] Step S206: Generate the first virtual hole in the virtual object based on the hit location.
[0037] In the technical solution provided by step S206 of this application, after determining the impact position of the virtual weapon hitting the virtual object, a first virtual hole in the virtual object can be generated according to the impact position, so as to achieve the purpose of creating bullet holes on the wall by shooting in the virtual reality scene, thereby improving the fun and realism of the VR game. The first virtual hole can be the trace left by the virtual weapon to destroy the virtual object, such as a bullet hole on the wall.
[0038] Optionally, the coordinates of the first virtual hole can be determined on the virtual object by the hit position. Then, a clipping algorithm can be used to clip the cross section of the first virtual hole in the cross section of the virtual object according to the coordinates of the first virtual hole. The cross section of the clipped first virtual hole can be triangulated by a subdivision algorithm. The multiple triangular faces obtained after triangulation are stretched to the same height as the cross section of the first virtual hole, thereby generating the first virtual hole in the virtual object.
[0039] Optionally, after generating the first virtual hole, the fragment including the first virtual hole can be randomly offset on the virtual object to achieve the technical effect of generating cracks on the virtual object. For example, the fragment including the first virtual hole can be randomly offset along the Z-axis. This is only an example and is not specifically limited.
[0040] In step S208, in response to the movement of the virtual reality device, the virtual camera is controlled to move to the first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image.
[0041] In the technical solution provided by step S208 of this application, the virtual camera can move with the movement of the virtual reality device. Therefore, according to the movement of the virtual reality device, the virtual camera can be controlled to move to the first target position to update the original scene image to the target scene image. The target scene image may include the virtual reality scene image on the other side of the first virtual hole, which is captured by the moved virtual camera through the first virtual hole. The virtual reality scene image on the other side may be the virtual reality scene image on the side opposite to the virtual camera with the first virtual hole as a reference, such as the virtual reality scene image seen when a gun passes through a bullet hole. The target scene image may be the virtual reality scene image after the virtual weapon and virtual object interact with each other in the virtual reality scene, such as the scene image on the other side of the wall observed through the bullet hole after the gun shoots the wall in a shooting game. This is only an example and is not specifically limited.
[0042] Optionally, the target scene can be a virtual reality scene image obtained by the virtual camera shooting the virtual reality scene within the field of view of the first virtual hole after the virtual camera moves. Therefore, the movement of the virtual reality device can control the virtual camera to shoot the virtual reality scene within the field of view in real time. Compared with the virtual camera in related technologies that cannot move freely, the virtual camera in this embodiment can not only move freely, but also expand the field of view of the virtual camera, thereby achieving the technical effect of improving the player's experience.
[0043] Through steps S202 to S208 of this application, the original scene image is displayed on the virtual reality device; in response to the virtual weapon's attack on the virtual object, the impact position of the virtual weapon hitting the virtual object is determined; a first virtual hole in the virtual object is generated based on the impact position; in response to the movement of the virtual reality device, the virtual camera is controlled to move to the first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image. That is to say, the embodiments of this application can generate a first virtual hole in the virtual object based on the impact position of the virtual weapon hitting the virtual object determined when the virtual weapon attacks the virtual object, and then control the virtual camera to move to the first target position along with the movement of the virtual reality device, so as to obtain the virtual reality scene image on the other side of the first virtual hole captured by the virtual camera through the first virtual hole, thereby updating the original scene image on the virtual reality device to the target scene image, so that the virtual camera moves with the movement of the virtual reality device, and by taking pictures at the first target position, virtual reality scene images of different angles on the other side of the first virtual hole are obtained, achieving the purpose of observing different virtual reality scene images on the other side of the bullet hole, thereby solving the technical problem of single information interaction in the game and realizing the technical effect of improving the richness of information interaction in the game.
[0044] The method described above in this embodiment will be further described below.
[0045] As an alternative implementation, the method may further include, in response to an alignment operation for the virtual weapon, controlling the virtual weapon to align with a first virtual aperture to attack a virtual object in a virtual reality scene on the other side of the first virtual aperture.
[0046] In this embodiment, the virtual weapon can be controlled to aim at the first virtual hole according to the aiming operation of the virtual weapon, and then attack the virtual object in the virtual reality scene on the other side of the first virtual hole through the first virtual hole, so as to achieve the technical effect of improving the fun and realism of VR games. The virtual object can be the target of the virtual weapon, such as the virtual character in the game. This is only an example and is not specifically limited.
[0047] For example, in shooting games, you can aim the gun at a bullet hole and then shoot through a wall to attack an opponent on the other side of the wall, thus increasing the fun and realism of VR games.
[0048] As an optional implementation, step S208, in response to the movement of the virtual reality device, controls the virtual camera to move to the first target position, including: in response to the movement of the virtual reality device, controlling the virtual camera to move following the movement of the virtual reality device; acquiring a virtual scene image captured by the virtual camera at the current position, and when the virtual scene image contains a virtual reality scene image on the other side of the virtual hole, determining the current position as the first target position.
[0049] In this embodiment, a virtual scene image captured by a virtual camera at the current position can be acquired. Then, based on the movement of the virtual reality device, the virtual camera is controlled to move in accordance with the movement of the virtual reality device. When the virtual scene image captured by the virtual camera at the current position contains a virtual reality scene image on the other side of a virtual hole, the current position of the virtual camera can be determined as the first target position. For example, the gun is passed through a bullet hole, and then the opponent player on the other side of the wall is observed through the bullet hole. If the opponent player is seen, the position is determined as the first target position.
[0050] As an optional implementation, the method may further include: determining the field of view of the virtual camera after movement through the first virtual hole; controlling the virtual camera to capture images of the virtual reality scene within the field of view, thereby obtaining the virtual reality scene image captured by the virtual camera after movement.
[0051] In this embodiment, based on the movement of the virtual reality device, the virtual camera can be controlled to move along with the virtual reality device. After controlling the virtual camera to move, the viewing angle range of the virtual camera shooting through the first virtual hole can be determined, and the virtual reality scene image obtained by the virtual camera shooting the virtual reality scene within the viewing angle range can be obtained. Here, the viewing angle range can be the observation angle of the virtual camera shooting through the first virtual hole. The viewing angle range can also be used to indicate the position and direction of the virtual camera shooting through the first virtual hole. For example, the virtual camera shoots the virtual reality scene to the left front through the first virtual hole. This is only an example and is not specifically limited.
[0052] It should be noted that in related technologies, due to the inability of the virtual camera to move freely, the field of view for observing the other side of the wall through the bullet hole is relatively small, resulting in a poor player experience. However, the above steps in this application embodiment can control the virtual camera to move with the movement of the virtual reality device and control the virtual camera to shoot virtual reality scenes within the field of view in real time, thereby expanding the field of view for observing the other side of the wall through the bullet hole and thus achieving the technical effect of improving the player experience.
[0053] As an optional implementation, determining the viewing angle range of the virtual camera after movement through the first virtual hole includes: obtaining the position and orientation of the virtual camera after movement, and the size of the first virtual hole; and determining the viewing angle range of the virtual camera through the first virtual hole based on the position and orientation of the virtual camera after movement, and the size of the first virtual hole.
[0054] In this embodiment, the viewing angle range of the virtual camera through the first virtual hole can be determined based on the obtained location and orientation of the virtual camera after movement and the size of the first virtual hole. The location of the virtual camera can be the position of the virtual camera when shooting the virtual reality scene, the orientation of the virtual camera can be the shooting direction of the virtual reality scene, and the size of the first virtual hole can be the size of the bullet hole. The larger the size of the first virtual hole, the larger the viewing angle range of the first virtual hole. That is, the larger the bullet hole on the wall, the more virtual reality scene images on the other side of the wall can be observed through the bullet hole.
[0055] As an optional implementation, the method further includes: outputting a prompt message when the field of view captured by the virtual camera through the first virtual hole is empty.
[0056] In this embodiment, since the virtual camera can move with the virtual reality device, it can capture virtual reality scene images from different perspectives. If the perspective range captured by the virtual camera through the first virtual hole is empty, a prompt message can be output. The prompt message can be used to inform the player that the perspective range captured by the virtual camera is empty and that virtual reality scene images cannot be captured.
[0057] For example, in shooting games, if you want to peek out from an undamaged wall to observe the enemy teammates, the virtual camera's field of view will be empty. At this time, the system can send a prompt message to the player, while controlling the screen to turn black and displaying a return arrow on the screen. The prompt message can be: "Boundary crossed."
[0058] As an optional implementation, the method further includes: in response to an attack operation against a virtual item, when the attack operation meets preset conditions, splitting at least one virtual sub-item from the virtual item, and controlling the virtual sub-item to detach from the virtual item.
[0059] In this embodiment, rigid body parameters and gravity parameters can be added to the sub-virtual items. When the virtual weapon attacks the virtual item, if the attack operation meets the preset conditions, at least one virtual sub-item can be separated from the virtual item, and the virtual sub-item can be controlled to detach from the virtual item, so as to make the virtual sub-item fall naturally. This achieves the technical effect of improving the realism and interactivity of the VR game. The preset conditions may include the number of attack operations on the virtual item reaching a preset threshold. The preset threshold can be a custom value. The virtual sub-item may contain a first virtual hole, such as a fragment with a bullet hole.
[0060] For example, in shooting games, you can shoot at a wall with a gun. If you set a preset threshold of 5, after shooting at the wall 5 times, the hit wall blocks can fall off the entire wall, creating the effect of the entire wall breaking into multiple pieces and falling.
[0061] Optionally, the virtual sub-items split from the virtual item can be blocks that are divided in real time according to the attack operations performed by the virtual weapon on the virtual item, or they can be pre-divided blocks, that is, pre-made blocks. The cross-section of the pre-made blocks can be planar, and there is no specific limitation here.
[0062] As an optional implementation, the method may further include picking up a virtual sub-item in response to a pick-up operation for the virtual sub-item; and throwing the virtual sub-item in response to a throw operation for the virtual sub-item.
[0063] In this embodiment, after the virtual weapon's attack on the virtual object meets preset conditions and the virtual sub-item is detached from the virtual object, a collision attribute can be added to the virtual sub-item to enable it to be picked up through a pickup operation. For example, a wall block detached from the wall can be picked up. An object attribute can also be added to the virtual sub-item to enable it to be thrown through a throwing operation. For example, a wall block detached from the wall can be used as a virtual weapon for throwing, swinging, and other operations. This achieves the technical effect of allowing secondary interaction with the detached virtual sub-item, thereby enhancing the fun of the VR game.
[0064] As an optional implementation, after controlling the virtual sub-item to detach from the virtual item, the method further includes: generating a second virtual hole based on the position of the virtual sub-item in the virtual item.
[0065] In this embodiment, after the virtual sub-item is detached from the virtual item, a second virtual hole can be generated based on the position of the virtual sub-item in the virtual item. The second virtual hole can be a hole left after the virtual sub-item is detached from the virtual item, such as a hole left after a wall block is detached from the wall. This is only an example and is not specifically limited.
[0066] As an optional implementation, step S204, generating a first virtual hole in a virtual object based on the hit position, includes: determining a first sub-section including the hit position in the cross-section of the virtual object; cutting off the first sub-section from the cross-section of the virtual object to obtain a second sub-section; stretching the second sub-section according to the target stretching direction to obtain the first virtual hole in the virtual object.
[0067] In this embodiment, a first sub-section including the impact position can be determined in the cross-section of the virtual object. Then, the first sub-section is cut off from the cross-section of the virtual object to obtain a second sub-section. Finally, the second sub-section is stretched according to the target stretching direction to obtain the first virtual hole in the virtual object. The cross-section of the virtual object can be a cross-section obtained by stretching the target cross-section of the virtual object according to the target stretching direction. The outline shape of the first sub-section can be used to characterize the outline shape of the first virtual hole, such as the shape of a bullet hole. The second sub-section can be a cross-section containing the first virtual hole, such as the cross-section of a wall block with bullet holes on the wall.
[0068] Optionally, a virtual item can be obtained by stretching the cross-section of the virtual item along a target stretching direction. The cross-section of the virtual item can be a two-dimensional plane, and the target stretching direction can be the stretching direction that transforms a two-dimensional plane image into a three-dimensional object. For example, stretching the cross-section of the virtual item along the Z-axis will yield the virtual item.
[0069] As an optional implementation, determining a first sub-section including the hit position in the cross-section of the virtual item includes: obtaining first planar coordinate data associated with the hit position from the planar coordinate data of the virtual item in the target data table corresponding to the virtual item; and determining a first sub-section including the first planar coordinate data in the cross-section of the virtual item.
[0070] In this embodiment, the planar coordinate data of each point in the two-dimensional planar diagram of the virtual object can be pre-calculated into a target data table in a counterclockwise direction. Then, the first planar coordinate data associated with the hit position in the planar coordinate data of the virtual object can be obtained from the target data table corresponding to the virtual object. Finally, a first sub-section including the first planar coordinate data can be cut out from the cross section of the virtual object. The first planar coordinate data can be the coordinate data corresponding to the position where the virtual weapon hits the virtual object, such as bullet hole coordinate data.
[0071] Optionally, the first sub-section including the first plane coordinate data can be cut out from the cross section of the virtual object by a cutting algorithm. For example, the cross section of the block including the bullet hole can be cut out at the coordinate position of the bullet hole using the bullet hole coordinate data by the polygon cutting algorithm (Weiler-Atherton).
[0072] As an optional implementation, stretching the second sub-section according to the target stretching direction to obtain the first virtual hole in the virtual object includes: performing triangulation processing on the coordinate data of the second sub-section to obtain multiple triangular faces of the second sub-section; stretching the face composed of the multiple triangular faces according to the target stretching direction to obtain the first virtual hole in the virtual object.
[0073] In this embodiment, the coordinate data of the second sub-section can be triangulated using a Delaunay algorithm to obtain multiple triangular faces of the second sub-section. Then, the face composed of multiple triangular faces is stretched to the same height as the second sub-section according to the target stretching direction, thereby obtaining the first virtual hole in the virtual object. The multiple triangular faces may include multiple correct edges for generating the first virtual hole.
[0074] The technical solutions of the embodiments of this application will be further illustrated below with reference to preferred embodiments.
[0075] In related technologies, gameplay mechanics that primarily involve destroying blocks are merely used as embellishments to enhance the realism of the game. Furthermore, this gameplay is only implemented in 3D games. Players use their weapons to shoot through wooden planks and walls to damage enemies behind them. As the number of shots increases, walls or planks will be pierced by bullets, causing even greater destruction. For example, existing blocks can be destroyed to create new terrain and paths, thus enriching the gameplay.
[0076] Figure 3 This is a schematic diagram of a game interface for creating holes in a wall by shooting at a wall, according to an embodiment of this application. Figure 3 As shown, players create holes in the wall by dynamically shooting at it. This gameplay is suitable for intense gunfights and usually exists in the game as a destructible obstacle. Figure 4 This is a schematic diagram of a game interface for observing the opposite side through a hole in a wall, according to an embodiment of this application. Figure 4 As shown, because the camera position cannot be moved freely in 3D games and the observation angle is small, observing the other side through the bullet hole 41 often fails to achieve the expected effect in 3D games, resulting in the technical problem of limited information interaction in the game.
[0077] However, in this embodiment of the present disclosure, a method for dynamically generating wall holes by shooting at walls in VR is provided. This method extends and expands the gameplay of creating wall holes by shooting at walls in VR games, thereby improving the fun and realism of VR games. This solves the technical problem of limited information interaction in games and achieves the technical effect of enriching the information interaction in games.
[0078] The above method will be further described below. This method may include the following steps:
[0079] The first step is to create the prefab blocks needed for assembly. Since the fragments of the destroyed blocks are fixed, the artists need to create them in advance. The cross-section of the created blocks must be flat.
[0080] The block prefab in this embodiment is implemented using Unity. The block prefab can be understood as a block template. Its function is to create a prefab of reusable objects (e.g., models, windows, and effects) when developing certain functions. The block prefab can be loaded into the scene and instantiated by dynamic loading.
[0081] Alternatively, prefabs can be used to create multiple instances of the same block, meaning that multiple identical programmable destructible blocks can be created and placed in various parts of the game for application.
[0082] The second step is to attach a script (e.g., C# code) to each block to record the block's two-dimensional (2D) planar information (e.g., UV data). Then, compress the cross-section of the 3D block to treat it as a 2D planar block, and put the coordinates of each point on one side of the plane into a list in clockwise order. The UV data can be a 2D data array, which can be used to skin the block, that is, to add material texture maps to the white model.
[0083] Optionally, the pre-made block is a three-dimensional block. After recording the UV data of the block, the cross-section of the three-dimensional block is compressed and then regarded as a 2D planar block. The 2D planar coordinates of the block are recorded. In other words, a total of two sets of data are recorded here: UV data and 2D planar coordinate data of the block, to prepare data for the new block generated after shooting and drilling.
[0084] Alternatively, the purpose of attaching a script to each block is to store the pre-set and recorded data in a data structure within the code, so that it can be retrieved directly from the data structure when the code runs.
[0085] The third step is to create a planar diagram of the bullet holes in the gun, and to list the coordinates of each point in the 2D planar diagram in a counterclockwise direction.
[0086] The fourth step is when the player shoots a block on the wall, turning that block into a block with bullet holes.
[0087] The firing position of the gun is obtained through shooting collision, the coordinates of the bullet hole are obtained, and the bullet hole data of the current coordinate system is determined according to the list data. The 2D planar coordinate data of the block is obtained. Then, Weiler-Atherton is used to cut out the 2D planar coordinate data of the block at the coordinate position of the bullet hole using the bullet hole coordinate data. Then, point set triangulation (Delaunay) is used to triangulate the 2D planar coordinate data of the block after the bullet hole is cut out to obtain the triangular face data of the plane. The cross-section of the plane data is stretched to the same height as the original block to obtain the corresponding coordinate point data and triangular face data. Finally, the original block is deleted and a new block is generated. The newly obtained punctuation data and triangular face data are filled into the newly generated block. The UV of the original block is pasted into the new block to obtain an object block with a bullet hole. The block is randomly offset on the z-axis of the wall as a whole, causing damage caused by the impact of the gun to form a crack. The number of times the wall is damaged is incremented by 1.
[0088] Figure 5 This is a schematic diagram of 2D planar meshing using a triangulation algorithm according to an embodiment of this application, such as... Figure 5 As shown, the Delaunay triangulation algorithm is used to triangulate the existing points, connecting them into triangular faces. (a) is a 2D plan view of the wall after the bullet is fired, (b) is a schematic diagram of the mesh result obtained by the algorithm in the initial stage, (c) is a schematic diagram after judging and deleting the generated erroneous edges, (d) is a schematic diagram after regenerating the correct edges, and (e) is a schematic diagram of the final mesh result.
[0089] Fifth step: Repeat steps one through four. When the configured number of destructions is reached, add a rigid body and corresponding gravity parameters to the block, and let the block fall naturally. The effect is that the entire wall breaks into multiple pieces and falls.
[0090] The sixth step is to add collision objects and object attributes to the fallen blocks, so that the fallen blocks can be picked up for secondary interaction, and can also be used to perform swing attacks and throw attacks on enemies through collision attributes.
[0091] Optionally, a collider can be a component in a game engine (Unity) used to define the shape of game objects that collide physically. The object properties can be custom settings for the game. With the addition of dedicated code, the object in the game can be defined as a pickable object. The collision properties can be different physical collision objects that exist in the game. They interact with each other through collision detection. For example, collision detection can be used to determine whether an attack has occurred to an enemy.
[0092] Figure 6 This is a schematic diagram of the game interface of a VR shooting game according to an embodiment of this application, such as... Figure 6 As shown, in VR games, since the camera can move freely with the head-mounted display, it can observe the situation on the other side of the wall from multiple angles. However, for an undamaged wall, if you want to peek out to observe the situation on the other side, the system will automatically display prompt message 61, which is "cross the boundary", to prompt the player to cross the boundary, give the corresponding return arrow and turn the screen black.
[0093] Figure 7 This is a schematic diagram of a game interface in a VR shooting game according to an embodiment of this application, showing a gun shooting through a hole in a wall. Figure 7 As shown, in the game, you can combine the observation from the previous wall hole to shoot the enemy through the wall hole 71, which is very suitable for covert shooting gameplay.
[0094] Figure 8 This is a schematic diagram of a game interface in a VR shooting game according to an embodiment of this application, showing how shooting at a wall dynamically creates a hole. Figure 8 As shown, when the player shoots at the wall, bullet holes 81 will appear on the wall. After a certain number of shots, the wall block will be completely destroyed and then fall off the wall or windowsill. The detached block 82 can be used as a weapon, or it can be thrown or swung. This is just an example and is not a specific limitation.
[0095] In this embodiment of the application, not only can the player observe the situation on the other side through the bullet holes, but the player can also insert a gun into the generated bullet holes to fire, which enriches the gameplay and enhances the interaction between the player and the environment in the game.
[0096] In this embodiment, by pre-creating the necessary blocks for splicing, attaching a script to each block to record its 2D planar information, and then compressing the cross-section of the 3D block to treat it as a 2D planar block, the coordinates of each point on one side of the planar block are added to a list in a clockwise direction. A bullet hole planar diagram of the gun is created, and the coordinates of each point in the 2D diagram are added to a list in a counter-clockwise direction. The number of times the player shoots a block on the wall is compared with the configured number of destructions. When the configured number of destructions is reached, a rigid body and corresponding gravity parameters are added to the block, allowing it to fall naturally, resulting in the entire wall breaking into multiple pieces. The fallen blocks are given colliders and object attributes, allowing them to be picked up and interacted with. The collision attributes allow players to use the fallen objects to perform swinging and throwing attacks on enemies, thus solving the technical problem of limited information interaction in the game and achieving the technical effect of improving the richness of information interaction in the game.
[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0098] This embodiment also provides an information processing device for a game, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0099] Figure 9 This is a schematic diagram of an information processing device in a game according to an embodiment of this application, such as... Figure 9 As shown, the information processing device 900 in the game includes: a display unit 901, a determination unit 902, a generation unit 903, and a control unit 904.
[0100] Display unit 901 is used to display the original scene image on the virtual reality device. The original scene image is obtained by a virtual camera capturing the virtual reality scene. The virtual camera moves with the movement of the virtual reality device. The virtual reality scene includes virtual weapons and virtual items.
[0101] The determination unit 902 is used to determine the impact location of the virtual weapon hitting the virtual object in response to the attack operation of the virtual weapon on the virtual object.
[0102] The generation unit 903 is used to generate the first virtual hole in the virtual object based on the hit location.
[0103] Control unit 904 is used to respond to the movement of virtual reality device and control virtual camera to move to first target position with the movement of virtual reality device so as to update the original scene image to target scene image, wherein the target scene image includes virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole.
[0104] Optionally, the device may further include: a first control unit, configured to control the virtual weapon to align with a first virtual aperture in response to an alignment operation of the virtual weapon, so as to attack a virtual object in a virtual reality scene on the other side of the first virtual aperture through the first virtual aperture.
[0105] Optionally, the control unit includes: a first control module, configured to control the virtual camera to move in response to the movement of the virtual reality device; and a first determination module, configured to acquire a virtual scene image captured by the virtual camera at the current position, and determine the current position as the first target position when the virtual scene image contains a virtual reality scene image on the other side of the virtual hole.
[0106] Optionally, the device may further include: a first determining unit, used to determine the field of view of the virtual camera after movement, which captures images through the first virtual hole; and a second controlling unit, used to control the virtual camera to capture images of the virtual reality scene within the field of view, thereby obtaining the virtual reality scene images captured by the virtual camera after movement.
[0107] Optionally, the first determining unit includes: a first acquiring module, used to acquire the position and orientation of the virtual camera after movement, and the size of the first virtual hole; and a second determining module, used to determine the viewing angle range of the virtual camera shooting through the first virtual hole based on the position and orientation of the virtual camera after movement, and the size of the first virtual hole.
[0108] Optionally, the device may further include an output unit for outputting a prompt message when the field of view captured by the virtual camera through the first virtual hole is empty.
[0109] Optionally, the device may further include: a third control unit, configured to respond to an attack operation against a virtual item, wherein when the attack operation meets preset conditions, at least one virtual sub-item is separated from the virtual item, and the virtual sub-item is controlled to detach from the virtual item.
[0110] Optionally, the device may further include: a picking unit for picking up a virtual sub-item in response to a picking operation for the virtual sub-item; and a throwing unit for throwing a virtual sub-item in response to a throwing operation for the virtual sub-item.
[0111] Optionally, the third control unit is also used to generate a second virtual hole based on the position of the virtual sub-item in the virtual item after the virtual sub-item is detached from the virtual item.
[0112] Optionally, the generation unit includes: a third determining module, used to determine a first sub-section including the hit position in the cross-section of the virtual object, wherein the contour shape of the first sub-section is used to characterize the contour shape of the first virtual hole, and the cross-section of the virtual object is a cross-section obtained by stretching the target cross-section of the virtual object in a target stretching direction; a trimming module, used to trim the first sub-section from the cross-section of the virtual object to obtain a second sub-section; and a stretching module, used to stretch the second sub-section in a target stretching direction to obtain the first virtual hole in the virtual object.
[0113] Optionally, the third determining module can also be used to obtain, in the target data table corresponding to the virtual item, the first planar coordinate data associated with the hit position from the planar coordinate data of the virtual item; and to determine, in the cross section of the virtual item, a first sub-section including the first planar coordinate data.
[0114] Optionally, the stretching module can also be used to triangulate the coordinate data of the second sub-section to obtain multiple triangular faces of the second sub-section, wherein the multiple triangular faces include the correct edges for generating the first virtual hole; and stretch the face composed of the multiple triangular faces according to the target stretching direction to obtain the first virtual hole in the virtual object.
[0115] In the information processing device of this embodiment, the display unit is used to display the original scene image on the virtual reality device. The original scene image is obtained by a virtual camera capturing the virtual reality scene. The virtual camera moves with the movement of the virtual reality device. The virtual reality scene includes virtual weapons and virtual objects. The determination unit is used to determine the impact position of the virtual weapon hitting the virtual object in response to the attack operation of the virtual weapon on the virtual object. The generation unit is used to generate a first virtual hole in the virtual object based on the impact position. The control unit is used to control the virtual camera to move to a first target position in response to the movement of the virtual reality device, so as to update the original scene image to the target scene image. The target scene image includes the virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole. This allows the virtual camera to move with the movement of the virtual reality device. By capturing images at the first target position, virtual reality scene images of different angles on the other side of the first virtual hole are obtained, achieving the purpose of observing different virtual reality scene images on the other side of the bullet hole. This solves the technical problem of single information interaction in the game and achieves the technical effect of improving the richness of information interaction in the game.
[0116] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units and modules are located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.
[0117] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0118] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0119] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any terminal device in a group of terminal devices.
[0120] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0121] S1, Display the original scene on the virtual reality device. The original scene is obtained by a virtual camera capturing the virtual reality scene. The virtual camera moves with the movement of the virtual reality device. The virtual reality scene contains virtual weapons and virtual items.
[0122] S2, in response to the virtual weapon's attack on the virtual object, determines the location where the virtual weapon hits the virtual object;
[0123] S3, generates the first virtual hole in the virtual object based on the hit location;
[0124] S4, in response to the movement of the virtual reality device, controls the virtual camera to move to the first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image, wherein the target scene image includes the virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole.
[0125] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: in response to an alignment operation for a virtual weapon, controlling the virtual weapon to align with a first virtual aperture to attack a virtual object in a virtual reality scene on the other side of the first virtual aperture through the first virtual aperture.
[0126] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: in response to the movement of the virtual reality device, controlling the virtual camera to move in accordance with the movement of the virtual reality device; acquiring a virtual scene image captured by the virtual camera at the current position, and determining the current position as the first target position when the virtual scene image contains a virtual reality scene image on the other side of the virtual hole.
[0127] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining the field of view of the virtual camera after movement through the first virtual hole; controlling the virtual camera to capture images of the virtual reality scene within the field of view, thereby obtaining the virtual reality scene image captured by the virtual camera after movement.
[0128] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: obtaining the position and orientation of the virtual camera after motion, and the size of the first virtual hole; determining the viewing angle range of the virtual camera through the first virtual hole based on the position and orientation of the virtual camera after motion, and the size of the first virtual hole.
[0129] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: when the field of view captured by the virtual camera through the first virtual hole is empty, outputting a prompt message.
[0130] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: in response to an attack operation against a virtual item, when the attack operation meets preset conditions, splitting at least one virtual sub-item from the virtual item and controlling the virtual sub-item to detach from the virtual item.
[0131] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: picking up a virtual sub-item in response to a pick-up operation for the virtual sub-item; and throwing a virtual sub-item in response to a throw operation for the virtual sub-item.
[0132] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: after controlling the virtual sub-item to detach from the virtual item, generating a second virtual hole based on the position of the virtual sub-item within the virtual item.
[0133] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining a first sub-section including the hit position in the cross-section of a virtual object, wherein the contour shape of the first sub-section is used to characterize the contour shape of the first virtual hole, the cross-section of the virtual object being a cross-section obtained by stretching the target cross-section of the virtual object in a target stretching direction; cutting off the first sub-section from the cross-section of the virtual object to obtain a second sub-section; and the first virtual hole.
[0134] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: in a target data table corresponding to the virtual item, obtaining first planar coordinate data associated with the hit position from the planar coordinate data of the virtual item; and in a cross section of the virtual item, determining a first sub-section including the first planar coordinate data.
[0135] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: triangulating the coordinate data of the second sub-section to obtain multiple triangular faces of the second sub-section, wherein the multiple triangular faces include the correct edges for generating the first virtual hole; stretching the face composed of the multiple triangular faces according to the target stretching direction to obtain the first virtual hole in the virtual object.
[0136] In the computer-readable storage medium of this embodiment, an original scene image is displayed on a virtual reality device; in response to an attack operation of a virtual weapon on a virtual object, the impact position of the virtual weapon hitting the virtual object is determined; a first virtual hole in the virtual object is generated based on the impact position; in response to the movement of the virtual reality device, a virtual camera is controlled to move to a first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image, thereby causing the virtual camera to move with the movement of the virtual reality device. By taking pictures at the first target position, virtual reality scene images of different angles on the other side of the first virtual hole are obtained, achieving the purpose of observing different virtual reality scene images on the other side of the bullet hole. This solves the technical problem of single information interaction in the game and achieves the technical effect of improving the richness of information interaction in the game.
[0137] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this application.
[0138] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this application may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this embodiment according to various exemplary embodiments of this application.
[0139] The program product for implementing the above-described method according to embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of this application is not limited thereto. In the embodiments of this application, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0140] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0141] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0142] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0143] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0144] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0145] S1, Display the original scene on the virtual reality device. The original scene is obtained by a virtual camera capturing the virtual reality scene. The virtual camera moves with the movement of the virtual reality device. The virtual reality scene contains virtual weapons and virtual items.
[0146] S2, in response to the virtual weapon's attack on the virtual object, determines the location where the virtual weapon hits the virtual object;
[0147] S3, generates the first virtual hole in the virtual object based on the hit location;
[0148] S4, in response to the movement of the virtual reality device, controls the virtual camera to move to the first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image, wherein the target scene image includes the virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole.
[0149] Optionally, the processor may also be configured to perform the following steps via a computer program: in response to an alignment operation for the virtual weapon, control the virtual weapon to align with a first virtual hole to attack a virtual object in a virtual reality scene on the other side of the first virtual hole.
[0150] Optionally, the processor may also be configured to perform the following steps via a computer program: in response to the movement of the virtual reality device, control the virtual camera to move in accordance with the movement of the virtual reality device; acquire the virtual scene image captured by the virtual camera at the current position, and when the virtual scene image contains the virtual reality scene image on the other side of the virtual hole, determine the current position as the first target position.
[0151] Optionally, the processor may also be configured to perform the following steps via a computer program: determine the field of view of the virtual camera after movement through the first virtual hole; control the virtual camera to capture images of the virtual reality scene within the field of view, and obtain the virtual reality scene image captured by the virtual camera after movement.
[0152] Optionally, the processor may also be configured to perform the following steps via a computer program: obtain the position and orientation of the virtual camera after movement, and the size of the first virtual hole; determine the viewing angle range of the virtual camera through the first virtual hole based on the position and orientation of the virtual camera after movement, and the size of the first virtual hole.
[0153] Optionally, the processor may also be configured to perform the following steps via a computer program: when the field of view captured by the virtual camera through the first virtual hole is empty, output a prompt message.
[0154] Optionally, the processor may also be configured to perform the following steps via a computer program: in response to an attack operation against a virtual item, when the attack operation meets preset conditions, splitting at least one virtual sub-item from the virtual item and controlling the virtual sub-item to detach from the virtual item.
[0155] Optionally, the processor may also be configured to perform the following steps via a computer program: picking up a virtual sub-item in response to a pick-up operation for the virtual sub-item; and throwing a virtual sub-item in response to a throw operation for the virtual sub-item.
[0156] Optionally, the processor may also be configured to perform the following steps via a computer program: after controlling the virtual sub-item to detach from the virtual item, generate a second virtual hole based on the position of the virtual sub-item within the virtual item.
[0157] Optionally, the processor may also be configured to perform the following steps via a computer program: determining a first sub-section including the hit position in the cross-section of the virtual object, wherein the contour shape of the first sub-section is used to characterize the contour shape of the first virtual hole, and the cross-section of the virtual object is a cross-section obtained by stretching the target cross-section of the virtual object in the target stretching direction; cutting off the first sub-section from the cross-section of the virtual object to obtain a second sub-section; and the first virtual hole.
[0158] Optionally, the processor may also be configured to perform the following steps via a computer program: in the target data table corresponding to the virtual item, obtain the first planar coordinate data associated with the hit position from the planar coordinate data of the virtual item; in the cross section of the virtual item, determine a first sub-section including the first planar coordinate data.
[0159] Optionally, the processor may also be configured to perform the following steps via a computer program: triangulate the coordinate data of the second sub-section to obtain multiple triangular faces of the second sub-section, wherein the multiple triangular faces include the correct edges for generating the first virtual hole; stretch the face composed of the multiple triangular faces according to the target stretching direction to obtain the first virtual hole in the virtual object.
[0160] In the electronic device of this embodiment, the original scene image is displayed on the virtual reality device; in response to the attack operation of the virtual weapon on the virtual object, the impact position of the virtual weapon hitting the virtual object is determined; a first virtual hole in the virtual object is generated based on the impact position; in response to the movement of the virtual reality device, the virtual camera is controlled to move to a first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image, thereby making the virtual camera move with the movement of the virtual reality device. By taking pictures at the first target position, virtual reality scene images of different angles on the other side of the first virtual hole are obtained, achieving the purpose of observing different virtual reality scene images on the other side of the bullet hole. This solves the technical problem of single information interaction in the game and achieves the technical effect of improving the richness of information interaction in the game.
[0161] Figure 10 This is a schematic diagram of an electronic device according to an embodiment of this application. Figure 10 As shown, the electronic device 1000 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0162] like Figure 10As shown, the electronic device 1000 is presented in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one processor 1010, at least one memory 1020, a bus 1030 connecting different system components (including memory 1020 and processor 1010), and a display 1040.
[0163] The memory 1020 stores program code that can be executed by the processor 1010, causing the processor 1010 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this application.
[0164] The memory 1020 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 10201 and / or cache memory 10202, and may further include read-only memory (ROM) 10203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0165] In some instances, memory 1020 may also include programs / utilities 10204 having a set (at least one) of program modules 10205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 1020 may further include memory remotely located relative to processor 1010, which can be connected to electronic device 1000 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0166] Bus 1030 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 1010, or a local bus using any of the various bus structures.
[0167] The display 1040 may be, for example, a touch screen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 1000.
[0168] Optionally, the electronic device 1000 can also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 1050. Furthermore, the electronic device 1000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 1060. Figure 10 As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030. It should be understood that, although... Figure 10 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0169] The aforementioned electronic device 1000 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.
[0170] Those skilled in the art will understand that Figure 10 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 1000 may also include components that are more... Figure 10 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 1020 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the method in this embodiment. The processor 1010 executes various functional applications and data processing by running the computer program stored in the memory 1020, thereby implementing the above-described method.
[0171] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0172] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0173] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0174] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0175] Furthermore, the functional units in the various embodiments of this application 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. The integrated unit can be implemented in hardware or as a software functional unit.
[0176] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. 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 application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0177] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. An information processing method in a game, characterized in that, include: The original scene is displayed on a virtual reality device, wherein the original scene is obtained by a virtual camera capturing the virtual reality scene, and the virtual camera moves with the movement of the virtual reality device, wherein the virtual reality scene includes virtual weapons and virtual items; In response to the attack operation of the virtual weapon on the virtual object, determine the impact location of the virtual weapon hitting the virtual object; A first virtual hole is generated in the virtual object based on the hit location, wherein the first virtual hole is a trace left by the virtual weapon when it damages the virtual object; In response to the movement of the virtual reality device, the virtual camera is controlled to move to a first target position along with the movement of the virtual reality device, so as to update the original scene image to the target scene image. The target scene image includes a virtual reality scene image on the other side of the first virtual hole, which is captured by the moved virtual camera through the first virtual hole. The virtual reality scene image on the other side is the virtual reality scene image on the side opposite to the virtual camera with the first virtual hole as a reference.
2. The method according to claim 1, characterized in that, The method further includes: In response to an aiming operation of the virtual weapon, the virtual weapon is controlled to aim at the first virtual hole to attack a virtual object in the virtual reality scene on the other side of the first virtual hole.
3. The method according to claim 1, characterized in that, In response to the movement of the virtual reality device, controlling the virtual camera to move to a first target position along with the movement of the virtual reality device includes: In response to the movement of the virtual reality device, the virtual camera is controlled to move in accordance with the movement of the virtual reality device; The virtual scene image captured by the virtual camera at the current position is obtained. When the virtual scene image contains the virtual reality scene image on the other side of the virtual hole, the current position is determined as the first target position.
4. The method according to claim 1, characterized in that, The method further includes: Determine the field of view range of the virtual camera after movement, as it captures images through the first virtual hole; The virtual camera is controlled to capture images of the virtual reality scene within the field of view, thereby obtaining images of the virtual reality scene captured by the virtual camera after movement.
5. The method according to claim 4, characterized in that, Determining the field of view of the virtual camera after movement, captured through the first virtual hole, includes: Obtain the position and orientation of the virtual camera after the motion, as well as the size of the first virtual hole; Based on the position and orientation of the virtual camera after movement, and the size of the first virtual hole, the viewing angle range of the virtual camera shooting through the first virtual hole is determined.
6. The method according to claim 4, characterized in that, The method further includes: When the field of view captured by the virtual camera through the first virtual hole is empty, a prompt message is output.
7. The method according to claim 1, characterized in that, The method further includes: In response to an attack operation targeting the virtual item, when the attack operation meets preset conditions, at least one virtual sub-item is separated from the virtual item, and the virtual sub-item is controlled to detach from the virtual item.
8. The method according to claim 7, characterized in that, The method further includes: In response to a pick-up operation for the virtual sub-item, pick up the virtual sub-item; In response to a throw operation targeting the virtual sub-item, the virtual sub-item is thrown.
9. The method according to claim 7, characterized in that, The virtual sub-item includes the first virtual hole.
10. The method according to claim 7, characterized in that, After controlling the virtual sub-item to detach from the virtual item, the method further includes: A second virtual hole is generated based on the position of the virtual sub-item within the virtual item.
11. The method according to claim 7, characterized in that, The preset conditions include: The number of attack operations against the virtual item reaches a preset threshold.
12. The method according to claim 1, characterized in that, The virtual item is composed of multiple virtual sub-items.
13. The method according to claim 1, characterized in that, Generating a first virtual hole in the virtual object based on the hit location includes: In the cross section of the virtual object, a first sub-cross section including the hit position is determined, wherein the contour shape of the first sub-cross section is used to characterize the contour shape of the first virtual hole, and the cross section of the virtual object is a cross section obtained by stretching the target cross section of the virtual object in the target stretching direction; The first sub-section is cut off from the cross-section of the virtual item to obtain the second sub-section; The second sub-section is stretched according to the target stretching direction to obtain the first virtual hole in the virtual object.
14. The method according to claim 13, characterized in that, Within the cross-section of the virtual object, a first sub-section including the hit location is determined, including: In the target data table corresponding to the virtual item, obtain the first planar coordinate data associated with the hit position from the planar coordinate data of the virtual item; Within the cross-section of the virtual item, a first sub-section including the first planar coordinate data is determined.
15. The method according to claim 13, characterized in that, The second sub-section is stretched according to the target stretching direction to obtain the first virtual hole in the virtual object, including: The coordinate data of the second sub-section are triangulated to obtain multiple triangular faces of the second sub-section, wherein the multiple triangular faces include the correct edges used to generate the first virtual hole; The surface composed of the plurality of triangular faces is stretched according to the target stretching direction to obtain the first virtual hole in the virtual object.
16. An information processing device for games, characterized in that, include: The display unit is used to display the original scene image on the virtual reality device, wherein the original scene image is obtained by a virtual camera capturing the virtual reality scene, the virtual camera moves with the movement of the virtual reality device, and the virtual reality scene includes virtual weapons and virtual items; A determining unit is configured to determine the impact location of the virtual weapon hitting the virtual object in response to the attack operation of the virtual weapon on the virtual object; A generation unit is configured to generate a first virtual hole in the virtual object based on the hit location, wherein the first virtual hole is a trace left by the virtual weapon when it damages the virtual object; A control unit is configured to respond to the movement of the virtual reality device by controlling the virtual camera to move to a first target position along with the movement of the virtual reality device, so as to update the original scene image to a target scene image, wherein the target scene image includes a virtual reality scene image on the other side of the first virtual hole captured by the moved virtual camera through the first virtual hole, and the virtual reality scene image on the other side is a virtual reality scene image on the side opposite to the virtual camera with reference to the first virtual hole.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 15 when executed by a processor.
18. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 15.