Game Logic Flashcards
1
Q
What is one way to do ‘cheap’ collision checking?
A
Subtract the vectors from the two objects. If the value is less than a threshold, a collision has occurred.
2
Q
Given one projectile, and three possible targets, which object should have the collision detection code on it?
A
The targets. Otherwise the function would have to be called manually for each target. Whereas if the targets have the code, it is only written once (but gets executed for each target).
3
Q
Where would you normally put your collision checks?
A
In the update method of one of the objects (the ones that are going to be doing all the checks).