aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Rigidbody.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Rigidbody.h')
-rw-r--r--src/crepe/api/Rigidbody.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h
index 3e5c7a3..fddbf5c 100644
--- a/src/crepe/api/Rigidbody.h
+++ b/src/crepe/api/Rigidbody.h
@@ -1,5 +1,7 @@
#pragma once
+#include <cmath>
+
#include "../Component.h"
#include "Vector2.h"
@@ -58,13 +60,13 @@ public:
//! linear velocity of object
Vector2 linear_velocity;
//! maximum linear velocity of object
- Vector2 max_linear_velocity;
+ Vector2 max_linear_velocity = {INFINITY ,INFINITY};
//! linear damping of object
Vector2 linear_damping;
//! angular velocity of object
double angular_velocity = 0.0;
//! max angular velocity of object
- double max_angular_velocity = 0.0;
+ double max_angular_velocity = INFINITY;
//! angular damping of object
double angular_damping = 0.0;
//! movements constraints of object
@@ -73,6 +75,10 @@ public:
bool use_gravity = true;
//! if object bounces
bool bounce = false;
+ //! bounce factor of material
+ double elastisity = 0.0;
+ //! offset of all colliders relative to transform position
+ Vector2 offset;
};
public: