Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h10
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;