2D Physics and Collision Detection Flashcards
6 cards from real 2D Game Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 2D Physics and Collision Detection flashcards as text
What is a 'manifold' in 2D collision detection?
Answer: Data describing contact points and penetration depth between two colliding shapes
A collision manifold stores information about how two shapes are intersecting, including contact points, normal vectors, and penetration depth.
What does 'continuous collision detection' (CCD) solve compared to discrete detection?
Answer: It prevents tunneling for fast-moving objects
CCD sweeps an object's path across the entire frame to detect collisions it might otherwise tunnel through, solving the fast-object problem.
In 2D platformers, what technique is commonly used to detect if the player is on the ground?
Answer: Casting a short ray downward from the player's feet
A short downward raycast from the player's feet returns a hit when the player is standing on a surface, confirming ground contact.
What is 'mass' used for in 2D rigid body physics?
Answer: Determining how much force is needed to accelerate an object
Mass determines resistance to acceleration (F = ma); heavier objects require more force to move and exert more force in collisions.
Which collision shape is the most performance-efficient for circular objects in 2D?
Answer: Circle collider
Circle-circle collision detection requires only a distance check, making it the cheapest shape for round objects.
What does 'gravity scale' allow you to do in a 2D physics engine?
Answer: Adjust how strongly global gravity affects a specific object
Gravity scale multiplies the global gravity vector for a specific rigidbody, letting individual objects fall faster, slower, or float.