Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium
Abstract:
A method for detecting a collision between a cylindrical collider and a convex body in a real-time virtual scenario performed at a computer includes: converting a cylindrical collider into a preset polygonal prism concentric to the cylindrical collider; transforming the preset polygonal prism to a local coordinate system of the convex body; obtaining a projection of the cylindrical collider on one or more testing axes according to each testing axis and the location of the preset polygonal prism in the local coordinate system of the convex body, and obtaining a projection of the convex body on each testing axis; and in accordance with a determination that the projections of the cylindrical collider and the convex body intersect with each other on each testing axis, moving the cylindrical collider away from the convex body in the real-time virtual scenario to avoid the collision.
Information query
Patent Agency Ranking
0/0