InterviewStack.io LogoInterviewStack.io

Physics Simulation and Collision Detection Questions

Covers engine level physics concepts and collision systems used in games and interactive simulations. Topics include rigid body dynamics, velocity, acceleration, gravity, forces, constraints and constraint solving, and common numerical integration methods. Collision detection algorithms and pipelines are covered end to end: collision shapes and colliders such as boxes, spheres, and triangle meshes; broad phase and narrow phase strategies; axis aligned bounding box tests, sphere tests, swept collision and continuous collision detection, and raycast and sweep queries. Also include collision response, contact resolution, callbacks and query interfaces, and the use of collision layers and collision masks to control interactions. Spatial partitioning and acceleration structures such as uniform grids, quadtrees, octrees, and bounding volume hierarchies are discussed for performance. Performance and stability topics include sleeping, collision groups, collision matrices, solver iterations, fixed timestep versus variable timestep approaches, determinism concerns for networking, physics framerate, and optimization strategies when integrating with a game engine.

HardSystem Design
96 practiced
Explain how to implement contact resolution that produces stable stacking of boxes (e.g., crates stacked 10 high) without jitter. Cover contact-manifold generation, constraint formulation, solver iteration counts, warm-starting, position correction strategies (split-impulse, Baumgarte), friction tuning, and test cases you would use to validate stability.
EasyTechnical
153 practiced
Contrast discrete collision detection with continuous collision detection (CCD). Explain the tunneling problem, swept tests, time-of-impact (TOI), conservative advancement, and when CCD or substepping is required versus simpler fixes like 'fat' colliders or limiting object speed.
EasyTechnical
72 practiced
Implement a ray vs AABB intersection test in C++ that returns whether the ray intersects and the entry and exit t values. Use the slab method and handle ray direction components near zero. Signature: bool RayAABB(const Ray& ray, const AABB& box, float& tmin, float& tmax). Assume Ray has origin and direction.
EasyTechnical
77 practiced
Explain the differences between Axis-Aligned Bounding Boxes (AABB) and Oriented Bounding Boxes (OBB) in game physics. Discuss memory cost, transform handling, rotation support, cost of overlap tests, and typical use-cases (dynamic players, static level geometry, fast projectiles). When would you choose one over the other for mobile vs console?
EasyTechnical
85 practiced
Explain the difference between explicit (forward) Euler and semi-implicit (symplectic) Euler integration for rigid body motion in games. Discuss numerical stability, energy behavior over time, order of accuracy, and give short pseudocode for both integrators updating velocity and position under constant acceleration.

Unlock Full Question Bank

Get access to hundreds of Physics Simulation and Collision Detection interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.