CN117994284A - Collision detection method, collision detection device, electronic equipment and storage medium - Google Patents
Collision detection method, collision detection device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117994284A CN117994284A CN202211371117.1A CN202211371117A CN117994284A CN 117994284 A CN117994284 A CN 117994284A CN 202211371117 A CN202211371117 A CN 202211371117A CN 117994284 A CN117994284 A CN 117994284A
- Authority
- CN
- China
- Prior art keywords
- target object
- bound
- collision
- collision detection
- virtual reality
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 87
- 238000000034 method Methods 0.000 claims description 28
- 230000006870 function Effects 0.000 claims description 16
- 230000000694 effects Effects 0.000 claims description 9
- 230000003238 somatosensory effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000000007 visual effect Effects 0.000 description 5
- 208000013057 hereditary mucoepithelial dysplasia Diseases 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000003997 social interaction Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000005191 phase separation Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The disclosure relates to the technical field of computers, and in particular relates to a collision detection method, a device, electronic equipment and a storage medium.
Description
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a collision detection method, a collision detection device, electronic equipment and a storage medium.
Background
An Extended Reality (XR) technology can combine Reality with virtual through a computer, and provides a virtual Reality space for human-computer interaction for users. In virtual reality space, a user may perform social interactions, entertainment, learning, work, tele-office, authoring UGC (User Generated Content ), etc. through a virtual reality device, such as a head mounted display (Head Mount Display, HMD). In the related augmented reality application, the provided technical scheme of the collision detection scheme is complex, and more computing resources are consumed.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a collision detection method including:
Determining the position relation between geometric figures bound with a target object to be detected in a virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance;
Based on the positional relationship, it is determined whether a collision occurs between the target objects in the virtual reality space.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a collision detection apparatus including:
The position determining unit is used for determining the position relation between geometric figures bound with a target object to be detected in the virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance;
And a collision determination unit configured to determine whether a collision occurs between the target objects in the virtual reality space based on the positional relationship.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device comprising: at least one memory and at least one processor; wherein the memory is configured to store program code, and the processor is configured to invoke the program code stored by the memory to cause the electronic device to perform a collision detection method provided in accordance with one or more embodiments of the present disclosure.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a non-transitory computer storage medium storing program code which, when executed by a computer device, causes the computer device to perform a collision detection method provided according to one or more embodiments of the present disclosure.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a collision detection method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a virtual reality device according to an embodiment of the disclosure;
FIG. 3 is an alternative schematic diagram of a virtual field of view of a virtual reality device provided in accordance with an embodiment of the present disclosure;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the steps recited in the embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Furthermore, embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. The term "responsive to" and related terms mean that one signal or event is affected to some extent by another signal or event, but not necessarily completely or directly. If event x occurs "in response to" event y, x may be directly or indirectly in response to y. For example, the occurrence of y may ultimately lead to the occurrence of x, but other intermediate events and/or conditions may exist. In other cases, y may not necessarily result in the occurrence of x, and x may occur even though y has not yet occurred. Furthermore, the term "responsive to" may also mean "at least partially responsive to".
The term "determining" broadly encompasses a wide variety of actions, which may include obtaining, calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure), ascertaining and the like, and may also include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory) and the like, as well as parsing, selecting, choosing, establishing and the like. Related definitions of other terms will be given in the description below. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
For the purposes of this disclosure, the phrase "a and/or B" means (a), (B), or (a and B).
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The collision detection method provided by one or more embodiments of the present disclosure may be used for virtual reality devices, and may include, but is not limited to, the following types:
And the computer-side virtual reality (PCVR) equipment performs related calculation of virtual reality functions and data output by using the PC side, and the external computer-side virtual reality equipment realizes the effect of virtual reality by using the data output by the PC side.
The mobile virtual reality device supports setting up a mobile terminal (such as a smart phone) in various manners (such as a head-mounted display provided with a special card slot), performing related calculation of a virtual reality function by the mobile terminal through connection with the mobile terminal in a wired or wireless manner, and outputting data to the mobile virtual reality device, for example, watching a virtual reality video through an APP of the mobile terminal.
The integrated virtual reality device has a processor for performing the calculation related to the virtual function, and thus has independent virtual reality input and output functions, and is free from connection with a PC or a mobile terminal, and has high degree of freedom in use.
Of course, the form of implementation of the virtual reality device is not limited to this, and may be further miniaturized or enlarged as needed.
The sensor (such as a nine-axis sensor) for detecting the gesture in the virtual reality device is arranged in the virtual reality device, and is used for detecting the gesture change of the virtual reality device in real time, if the user wears the virtual reality device, when the gesture of the head of the user changes, the real-time gesture of the head is transmitted to the processor, so that the gaze point of the sight of the user in the virtual environment is calculated, an image in the gaze range (namely a virtual view field) of the user in the three-dimensional model of the virtual environment is calculated according to the gaze point, and the image is displayed on the display screen, so that the user looks like watching in the real environment.
Referring to fig. 2, a user may enter a virtual reality space through a virtual reality device, such as head-mounted VR glasses, and control his or her Avatar (Avatar) in the virtual reality space to socially interact with other user-controlled avatars, entertain, learn, remotely office, etc. In some embodiments, the avatar may display an animated avatar of the avatar or a real image of the user, which is not limiting herein.
In one embodiment, in virtual reality space, a user may implement related interactive operations through a controller, which may be a handle, for example, a user performs related operation control through operation of keys of the handle. Of course, in other embodiments, the target object in the virtual reality device may be controlled using a gesture or voice or multi-mode control mode instead of using the controller.
The collision detection method provided by one or more embodiments of the present disclosure employs an Extended Reality (XR) technique. The augmented reality technology can combine reality with virtual through a computer, and provides a virtual reality space for a user to interact with. In virtual reality space, a user may perform social interactions, entertainment, learning, work, tele-office, authoring UGC (User Generated Content ), etc. through a virtual reality device, such as a head mounted display (Head Mount Display, HMD).
Fig. 3 shows an alternative schematic view of a virtual field of view of a virtual reality device according to an embodiment of this disclosure, where a horizontal field of view angle and a vertical field of view angle are used to describe a distribution range of the virtual field of view in a virtual environment, a vertical direction of distribution range is represented by a vertical field of view angle BOC, a horizontal direction of distribution range is represented by a horizontal field of view angle AOB, and an image of the virtual field of view in the virtual environment can always be perceived by a human eye through a lens. The angle of view represents a distribution range of viewing angles that the lens has when sensing an environment. For example, the angle of view of a virtual reality device indicates the range of distribution of viewing angles that the human eye has when a virtual environment is perceived through a lens of the virtual reality device; for another example, in a mobile terminal provided with a camera, the field angle of the camera is a distribution range of the viewing angle that the camera has when sensing the real environment to shoot.
Virtual reality devices, such as HMDs, integrate several cameras (e.g., depth cameras, RGB cameras, etc.), the purpose of which is not limited to providing a through view only. The camera images and integrated Inertial Measurement Unit (IMU) provide data that can be processed by computer vision methods to automatically analyze and understand the environment. Also, HMDs are designed to support not only passive computer vision analysis, but also active computer vision analysis. The passive computer vision method analyzes image information captured from the environment. These methods may be monoscopic (images from a single camera) or stereoscopic (images from two cameras). Including but not limited to feature tracking, object recognition, and depth estimation. Active computer vision methods add information to the environment by projecting a pattern that is visible to the camera but not necessarily to the human vision system. Such techniques include time-of-flight (ToF) cameras, laser scanning, or structured light to simplify stereo matching issues. Active computer vision is used to implement scene depth reconstruction.
Referring to fig. 1, fig. 1 shows a flowchart of a collision detection method 100 according to an embodiment of the present disclosure, where the method 100 includes steps S120-S140.
Step S120: and determining the position relation between the geometric figures bound with the target object to be detected in the virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance.
The collision detection method provided by the embodiment is used for detecting the target object in the virtual reality space. The virtual reality space may be a simulation environment for the real world, a semi-simulated and semi-fictional virtual scene, or a purely fictional virtual scene. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene or a three-dimensional virtual scene, and the dimension of the virtual scene is not limited in the embodiment of the present application. For example, a virtual scene may include sky, land, sea, etc., the land may include environmental elements of a desert, city, etc., and a user may control a virtual object to move in the virtual scene.
In some embodiments, the target object may include, but is not limited to, a model, an animation, a special effect, etc., displayed in virtual reality space.
In some embodiments, the geometry may be a two-dimensional planar geometry or a three-dimensional solid geometry.
In some embodiments, the geometry may include a basic geometry, including, for example, a cylinder (including a cylinder, a prism), a cone (including a cone, a pyramid), a sphere (including an ellipsoid), a table, a torus.
In some embodiments, a corresponding geometric image may be created in advance based on the target object to be detected, and the created geometric figure is bound to the corresponding target object.
In one embodiment, an API (Application Programming Interface ) for creating graphics may be called in advance to create the geometry, and a preset binding API is called to bind the created geometry to the target object. After the geometric figure is bound with the game object, the position of the geometric figure in the virtual reality space can reflect the position of the target object bound by the geometric figure behind the virtual reality space, and the bound geometric figure can follow the target object in the virtual reality space in a manner invisible to the user so as to move to the user.
In a specific embodiment, step S140 may be performed in response to a collision detection request during the running of the virtual reality application, where the collision detection request may be automatically triggered by the client based on a preset condition, or in response to an operation of the client by the user, and the disclosure is not limited herein.
Step S140: based on the positional relationship, it is determined whether a collision occurs between the target objects in the virtual reality space.
In some embodiments, the positional relationship may include intersecting, separating. In this embodiment, the intersection refers to a portion that is common between two geometric figures, that is, the set of points belonging to both are not empty, and the intersection may include tangency, phase connection, intersecting, or inclusion; phase separation (or outer separation) refers to the fact that there is no common part between the two geometries, i.e. the set of points belonging to both at the same time is an empty set.
In one embodiment, if a first geometry of a first target object binding intersects a second geometry of a second target object binding, determining that the first target object collides with the second target object; or if the first geometric figure bound by the first target object is separated from the second geometric figure bound by the second target object, determining that the first target object and the second target object are not collided.
According to one or more embodiments of the present disclosure, by determining a positional relationship between geometric figures bound to target objects to be detected in a virtual reality space, whether collision occurs between the target objects in the virtual reality space is determined based on the positional relationship between the bound geometric figures, so that whether collision occurs between the target objects in the virtual reality space can be determined simply and conveniently based on the positional relationship between the geometric figures, and further, computational resources can be saved.
In some embodiments, the positional relationship may be detected based on a preset collision detection frequency.
In some embodiments, the preset collision detection frequency may be a lower frequency, such as 0.7S-1.0S, to detect whether a collision occurs once, thereby saving computing resources.
In some embodiments, the collision detection frequency adopted in the scene may be determined in advance based on the scene provided by the client and requiring collision detection. For example, the collision detection frequency for each scenario may be determined in advance based on different scenarios provided to the user by the virtual reality client (e.g., VR application), which may correspond to different collision detection frequencies. For example, if the accuracy and timeliness requirements of the first scene presented to the user by the virtual reality client on collision detection are low, a lower collision detection frequency may be used to detect whether the target object collides in the first scene, so as to save computing resources; if the second scene revealed to the user by the virtual reality client has higher requirements on the accuracy and timeliness of collision detection, a higher collision detection frequency can be adopted to detect whether the target object collides in the second scene so as to meet the requirements of the scene on the accuracy and timeliness of collision detection.
In some embodiments, the bound target objects may be grouped in advance based on the scene provided by the client that requires collision detection, each group having a corresponding collision detection frequency.
For example, assuming that a scene provided by the client that needs collision detection has a low detection requirement for detecting a collision between the target objects a and B and a scene provided by the client that needs collision detection has a high detection requirement for detecting a collision between the target objects C and D, the target objects a and B may be divided into a first group and the target objects C and D may be divided into a second group. The first packet corresponds to a first collision detection frequency and the second packet corresponds to a second collision detection frequency, the first collision detection frequency being lower than the second collision detection frequency.
Therefore, the bound target objects are grouped in advance based on the scene provided by the client and required to be subjected to collision detection, and each group has corresponding collision detection frequency, so that the collision detection between different target objects can be performed, the adaptive detection frequency is adopted, the requirements on the collision detection under different scenes can be met, and the computing resources can be saved.
In some embodiments, step S140 includes:
Step A1: and if the target collision detection scene is currently in the target collision detection scene, determining the position relation between geometric figures bound by the target object to be detected in the virtual reality space.
In this embodiment, if the scene that is currently provided by the client and needs to be subjected to collision detection is the target collision detection scene, step S140 is performed. For example, the target detection scene may be a scene in which it is only necessary to detect whether a collision occurs, and it is not necessary to consider other factors such as physical reality that the target object presents after the collision occurs.
In a specific implementation manner, a collision detection interface may be preset, where the collision detection interface is configured to be capable of executing the collision detection method provided by one or more embodiments of the present disclosure, and if it is determined that a scene currently provided by the client is a target detection scene, the interface is called to execute collision detection.
According to one or more embodiments of the present disclosure, when a scene currently provided by a client is a target detection scene, whether a collision occurs between target objects is determined based on a positional relationship between geometric figures to which the target objects are bound, so that computing resources can be saved to the greatest extent while the collision detection purpose is satisfied.
It should be noted that, according to the teaching and actual requirements of the present embodiment, a person skilled in the art may set whether the virtual reality scene belongs to the target detection scene according to the specific virtual reality scene, which is not described herein.
In some embodiments, the method 100 further comprises:
step S151: and if the collision between the target objects is determined, executing preset collision feedback.
Wherein the performing the preset crash feedback includes one or more of: and displaying preset collision feedback information, executing a preset function, and changing the motion state or the display state of the target object.
The collision feedback information includes one or more of the following: text, animation, special effects, speech, somatosensory feedback. The somatosensory feedback includes but is not limited to vibration feedback, tactile feedback, olfactory feedback, temperature feedback and the like.
In a specific embodiment, if it is determined that two target objects in the virtual space collide, collision feedback information such as a preset collision animation, special effects, sound effects or vibration can be displayed to prompt a user.
In a specific embodiment, if it is determined that two target objects in the virtual space collide, a preset function may be performed. For example, taking a game as an example, if it is determined that a collision occurs between target objects, game values (e.g., points, levels, vital values, etc.) of one or more users may be updated based on preset game rules.
In a specific embodiment, if it is determined that two target objects in the virtual space collide, changing a motion state of a motion track (for example, turning or rebounding the target object), a motion direction, a motion acceleration, a motion speed, or the like of the target object may be performed based on preset logic, or changing a display state of the target object. Wherein changing the display state of the target object includes changing or replacing a visual representation of the target object (e.g., a model or animation corresponding to the target object), e.g., changing the size, shape, color, brightness, light special effects of the visual representation of the target object, adding or deleting visual elements on the visual representation of the target object, or replacing the visual representation of the target object.
In some embodiments, the method 100 further comprises:
Step S152: and if the fact that collision does not occur between the target objects is determined, the current motion rule or the display rule of the target objects is not changed.
In a specific embodiment, if the target object is currently moving based on a preset movement rule, the target object may be made to continue to move according to the movement rule, for example, if the current target object is currently performing parabolic movement or free-falling movement, the target object may be made to continue to perform parabolic movement or free-falling movement.
In one embodiment, if the target object is currently displayed based on a preset display rule, the target object may be allowed to continue to be displayed according to the display rule. It should be noted that, the display rule may be used to make the display state of the target object constant, or make the display state of the target object change based on a preset rule, which is not limited in this disclosure. For example, if the target object is always displayed in the first display state, continuing to make the target object in the first display state; if the target object is currently switched back and forth between the first display state and the second display state according to the preset period, continuing to enable the target object to be switched back and forth between the first display state and the second display state according to the preset period.
Accordingly, there is provided a collision detecting apparatus according to an embodiment of the present disclosure, including:
The position determining unit is used for determining the position relation between geometric figures bound with a target object to be detected in the virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance;
And a collision determination unit configured to determine whether a collision occurs between the target objects in the virtual reality space based on the positional relationship.
In some embodiments, the geometry comprises a base geometry.
In some embodiments, the bound geometry moves in the virtual reality space following the bound target object.
In some embodiments, the collision determination unit is configured to determine that the first target object collides with the second target object if a first geometry bound to the first target object intersects a second geometry bound to the second target object, or determine that the first target object does not collide with the second target object if the first geometry bound to the first target object is separated from the second geometry bound to the second target object.
In some embodiments, the position determining unit is configured to detect a positional relationship between the geometric figures based on a preset detection frequency.
In some embodiments, the apparatus further comprises:
And the frequency determining unit is used for determining the collision detection frequency adopted in the scene based on the scene which is provided by the client and needs to be subjected to collision detection.
In some embodiments, the apparatus further comprises:
And the grouping unit is used for grouping the bound target objects based on the scene which is provided by the client and needs to be subjected to collision detection, and each grouping has a corresponding collision detection frequency.
In some embodiments, the location determining unit is configured to determine a location relationship between geometries bound to a target object to be detected in the virtual reality space if the target collision detection scene is currently in the target collision detection scene.
In some embodiments, the apparatus further comprises:
The collision feedback unit is used for executing preset collision feedback if the collision between the target objects is determined; wherein the performing the preset crash feedback includes one or more of: displaying preset collision feedback information, executing a preset function, and changing the motion state or the display state of the target object; the collision feedback information includes one or more of the following: text, animation, special effects, speech, somatosensory feedback.
In some embodiments, the collision feedback unit is configured to not change a current motion rule or a display rule of the target object if it is determined that no collision occurs between the target objects.
For embodiments of the device, reference is made to the description of method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate modules may or may not be separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Accordingly, in accordance with one or more embodiments of the present disclosure, there is provided an electronic device comprising:
at least one memory and at least one processor;
wherein the memory is configured to store program code, and the processor is configured to invoke the program code stored by the memory to cause the electronic device to perform a collision detection method provided in accordance with one or more embodiments of the present disclosure.
Accordingly, in accordance with one or more embodiments of the present disclosure, there is provided a non-transitory computer storage medium storing program code executable by a computer device to cause the computer device to perform a collision detection method provided in accordance with one or more embodiments of the present disclosure.
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., a terminal device or server) 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801, which may perform various appropriate actions and processes according to programs stored in a Read Only Memory (ROM) 802 or programs loaded from a storage 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 shows an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods of the present disclosure described above.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a collision detection method including: determining the position relation between geometric figures bound with a target object to be detected in a virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance; based on the positional relationship, it is determined whether a collision occurs between the target objects in the virtual reality space.
According to one or more embodiments of the present disclosure, the geometric figures include basic geometric shapes.
According to one or more embodiments of the present disclosure, the bound geometry moves in the virtual reality space following the bound target object.
According to one or more embodiments of the present disclosure, the determining whether a collision occurs between the target objects in the virtual reality space based on the positional relationship includes: if the first geometric figure bound by the first target object intersects with the second geometric figure bound by the second target object, determining that the first target object collides with the second target object; or if the first geometric figure bound by the first target object is separated from the second geometric figure bound by the second target object, determining that the first target object and the second target object are not collided.
According to one or more embodiments of the present disclosure, the positional relationship is detected based on a preset collision detection frequency.
According to one or more embodiments of the present disclosure, a collision detection frequency employed in a scene provided by a client that needs collision detection is determined in advance based on the scene.
According to one or more embodiments of the present disclosure, bound target objects are grouped in advance based on a scene provided by a client that requires collision detection, each group having a corresponding collision detection frequency.
According to one or more embodiments of the present disclosure, the determining a positional relationship between geometric figures bound to a target object to be detected in a virtual reality space includes: and if the target collision detection scene is currently in the target collision detection scene, determining the position relation between geometric figures bound by the target object to be detected in the virtual reality space.
According to one or more embodiments of the present disclosure, if it is determined that a collision occurs between the target objects, a preset collision feedback is performed; wherein the performing the preset crash feedback includes one or more of: displaying preset collision feedback information, executing a preset function, and changing the motion state or the display state of the target object; the collision feedback information includes one or more of the following: text, animation, special effects, speech, somatosensory feedback.
According to one or more embodiments of the present disclosure, if it is determined that no collision occurs between the target objects, the current motion rule or display rule of the target objects is not changed.
According to one or more embodiments of the present disclosure, there is provided a collision detection apparatus including: the position determining unit is used for determining the position relation between geometric figures bound with a target object to be detected in the virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance; and a collision determination unit configured to determine whether a collision occurs between the target objects in the virtual reality space based on the positional relationship.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one memory and at least one processor; wherein the memory is configured to store program code, and the processor is configured to invoke the program code stored by the memory to cause the electronic device to perform a collision detection method provided in accordance with one or more embodiments of the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer storage medium storing program code which, when executed by a computer device, causes the computer device to perform a collision detection method provided according to one or more embodiments of the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
Claims (13)
1. A collision detection method, characterized by comprising:
Determining the position relation between geometric figures bound with a target object to be detected in a virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance;
Based on the positional relationship, it is determined whether a collision occurs between the target objects in the virtual reality space.
2. The method of claim 1, wherein the geometry comprises a base geometry.
3. The method of claim 1, wherein the bound geometry moves in the virtual reality space following the bound target object.
4. The method of claim 1, wherein the determining whether a collision occurs between the target objects in the virtual reality space based on the positional relationship comprises:
if the first geometric figure bound by the first target object intersects with the second geometric figure bound by the second target object, determining that the first target object collides with the second target object; or alternatively
And if the first geometric figure bound by the first target object is separated from the second geometric figure bound by the second target object, determining that the first target object and the second target object are not collided.
5. The method according to claim 1, wherein determining the positional relationship between the geometric figures bound to the target object to be detected in the virtual reality space comprises:
And detecting the position relationship based on a preset collision detection frequency.
6. The method as recited in claim 5, further comprising:
And determining the collision detection frequency adopted under the scene based on the scene which is provided by the client and needs to be subjected to collision detection in advance.
7. The method as recited in claim 5, further comprising:
The bound target objects are grouped in advance based on a scene provided by the client and needing collision detection, and each group has a corresponding collision detection frequency.
8. The method according to claim 1, wherein determining the positional relationship between the geometric figures bound to the target object to be detected in the virtual reality space comprises:
and if the target collision detection scene is currently in the target collision detection scene, determining the position relation between geometric figures bound by the target object to be detected in the virtual reality space.
9. The method as recited in claim 1, further comprising:
if the collision between the target objects is determined, executing preset collision feedback;
Wherein the performing the preset crash feedback includes one or more of: displaying preset collision feedback information, executing a preset function, and changing the motion state or the display state of the target object;
the collision feedback information includes one or more of the following: text, animation, special effects, speech, somatosensory feedback.
10. The method as recited in claim 1, further comprising:
And if the fact that collision does not occur between the target objects is determined, the current motion rule or the display rule of the target objects is not changed.
11. A collision detection apparatus, characterized by comprising:
The position determining unit is used for determining the position relation between geometric figures bound with a target object to be detected in the virtual reality space, wherein the target object is bound with the corresponding geometric figure in advance;
And a collision determination unit configured to determine whether a collision occurs between the target objects in the virtual reality space based on the positional relationship.
12. An electronic device, comprising:
at least one memory and at least one processor;
Wherein the memory is for storing program code and the processor is for invoking the program code stored in the memory to cause the electronic device to perform the method of any of claims 1-10.
13. A non-transitory computer storage medium comprising,
The non-transitory computer storage medium stores program code that, when executed by a computer device, causes the computer device to perform the method of any of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211371117.1A CN117994284A (en) | 2022-11-03 | 2022-11-03 | Collision detection method, collision detection device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211371117.1A CN117994284A (en) | 2022-11-03 | 2022-11-03 | Collision detection method, collision detection device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117994284A true CN117994284A (en) | 2024-05-07 |
Family
ID=90896014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211371117.1A Pending CN117994284A (en) | 2022-11-03 | 2022-11-03 | Collision detection method, collision detection device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117994284A (en) |
-
2022
- 2022-11-03 CN CN202211371117.1A patent/CN117994284A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102233052B1 (en) | Mixed reality graduated information delivery | |
CN117994284A (en) | Collision detection method, collision detection device, electronic equipment and storage medium | |
US20240078734A1 (en) | Information interaction method and apparatus, electronic device and storage medium | |
CN117631904A (en) | Information interaction method, device, electronic equipment and storage medium | |
WO2024012106A1 (en) | Information interaction method and apparatus, electronic device, and storage medium | |
WO2023231666A1 (en) | Information exchange method and apparatus, and electronic device and storage medium | |
CN117991889A (en) | Information interaction method, device, electronic equipment and storage medium | |
WO2024016880A1 (en) | Information interaction method and apparatus, and electronic device and storage medium | |
CN117641040A (en) | Video processing method, device, electronic equipment and storage medium | |
CN117631921A (en) | Information interaction method, device, electronic equipment and storage medium | |
CN117075770A (en) | Interaction control method and device based on augmented reality, electronic equipment and storage medium | |
CN115981544A (en) | Interaction method and device based on augmented reality, electronic equipment and storage medium | |
CN118227005A (en) | Information interaction method, device, electronic equipment and storage medium | |
CN117519456A (en) | Information interaction method, device, electronic equipment and storage medium | |
CN117435041A (en) | Information interaction method, device, electronic equipment and storage medium | |
CN117641026A (en) | Model display method, device, equipment and medium based on virtual reality space | |
CN117519457A (en) | Information interaction method, device, electronic equipment and storage medium | |
CN117632063A (en) | Display processing method, device, equipment and medium based on virtual reality space | |
CN117193915A (en) | Terminal control method, device, electronic equipment and storage medium | |
CN117934769A (en) | Image display method, device, electronic equipment and storage medium | |
CN118429578A (en) | Control method, device, terminal and storage medium based on augmented reality | |
CN117631810A (en) | Operation processing method, device, equipment and medium based on virtual reality space | |
CN117994403A (en) | Scene loading method and device, electronic equipment and storage medium | |
CN117389502A (en) | Spatial data transmission method, device, electronic equipment and storage medium | |
CN118038772A (en) | Display control method, device, terminal and storage medium based on augmented reality |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |