diff options
author | Stijn Buys <ingar@osirion.org> | 2012-10-10 21:27:41 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-10-10 21:27:41 +0000 |
commit | 05c560e7b9f508997a7c7c5e466329692796dab4 (patch) | |
tree | e427006ef35f23cb1ef987442b496e4eb2622aca /src/core/entity.h | |
parent | 8a6f3d478c825d226a21b73f5bcec2b92bf31ccb (diff) |
Provided bullet physics collision callback methods.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index 19e47bc..092f4a7 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -630,6 +630,16 @@ public: * @brief reset the physics state */ virtual void reset(); + + /** + * @brief physics collision callback + * This funcion is called by the physics engine if the entity collides with another entity. + * It can be implemented by game child classes to provide collision effects and feedback. + * If the collision happens between two EntityDynamic instances (or subclasses thereof) + * the method will be called on each collision partner. + * Warning: this can be called multiple times for a single collision + * */ + virtual void collision(Entity *other); protected: float entity_mass; |