Video Game Collision Detection With Cylinder-Capsule Sweeps
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing collision detection methods in video games are inefficient, particularly when dealing with numerous small ground obstacles, leading to excessive processing time and inaccurate contact point calculations, especially when using geometric primitives like cylinders.
Innovation Solution
Implementing a two-step collision detection process using a cylinder model for vertical sweeps to identify ground level and a capsule model for horizontal sweeps to detect collisions with ground obstacles, ensuring the capsule model remains a predefined height above the ground to minimize false positives and reduce processing overhead.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a cylinder geometric primitive is used for collision detection with numerous small ground obstacles, then the collision detection can be performed, but the processing time increases excessively due to multiple sweep casts required per frame
Solution Approach 1:
The collision detection process is segmented into two distinct phases: a coarse detection phase using a cylinder to quickly identify potential collisions, and a fine detection phase using a capsule to accurately determine contact points. This segmentation allows the system to reject non-colliding pairs efficiently while maintaining accuracy for potential collisions.
Solution Approach 2:
The capsule model is positioned to extend slightly below the ground surface (excessive action), allowing it to detect small ground obstacles that a ground-aligned capsule would miss. This partial extension into the ground enables detection of obstacles without requiring multiple sweep casts in all directions.
2Reliability
If a cylinder geometric primitive is used for collision detection, then collision can be detected, but contact point calculation becomes inaccurate due to edge-edge collisions at end caps
Solution Approach 1:
The detection process is divided into coarse (cylinder) and fine (capsule) phases. The capsule's geometry without sharp edges provides accurate contact point calculation, eliminating the edge-edge collision problems inherent in cylinder-based detection.
Solution Approach 2:
The capsule model acts as an intermediary between the cylinder's coarse detection and the actual collision resolution. It provides a smooth, edge-free geometry that accurately determines contact points without the discontinuities present in cylindrical end caps.
3Reliability
If a cylinder geometric primitive is used for collision detection, then collision can be detected, but resource consumption increases due to difficulty in determining contact points
Solution Approach 1:
The two-phase detection system segments the computational workload: the cylinder performs rapid coarse filtering to reject non-colliding pairs, while the capsule handles only potential collisions for accurate contact point calculation. This reduces overall computational resource usage compared to using cylinder alone.
Solution Approach 2:
The capsule is positioned in advance with its bottom cap extending below ground level, preparing it to detect small obstacles before the actual collision check occurs. This preliminary positioning eliminates the need for multiple reactive sweep casts, reducing computational resources required during runtime.
Data Source
AI summary
The patent discloses improved methods and systems for detecting a collision between a player controlled virtual character in a video game and an object positioned on a surface in a virtual environment of the video game. Two geometric models are defined, one of which is preferably a cylinder and the other of which is preferably a capsule. For a frame of the video game, data indicative of a position, velocity and direction of the virtual character is acquired and, in a subsequent frame, data indicative of another position of the virtual character is acquired. The first geometric model is moved vertically downward by a predefined distance to identify a level of the ground surface and the second geometric model is moved horizontally forward to detect a collision of the virtual character with the object.


