78 |
// Constructor. |
// Constructor. |
79 |
StoneContact(Actor *a, Stone *s, |
StoneContact(Actor *a, Stone *s, |
80 |
const V3 &cp, const V3 &n); |
const V3 &cp, const V3 &n); |
81 |
|
StoneContact(); |
82 |
|
|
83 |
// Variables. |
// Variables. |
84 |
Actor *actor; |
Actor *actor; |
88 |
V3 contact_point; // where do the shapes meet? (world coords) |
V3 contact_point; // where do the shapes meet? (world coords) |
89 |
V3 normal; // the surface normal at the contact point |
V3 normal; // the surface normal at the contact point |
90 |
bool is_collision; // actor moves towards the stone, not away |
bool is_collision; // actor moves towards the stone, not away |
91 |
|
bool fake_collision; |
92 |
|
bool is_contact; |
93 |
}; |
}; |
94 |
|
|
95 |
// Which of the four faces of the stone does the actor touch? |
// Which of the four faces of the stone does the actor touch? |