diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-02 13:33:19 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-02 13:33:19 +0100 |
commit | 0a867effdb02e35181ee31c36960aed05e19ac64 (patch) | |
tree | 9b0a057cd1cfe9fbb1cee1a582ef3509b9d059b2 /src/crepe | |
parent | 515efdd82326e91596895a5e9b2bbf4925f175a1 (diff) |
feedback fix
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/Collider.h | 2 | ||||
-rw-r--r-- | src/crepe/api/Rigidbody.cpp | 2 | ||||
-rw-r--r-- | src/crepe/api/Rigidbody.h | 14 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/crepe/Collider.h b/src/crepe/Collider.h index 5b26af5..e1624b4 100644 --- a/src/crepe/Collider.h +++ b/src/crepe/Collider.h @@ -1,7 +1,5 @@ #pragma once -#include "api/Vector2.h" - #include "Component.h" #include "types.h" diff --git a/src/crepe/api/Rigidbody.cpp b/src/crepe/api/Rigidbody.cpp index 576ca45..c4b1d6f 100644 --- a/src/crepe/api/Rigidbody.cpp +++ b/src/crepe/api/Rigidbody.cpp @@ -10,6 +10,6 @@ void crepe::Rigidbody::add_force_linear(const vec2 & force) { this->data.linear_velocity += force; } -void crepe::Rigidbody::add_force_angular(double force) { +void crepe::Rigidbody::add_force_angular(float force) { this->data.angular_velocity += force; } diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h index 7939563..446c5dd 100644 --- a/src/crepe/api/Rigidbody.h +++ b/src/crepe/api/Rigidbody.h @@ -52,9 +52,9 @@ public: */ struct Data { //! objects mass - double mass = 0.0; + float mass = 0.0; //! gravtiy scale - double gravity_scale = 0.0; + float gravity_scale = 0.0; //! Changes if physics apply BodyType body_type = BodyType::DYNAMIC; //! linear velocity of object @@ -64,11 +64,11 @@ public: //! linear damping of object vec2 linear_damping; //! angular velocity of object - double angular_velocity = 0.0; + float angular_velocity = 0.0; //! max angular velocity of object - double max_angular_velocity = INFINITY; + float max_angular_velocity = INFINITY; //! angular damping of object - double angular_damping = 0.0; + float angular_damping = 0.0; //! movements constraints of object PhysicsConstraints constraints; //! if gravity applies @@ -76,7 +76,7 @@ public: //! if object bounces bool bounce = false; //! bounce factor of material - double elastisity = 0.0; + float elastisity = 0.0; //! offset of all colliders relative to transform position vec2 offset; }; @@ -102,7 +102,7 @@ public: * * \param force Vector2 that is added to the angular force. */ - void add_force_angular(double force); + void add_force_angular(float force); }; } // namespace crepe |