aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Rigidbody.h
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-02 17:17:21 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-02 17:17:21 +0100
commiteeb66130e2cb94c94e1748576f98f78ce0f1ee86 (patch)
treef3a8a09b9f9245f559d1c924a7eccead5434f979 /src/crepe/api/Rigidbody.h
parentd06e05d0d8dbe1ace63b439231ccd05a975e9834 (diff)
changed some values because of feedback and merged from master
Diffstat (limited to 'src/crepe/api/Rigidbody.h')
-rw-r--r--src/crepe/api/Rigidbody.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h
index 446c5dd..63b1b51 100644
--- a/src/crepe/api/Rigidbody.h
+++ b/src/crepe/api/Rigidbody.h
@@ -54,7 +54,7 @@ public:
//! objects mass
float mass = 0.0;
//! gravtiy scale
- float gravity_scale = 0.0;
+ float gravity_scale = 0;
//! Changes if physics apply
BodyType body_type = BodyType::DYNAMIC;
//! linear velocity of object
@@ -62,20 +62,16 @@ public:
//! maximum linear velocity of object
vec2 max_linear_velocity = {INFINITY ,INFINITY};
//! linear damping of object
- vec2 linear_damping;
+ vec2 linear_velocity_factor;
//! angular velocity of object
- float angular_velocity = 0.0;
+ float angular_velocity = 1;
//! max angular velocity of object
float max_angular_velocity = INFINITY;
//! angular damping of object
- float angular_damping = 0.0;
+ float angular_velocity_factor = 1;
//! movements constraints of object
PhysicsConstraints constraints;
- //! if gravity applies
- bool use_gravity = true;
- //! if object bounces
- bool bounce = false;
- //! bounce factor of material
+ //! bounce factor of material. 0.0 <= means all velocity is lost, 1.0 means it gets the same momentum but the mirrored direction. 0.5 is half of the velocity is saved.
float elastisity = 0.0;
//! offset of all colliders relative to transform position
vec2 offset;