Information processing device, program, and contact determination method

By calculating the length of a line segment in a capsule shape and switching to spherical detection when appropriate, the processing load for collision detection is reduced, addressing the inefficiency of capsule-based methods.

JP7737849B2Active Publication Date: 2025-09-11KOEI TECMO GAMES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021149546
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2025-09-11
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

Existing collision detection methods for objects in object space, particularly when using a capsule shape, result in higher processing loads compared to using a sphere shape, which is not effectively addressed by prior art.

Method used

An information processing device that calculates the length of a line segment connecting the centers of hemispheres in a capsule shape and switches the contact detection processing from capsule to spherical shape when the segment length is below a threshold, reducing processing load.

Benefits of technology

This approach reduces the processing load for collision detection between objects by simplifying the detection process for capsule-shaped objects, thereby speeding it up without compromising accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007737849000001
    Figure 0007737849000001
  • Figure 0007737849000002
    Figure 0007737849000002
  • Figure 0007737849000003
    Figure 0007737849000003
Patent Text Reader

Abstract

To reduce a processing load of determining the contact between objects.SOLUTION: An information processing device for determining the contact between objects within an object space is provided. The information processing device includes a calculation part for calculating the length of a line segment connecting the center coordinates of two hemispheres constituting a capsule shape in the case that at least one of objects to undergo contact determination is an object for undergoing the contact determination as the capsule shape, and a contact determination part for switching contact determination processing of the object for undergoing the contact determination as the capsule shape from contact determination processing for the capsule shape to contact determination processing for a spherical shape on the basis of the calculated length of the line segment.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an information processing device, a program, and a contact determination method. [Background technology]

[0002] Conventionally, techniques for determining contact between objects in an object space have been known in video games. For example, a technique has been described in which a virtual object, such as a sphere, capsule, or rod, which is not displayed on the screen during the game and serves to detect the position of the edge of an object, is used to detect the contact (collision) position between the virtual object and the object (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2017-46950 A Summary of the Invention [Problem to be solved by the invention]

[0004] For example, collision detection for objects in object space can be achieved by setting collision detection components such as a Collider to the object to implement collision detection. The collision detection component defines the object's collision detection shape for collision detection as a sphere, capsule, rod, etc. Since the collision detection component is not displayed on the screen, it does not necessarily have to be the same shape as the object's mesh.

[0005] Incidentally, it is known that the processing load is greater when the collision detection shape of an object is defined as a capsule shape than when the collision detection shape of the object is defined as a sphere. Note that Patent Document 1 does not solve the problem that the processing load is greater when the collision detection shape of an object is defined as a capsule shape than when the collision detection shape of the object is defined as a sphere.

[0006] An object of the present disclosure is to reduce the processing load of collision detection between objects. [Means for solving the problem]

[0007] According to the present disclosure, there is provided an information processing device that performs contact detection between objects in an object space, and that has: a calculation unit that calculates the length of a line segment connecting the center coordinates of two hemispheres that make up the capsule shape when at least one of the objects that perform contact detection is an object that performs contact detection as a capsule shape; and a contact detection unit that switches the contact detection processing of the object that performs contact detection as the capsule shape from contact detection processing for a capsule shape to contact detection processing for a spherical shape based on the calculated length of the line segment. [Effects of the Invention]

[0008] According to the present disclosure, it is possible to reduce the processing load for determining whether objects collide with each other. [Brief explanation of the drawings]

[0009] [Figure 1] 1 is a diagram illustrating an example of a configuration of a game system according to an embodiment of the present invention. [Figure 2] FIG. 1 is a diagram illustrating an example of a hardware configuration of an information processing device according to an embodiment of the present invention. [Figure 3] FIG. 2 is a diagram illustrating an example of a functional configuration of an information processing device according to the present embodiment. [Figure 4] FIG. 10 is a diagram illustrating an example of a configuration of an object DB. [Figure 5]FIG. 10 is a diagram illustrating an example of a configuration of a threshold setting DB. [Figure 6] 10A and 10B are diagrams illustrating an example of collision detection when the collision detection shape is a sphere shape or a capsule shape; [Figure 7] 10A and 10B are diagrams illustrating an example of a collision detection method that reduces the processing load of collision detection for capsule-shaped objects. [Figure 8] 10 is a flowchart illustrating an example of processing of the game system according to the present embodiment. [Figure 9] 10 is a flowchart illustrating an example of a contact determination process according to the present embodiment. [Figure 10] FIG. 2 is an explanatory diagram of an example of processing of the game system according to the present embodiment. [Figure 11] FIG. 10 is a diagram illustrating an example of a configuration of an object DB. [Figure 12] FIG. 10 is a diagram illustrating an example of a configuration of a threshold setting DB. [Figure 13] 10 is a flowchart illustrating an example of a contact determination process according to the present embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0010] Hereinafter, an embodiment of the present disclosure will be described with reference to the drawings. Note that in this embodiment, the term "contact detection between objects" is used, but it may be called something different, such as "collision detection between objects" or "collision detection between objects."

[0011] [System Configuration] First, an example of a game system will be described as an example of an information processing system that realizes the method for determining collision between objects according to an embodiment. Note that the information processing system that realizes the method for determining collision between objects according to an embodiment may be a system other than a game system, such as a physical simulation system.

[0012] Fig. 1 is a configuration diagram of an example of a game system according to this embodiment. The game system of this embodiment is configured with an information processing device 10 shown in Fig. 1(A) or an information processing system shown in Fig. 1(B). The information processing device 10 shown in Fig. 1(A) is a computer operated by a user. The information processing device 10 in Fig. 1(A) accepts operations from a user via a touch panel, a controller, a mouse, a keyboard, or the like, executes information processing according to the operation, and displays the execution results.

[0013] 1(B) is configured such that an information processing device 10 and a server device 14 are communicably connected via a network 18. The information processing device 10 in FIG. 1(B) is a computer similar to that in FIG. 1(A). The server device 14 in FIG. 1(B) can also be realized by a computer similar to that in FIG. 1(A).

[0014] The server device 14 transmits and receives data to and from the information processing device 10, thereby executing information processing in accordance with the user's operation accepted by the information processing device 10, and provides the execution result to the information processing device 10. The information processing device 10 displays the execution result provided by the server device 14.

[0015] The server device 14 may be realized by a cloud computer. The number of server devices 14 shown in FIG. 1(B) is not limited to one, and two or more may be used for distributed processing. The server device 14 may be used for downloading programs (applications) to the information processing device 10, for user login processing, or for managing various databases. The system configuration in FIG. 1 is an example.

[0016] [Hardware configuration] The information processing device 10 according to this embodiment is configured, for example, as shown in Fig. 2. The configuration of the server device 14 is the same as that of the information processing device 10, and therefore a description thereof will be omitted. Fig. 2 is a diagram showing an example of the hardware configuration of the information processing device according to this embodiment.

[0017] 2 includes, for example, a CPU (Central Processing Unit) 100, a storage device 102, a communication device 104, an input device 106, and an output device 108. The CPU 100 controls the information processing device 10 in accordance with a program. The storage device 102 is, for example, a memory such as a ROM (Read Only Memory) or a RAM (Random Access Memory), or a storage such as a HDD (Hard Disk Drive) or an SSD (Solid State Drive). The storage device 102 stores programs and data to be executed by the CPU 100.

[0018] The communication device 104 is a communication device such as a network circuit that controls communication. The input device 106 is an input device such as a touchpad, a controller, a mouse, a keyboard, a camera, or a microphone. The output device 108 is an output device such as a display or a speaker. A touch panel is realized by combining a touchpad, which is an example of the input device 106, with a display, which is an example of the output device 108. The hardware configuration in FIG. 2 is an example.

[0019] [Function Block] The following describes an example of a functional configuration in which information processing device 10 accepts operations for a game being executed from a user such as a player, and generates and displays game images corresponding to the operations, thereby allowing the user to play the game. The functional configuration in Fig. 3 is one example, and for example, at least a part of the functional configuration shown in Fig. 3 may be provided in server device 14, and information processing device 10 and server device 14 may perform processing in cooperation with each other.

[0020] 3 is a diagram showing an example of the functional configuration of an information processing device according to this embodiment. The information processing device 10 in FIG. 3 includes a control unit 200, an operation receiving unit 202, an output control unit 204, a communication unit 206, and a storage unit 210.

[0021] The storage unit 210 stores a game program 212, an object DB 214, a threshold setting DB 216, and a reference coordinate DB 218. The storage unit 210 may be realized by the storage device 102, or may be realized by a storage device connected via the network 18 or the like.

[0022] The game program 212 is an example of a game processing program executed by the CPU 100. The object DB 214 stores information about objects displayed in game images. The objects displayed in game images include player character objects, enemy character objects, background objects, equipment objects such as weapons and shields, and bullet objects fired from weapons and armaments.

[0023] The threshold setting DB 216 stores a contact determination switching threshold value (described later) used for determining whether objects are in contact with each other. The reference coordinate DB 218 stores reference coordinates (described later) used for determining whether objects are in contact with each other.

[0024] In this embodiment, multiple objects that perform collision detection between objects are placed in an object space, and an image of the object space viewed from a predetermined viewpoint (virtual camera) is generated to allow the user to play the game. The object space is a space in which objects such as polygon models exist in a two-dimensional or three-dimensional coordinate system. For example, polygon models are placed in the object space using two-dimensional or three-dimensional computer graphics.

[0025] The control unit 200 performs overall control of the information processing device 10. The overall control of the information processing device 10 includes control of receiving operations from the user for a game being executed, and generating and displaying game images in accordance with the operations.

[0026] The control unit 200 is realized by the CPU 100 executing processing described in a program such as the game program 212. The control unit 200 in Fig. 3 is configured to have a game control unit 230. The game control unit 230 is configured to have an object generation unit 240, an image generation unit 242, a calculation unit 244, a collision determination unit 246, and a collision processing unit 248.

[0027] The game control unit 230 performs control related to the game. For example, the game control unit 230 executes game processing, generates game images according to the game processing being executed, and displays them on the output device 108 as game screens.

[0028] The object generation unit 240 generates objects by rendering, for example, textures for multiple objects to be placed in the object space and mapping the textures to polygon models. The object generation unit 240 also sets components for collision detection to implement collision detection in the generated objects.

[0029] The collision detection component can define the collision detection shape of the object for collision detection as various shapes such as a sphere, capsule, rod, etc. Here, we will explain the process when the collision detection shape of the object is defined as a capsule shape or a sphere shape.

[0030] The image generation unit 242 generates an image of the game being executed in accordance with information about objects stored in the object DB 214, a collision detection switching threshold (described later) stored in the threshold setting DB 216, and reference coordinates (described later) stored in the reference coordinate DB 218. The image generation unit 242 generates an image of the game in which multiple objects that perform collision detection are arranged in an object space.

[0031] The calculation unit 244 calculates the length and distance required to perform collision detection between multiple objects placed in the object space. For example, in the case of an object whose collision detection shape is set to a capsule shape, the calculation unit 244 calculates the length of the line segment connecting the center coordinates of the two hemispheres that make up the capsule shape, as will be described later. In addition, the calculation unit 244 calculates the distance between the reference coordinates set in the object space and the object whose collision detection shape is set to a capsule shape, as will be described later.

[0032] The contact determination unit 246 performs contact determination between multiple objects arranged in the object space. For example, in the case of an object whose contact determination shape is set to be a capsule shape, the contact determination unit 246 switches from capsule-shaped contact determination processing to spherical-shaped contact determination processing based on the length of the line segment connecting the center coordinates of the two hemispheres that make up the capsule shape calculated by the calculation unit 244.

[0033] In addition, when the contact detection shape of an object is set as a capsule shape, if the length of the line segment connecting the central coordinates of the two hemispheres that make up the capsule shape calculated by the calculation unit 244 is smaller than a threshold value (contact detection switching threshold value), the contact detection unit 246 switches from contact detection processing for a capsule shape to contact detection processing for a spherical shape.

[0034] The threshold value is set according to the distance between the reference coordinates set in the object space and the object for which the collision detection is performed. For example, the setting value is set to a larger value as the distance between the reference coordinates and the object for which the collision detection is performed increases, and a smaller value as the distance decreases. The threshold value may also be set based on the importance of the object for which the collision detection is performed in the game (user attention level), etc. Alternatively, the threshold value may be set based on a combination of the distance between the reference coordinates set in the object space and the object for which the collision detection is performed, and the importance of the object for which the collision detection is performed.

[0035] The contact processing unit 248 performs contact processing on an object that is placed in the object space and that is determined to have come into contact by the contact determination unit 246. For example, when the contact determination unit 246 determines that a bullet object has come into contact with an enemy character object placed in the object space, the contact processing unit 248 determines the effect of the contact on the enemy character object. For example, the effect of the bullet object's contact on the enemy character object is used in processing to change the depiction of the enemy character object to the depiction after it has been hit by the bullet.

[0036] The operation reception unit 202 receives various operations from the user on the input device 106. The output control unit 204 displays various screens on the output device 108 under the control of the control unit 200. The operation reception unit 202 is realized by the CPU 100 controlling the input device 106 in accordance with a program. The output control unit 204 is realized by the CPU 100 controlling the output device 108 in accordance with a program. Various operations from the user on the input device 106 refer to operations by the user operating the operation reception unit 202 to cause the CPU 100 to execute processing. The output control unit 204 displays various screens and outputs sounds under the control of the control unit 200.

[0037] The communication unit 206 communicates via the network 18 etc. The communication unit 206 is realized by the CPU 100 executing a program and controlling the communication device 104 in accordance with the program.

[0038] FIG. 4 is a diagram illustrating an example of the configuration of an object DB. The object DB 214 stores object IDs and collision detection shape definition information in association with each other as information about objects displayed in game images. The object ID is an example of information that identifies an object displayed in a game image. The collision detection shape definition information is an example of information that defines the collision detection shape of an object for collision detection. The object DB 214 in FIG. 4 shows an example in which a capsule shape and a sphere shape are defined as examples of the collision detection shapes of objects for collision detection.

[0039] Fig. 5 is a diagram showing an example of the configuration of a threshold setting DB. The threshold setting DB 216 stores a contact determination switching threshold as information used for determining contact between objects. Fig. 5 shows an example in which one contact determination switching threshold is stored, but as will be described later, multiple contact determination switching thresholds may be dynamically stored in association with conditions.

[0040] [Collision detection when the shape is a sphere or capsule] 6A and 6B are diagrams illustrating an example of collision detection when the collision detection shape is a sphere or a capsule. Fig. 6A shows an example of collision detection when the collision detection shape is a sphere. Fig. 6B shows an example of collision detection when the collision detection shape is a sphere.

[0041] In FIG. 6(A), when performing a collision detection between an object 300 whose collision detection shape is spherical (hereinafter sometimes simply referred to as a spherical object) and an object 302 that is sufficiently smaller than the spherical object 300, it can be determined whether the spherical object 300 and the object 302 are in contact with each other based on whether the distance indicated by the arrow 304 (the distance between the center of the object 300 and the object 302) is equal to or less than the radius of the object 300.

[0042] In FIG. 6(B), when performing a collision detection between an object 310 whose collision detection shape is capsule-shaped (hereinafter, sometimes simply referred to as a capsule-shaped object) and an object 312 that is sufficiently smaller than the capsule-shaped object 310, the following first to fourth determinations are required.

[0043] For example, in the first determination, it is determined whether or not the distance indicated by arrow 320 (the distance between object 312 and center coordinates 314 of the upper hemisphere (upper sphere) constituting object 310) is equal to or less than the radius of the upper sphere of object 310. If the distance indicated by arrow 320 is equal to or less than the radius of the upper sphere of object 310, it can be determined that capsule-shaped object 310 and object 312 are in contact.

[0044] For example, in the second determination, it is determined whether or not the distance indicated by arrow 322 (the distance between object 312 and center coordinates 316 of the lower hemisphere (lower sphere) constituting object 310) is equal to or less than the radius of the lower sphere of object 310. If the distance indicated by arrow 322 is equal to or less than the radius of the lower sphere of object 310, it can be determined that capsule-shaped object 310 and object 312 are in contact.

[0045] For example, in the third determination, when a line segment perpendicular to the axis of object 310 is extended from object 312, it is determined whether the intersection of the axis and the line segment is included in the cylindrical portion of object 310 indicated by arrow 326. The axis of object 310 is represented by a straight line passing through center coordinates 314 of the upper sphere and center coordinates 316 of the lower sphere. In addition, in the fourth determination, it is determined whether the distance indicated by arrow 324 (the distance when a line segment perpendicular to the axis of object 310 is extended from object 312) is equal to or less than the radius of the hemisphere of object 310.

[0046] If the third determination determines that the intersection of the axis and the line segment is included in the cylindrical portion of object 310 indicated by arrow 326, and if the fourth determination determines that the distance indicated by arrow 324 is less than or equal to the radius of the hemisphere of object 310, then it can be determined that capsule-shaped object 310 and object 312 are in contact.

[0047] If it is not determined that capsule-shaped object 310 and object 312 are in contact with each other in all of the first to fourth determinations, it can be determined that capsule-shaped object 310 and object 312 are not in contact with each other.

[0048] 6, the processing load (processing cost) of collision detection for capsule-shaped object 310 is greater than the processing load of collision detection for spherical object 300. Therefore, a collision detection method that reduces the processing load of collision detection for capsule-shaped object 310 was investigated.

[0049] Fig. 7 is a diagram illustrating an example of a collision detection method that reduces the processing load of collision detection for a capsule-shaped object. In Fig. 7, capsule-shaped object 330 has a shorter cylindrical portion indicated by arrow 342 (the line segment connecting center coordinates 334 of the upper sphere and center coordinates 336 of the lower sphere is shorter) than capsule-shaped object 310 in Fig. 6(B).

[0050] The capsule-shaped object 330 in Fig. 7 has a short cylindrical portion indicated by arrow 342, and has a shape similar to that of the spherical object 300 shown in Fig. 6(A), for example. In this embodiment, when the axis of the capsule-shaped object 330 (the cylindrical portion between the hemispheres) is sufficiently short, the contact detection process for the capsule-shaped object 330 is switched from contact detection process for a capsule shape to contact detection process for a spherical shape, thereby realizing a reduction in processing costs due to the simplification of contact detection and speeding up contact detection.

[0051] [process] The following describes an example of processing in which the game system according to this embodiment accepts an operation for the game from the user, generates a game image corresponding to the operation, and displays (outputs) it on the output device 108. Fig. 8 is a flowchart showing an example of processing in the game system according to this embodiment.

[0052] In step S10, the information processing device 10 receives an operation from the user to start playing the game. The game control unit 230 of the information processing device 10 starts executing game processing in accordance with the operation received from the user.

[0053] In step S12, the game control unit 230 requests the object generation unit 240 to generate objects such as player characters and enemy characters required for the game image to be generated. The object generation unit 240 generates a plurality of objects to be placed in the object space.

[0054] The object generation unit 240 also sets collision detection components for implementing collision detection in the generated objects and defines the collision detection shape of each object. The image generation unit 242 generates game images in which multiple objects that perform collision detection are placed in an object space. The image generation unit 242 generates game images in which multiple objects move within the object space over time.

[0055] In step S14, the game control unit 230 determines whether or not collision detection between multiple objects arranged in the object space is necessary. The determination of whether or not collision detection between multiple objects arranged in the object space is necessary may be set appropriately depending on the type of game.

[0056] For example, in a game in which a collision detection between a bullet object fired by a player character and other objects is performed only while the bullet object is present within the object space, it can be determined whether or not a collision detection is necessary based on whether or not the bullet object exists within the object space.

[0057] Furthermore, in the case of a game in which collision detection between objects existing in an object space is performed at predetermined time intervals, it is possible to determine whether collision detection is necessary or not depending on whether the predetermined time has elapsed.

[0058] If the game control unit 230 determines that collision detection between multiple objects arranged in the object space is necessary, it performs the collision detection process of step S16. If the game control unit 230 determines that collision detection between multiple objects arranged in the object space is not necessary, it skips the collision detection process of step S16.

[0059] In step S18, the game control unit 230 determines whether the game is over. If the game is not over, the game control unit 230 returns to step S12 and continues the game processing shown after step S12. If the game is over, the game control unit 230 ends the processing of the flowchart in FIG. 8.

[0060] The collision detection process in step S16 is executed, for example, according to the procedure shown in Fig. 9. Fig. 9 is a flowchart of an example of the collision detection process according to this embodiment. In step S30, the calculation unit 244 of the game control unit 230 selects one object for which collision detection processing has not yet been performed, for example, from the object DB 214 in Fig. 4.

[0061] In step S32, the calculation unit 244 determines whether the definition of the collision detection shape of the object selected in step S30 is a capsule shape. If it is a capsule shape, the calculation unit 244 proceeds to the processing of step S34, where it calculates the length of the line segment connecting the center coordinates of the two hemispheres that make up the capsule shape of the object selected in step S30.

[0062] Following step S34, the process proceeds to step S36, where the contact determination unit 246 determines whether the length of the line segment calculated in step S34 is smaller than the contact determination switching threshold value in the threshold setting DB 216 of Fig. 5. If the length of the line segment calculated in step S34 is smaller than the contact determination switching threshold value in the threshold setting DB 216 of Fig. 5, the process proceeds to step S38, where the contact determination unit 246 switches the contact determination of the capsule-shaped object selected in step S30 from capsule-shaped contact determination processing to spherical-shaped contact determination processing. In this way, the contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S30 using spherical-shaped contact determination processing, thereby simplifying the contact determination of the capsule-shaped object.

[0063] 5, the process proceeds to step S40, and the contact determination unit 246 does not switch the contact determination of the capsule-shaped object selected in step S30 from the capsule-shaped contact determination process to the spherical-shaped contact determination process. The contact determination unit 246 performs the contact determination of the capsule-shaped object selected in step S30 using the capsule-shaped contact determination process.

[0064] If it is determined in step S32 that the object is not capsule-shaped, the contact determination unit 246 performs contact determination for the object having a shape other than the capsule shape selected in step S30, according to the contact determination shape of the object.

[0065] In step S44, if the contact determination unit 246 determines that the objects are in contact, the contact processing unit 248 proceeds to the processing of step S46, and performs contact processing on the objects determined to be in contact. Note that if the contact determination unit 246 does not determine that the objects are in contact, the contact processing unit 248 skips the processing of step S46.

[0066] In step S48, the calculation unit 244 determines whether or not there are any unprocessed objects in the object DB 214 of Fig. 4. If there are any unprocessed objects, the calculation unit 244 returns to the processing of step S30 and continues the processing of the flowchart of Fig. 9. If there are no unprocessed objects, the game control unit 230 ends the collision detection processing shown in Fig. 9.

[0067] 9 is an example of a threshold set in the threshold setting DB 216. The threshold set in the threshold setting DB 216 may be dynamically set as a plurality of thresholds in association with conditions as follows.

[0068] Fig. 10 is an explanatory diagram of an example of processing in the game system according to this embodiment. Fig. 11 is a configuration diagram of an example of an object DB. Fig. 12 is a configuration diagram of an example of a threshold setting DB.

[0069] 10, for example, the position coordinates of the virtual camera or the user character object 1000 are set as the reference coordinates (center). In the example of Fig. 10, for example, a plurality of contact determination switching thresholds are set according to the distance from the reference coordinates, with the reference coordinates as the center. In the example of Fig. 10, the contact determination switching thresholds are set in the threshold setting DB 216 so that the smaller the distance from the reference coordinates, the smaller the contact determination switching threshold, and the larger the distance from the reference coordinates, the larger the contact determination switching threshold.

[0070] Capsule-shaped object 1002 in FIG. 10 is an example of an object whose distance from the reference coordinates is less than A. Object 1004 is an example of an object whose distance from the reference coordinates is equal to or greater than A but less than B. Object 1006 is an example of an object whose distance from the reference coordinates is equal to or greater than B. The distances between the reference coordinates and objects 1002, 1004, and 1006 can be calculated from the reference coordinates stored in reference coordinate DB 218 and the position information of the object DB in FIG. 11.

[0071] Object 1002 is an example of an object that is closest to the reference coordinates, and by setting the contact determination switching threshold to the smallest, it is possible to easily perform contact determination for capsule-shaped objects using contact determination processing for capsule shapes. For example, by setting the contact determination switching threshold for a capsule-shaped object whose distance from the reference coordinates is less than A to "0," contact determination for capsule-shaped object 1002 whose distance from the reference coordinates is less than A is always performed using contact determination processing for capsule shapes. Therefore, contact determination processing for capsule-shaped object 1002 whose distance from the reference coordinates is less than A is accurately performed using contact determination processing for capsule shapes.

[0072] Object 1006 is an example of an object that is farthest from the reference coordinates, and by setting the contact determination switching threshold to the largest value, it becomes easier to perform contact determination for capsule-shaped objects using contact determination processing for spherical shapes. For example, by setting the contact determination switching threshold for a capsule-shaped object whose distance from the reference coordinates is B or more to "100," contact determination for capsule-shaped object 1006 whose distance from the reference coordinates is B or more can be easily performed using contact determination processing for spherical shapes, even if the cylindrical portion of object 1006 is long. Therefore, contact determination processing for capsule-shaped object 1006 whose distance from the reference coordinates is B or more can be simply performed using contact determination processing for spherical shapes.

[0073] Object 1004 is an example of an object whose distance from the reference coordinates is farther than object 1002 and closer than object 1006. By adjusting and setting the contact detection switching threshold, it is made more difficult to perform contact detection for capsule-shaped objects using contact detection processing for spherical shapes.

[0074] For example, by setting the contact detection switching threshold for a capsule-shaped object whose distance from the reference coordinates is greater than or equal to A but less than B to "50," contact detection for capsule-shaped object 1004 whose distance from the reference coordinates is greater than or equal to A but less than B will be performed using contact detection processing for a spherical shape when the condition that the length of the cylindrical part of object 1004 is short is met.

[0075] Therefore, the contact detection process for the capsule-shaped object 1006, whose distance from the reference coordinate is greater than or equal to A and less than B, is simply performed using the contact detection process for a spherical shape when the condition that the length of the cylindrical part of the object 1004 is short is met.

[0076] In the example shown in Figure 10, for capsule-shaped objects that are close to the reference coordinates, unnatural behavior is reduced by performing accurate capsule-shaped contact detection processing, while the farther the capsule-shaped object is from the reference coordinates, the more simplified spherical-shaped contact detection processing is performed, reducing the processing load and speeding up the contact detection processing.

[0077] The collision detection process in step S16 is executed, for example, according to the procedure shown in Fig. 13. Fig. 13 is a flowchart of an example of the collision detection process according to this embodiment. In step S100, the calculation unit 244 of the game control unit 230 selects one object for which collision detection processing has not yet been performed, for example, from the object DB 214 in Fig. 11.

[0078] In step S102, the calculation unit 244 determines whether the definition of the collision detection shape of the object selected in step S100 is a capsule shape. If it is a capsule shape, the calculation unit 244 proceeds to the processing of step S104 and calculates the distance between the position information of the object selected in step S100 and the reference coordinates stored in the reference coordinate DB 218.

[0079] 12 based on the distance calculated in step S104. According to this embodiment, the calculation unit 244 can set a different contact determination switching threshold based on the distance between the object's position information and the reference coordinates stored in the reference coordinate DB 218. In step S108, the calculation unit 244 calculates the length of the line segment connecting the center coordinates of the two hemispheres that make up the capsule shape of the object selected in step S100.

[0080] In step S110, the contact determination unit 246 determines whether the length of the line segment calculated in step S108 is smaller than the contact determination switching threshold set in step S106. If the length of the line segment calculated in step S108 is smaller than the contact determination switching threshold set in step S106, the process proceeds to step S112, where the contact determination unit 246 switches the contact determination of the capsule-shaped object selected in step S100 from capsule-shaped contact determination processing to spherical-shaped contact determination processing. In this way, the contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S100 using spherical-shaped contact determination processing, thereby simplifying the contact determination of the capsule-shaped object.

[0081] If the length of the line segment calculated in step S108 is not smaller than the contact determination switching threshold set in step S106, the process proceeds to step S114. In step S114, the contact determination unit 246 does not switch the contact determination of the capsule-shaped object selected in step S100 from capsule-shaped contact determination processing to spherical-shaped contact determination processing. The contact determination unit 246 performs the contact determination of the capsule-shaped object selected in step S100 using capsule-shaped contact determination processing.

[0082] If it is determined in step S102 that the object is not capsule-shaped, the contact determination unit 246 performs contact determination for the object having a shape other than the capsule shape selected in step S100, according to the contact determination shape of the object.

[0083] In step S118, if the contact determination unit 246 determines that the objects are in contact, the contact processing unit 248 proceeds to the processing of step S120. The contact processing unit 248 performs contact processing on the objects determined to be in contact. Note that if the contact determination unit 246 does not determine that the objects are in contact, the contact processing unit 248 skips the processing of step S120.

[0084] In step S122, the calculation unit 244 determines whether or not there is an unprocessed object in the object DB 214 of Fig. 11. If there is an unprocessed object, the calculation unit 244 returns to the processing of step S100 and continues the processing of the flowchart of Fig. 13. If there is no unprocessed object, the game control unit 230 ends the collision detection processing shown in Fig. 13.

[0085] 13, multiple thresholds may be dynamically set in association with object importance, which is an example of a condition, in the threshold setting DB 216. For example, the importance of an object may be set high for an important object in the game, such as a raid boss, or an object that is likely to attract the user's attention, and low for an unimportant object, or an object that is unlikely to attract the user's attention.

[0086] In addition, the above-described contact determination process can be applied to games with a zoom function. When applied to a game with a zoom function, the above-described contact determination process may be performed by setting the threshold setting DB 216 for each zoom-up magnification.

[0087] In this way, in this embodiment, by switching from capsule-shaped contact detection processing to spherical-shaped contact detection processing without changing the contact detection components for implementing contact detection, it is possible to perform LOD (Level of Detail) processing for contact detection between objects in object space with a small processing load. In this embodiment, LOD processing reduces the processing load and speeds up contact detection without impairing the appearance when detecting contact between multiple objects placed in object space.

[0088] This embodiment is applicable to, for example, FPS (First-Person Shooter) games and action games. Furthermore, although an example of a game image has been described in this embodiment, it is also applicable to collision detection on a screen on which a user's avatar or a non-player character (NPC) of a social network service moves in an image viewed from a predetermined viewpoint in a virtual space where the user's avatar or an NPC interacts.

[0089] According to this embodiment, in an information processing device 10 that generates an image of an object space viewed from a predetermined viewpoint and allows a user to play a game, it is possible to reduce the processing load of collision detection between objects while reducing unnatural collision detection.

[0090] The information processing device of the disclosed embodiment should be considered as an example and not a limitation. The above embodiment can be modified and improved in various ways without departing from the scope and spirit of the appended claims. Furthermore, the matters described in the above-mentioned embodiments can be configured in other ways as long as they are not inconsistent, and can be combined as long as they are not inconsistent. [Explanation of symbols]

[0091] 10. Information processing equipment 14 Server equipment 18 Network 200 control section 202 Operation reception section 204 Output control section 206 Communications Department 210 Storage section 212 Game Program 214 Object DB 216 Threshold Setting DB 218 Reference Coordinate DB 230 Game control unit 240 Object Generation Unit 242 Image Generation Unit 244 Calculation Unit 246 Contact determination section 248 Contact Treatment Section

Claims

1. An information processing device that performs collision detection between objects in an object space, a calculation unit that calculates the length of a line segment connecting the center coordinates of two hemispheres that constitute the capsule shape when at least one of the objects that undergo collision detection is a capsule-shaped object that undergoes collision detection; a contact determination unit that, based on the calculated length of the line segment and a threshold, if the length of the line segment is smaller than the threshold, switches a contact determination process for the object that is to be subjected to a contact determination as a capsule shape from a contact determination process for a capsule shape to a contact determination process for a sphere shape; An information processing device having the above.

2. a threshold setting unit that sets the threshold to a larger value as the distance between a reference coordinate set in the object space and an object for which a contact determination is performed as the capsule shape increases, and sets the threshold to a smaller value as the distance decreases, the contact determination unit switches the contact determination process of the object for which contact determination is performed as the capsule shape from the contact determination process for the capsule shape to the contact determination process for the spherical shape if the calculated length of the line segment is smaller than the set threshold value; 2. The information processing device according to claim 1,

3. the threshold setting unit sets the threshold to a larger value as the importance of the object for which the collision detection is performed as the capsule shape decreases, and sets the threshold to a smaller value as the importance of the object increases; 3. The information processing device according to claim 2, wherein:

4. The reference coordinates are the position coordinates of a virtual camera set in the object space or the position coordinates of a player character.

4. The information processing device according to claim 2 or 3,

5. An information processing device that performs collision detection between objects in an object space, a calculation unit that calculates the length of a line segment connecting the center coordinates of two hemispheres that constitute the capsule shape when at least one of the objects that are subject to collision detection is a capsule-shaped object that is subject to collision detection; a contact determination unit that switches a contact determination process for an object that is to be subjected to a contact determination as a capsule shape from a contact determination process for a capsule shape to a contact determination process for a sphere shape, if the length of the line segment is smaller than the threshold value, based on the calculated length of the line segment and a threshold value; A program to function as a

6. A collision detection method for an information processing device that performs collision detection between objects in an object space, comprising: a step of calculating the length of a line segment connecting the center coordinates of two hemispheres constituting the capsule shape when at least one of the objects for which collision detection is performed is a capsule-shaped object for which collision detection is performed; a step of switching a contact determination process for the object for which a contact determination is performed as a capsule shape from a contact determination process for a capsule shape to a contact determination process for a sphere shape, based on the calculated length of the line segment and a threshold value, if the length of the line segment is smaller than the threshold value; The contact determination method is executed by an information processing device.

Citation Information

Patent Citations

  • Collision detection method that change detail degree according to interaction in space and virtual space formation device using its method

    JP2005071285A

  • Game program, and game apparatus

    JP2009011748A

  • Program, information storage medium, and game system

    JP2013030125A

  • Information processor, position information detection method, and position information detection program

    JP2017046950A