Files
Nuake-custom/Nuake/src/Scene/Components/RigidbodyComponent.h
Antoine Pilote 5b56e2ff9a Character controller working better
Moved ECS systems to separate folders
better raycast normal result
2021-06-18 16:44:54 -04:00

32 lines
620 B
C++

#pragma once
#include "TransformComponent.h"
#include "BaseComponent.h"
#include "../Core/Core.h"
namespace Physics{
class RigidBody;
};
class RigidBodyComponent
{
public:
float mass = 0.0f;
Ref<Physics::RigidBody> m_Rigidbody;
bool IsKinematic = false;
RigidBodyComponent();
Ref<Physics::RigidBody> GetRigidBody() const;
void SetRigidBody(Ref<Physics::RigidBody> rb);
bool HasRigidBody() const;
void SetMass(float m);
float GetMass();
void SyncTransformComponent(TransformComponent* tc);
void SyncWithTransform(TransformComponent* tc);
void DrawShape(TransformComponent* tc);
void DrawEditor();
};