StratiX0 fadca179e8 Ajout collision avec le terrain, mais tres bancale
feat:

+ les cubes ajoutes s'arretent lorsqu'il y a collision avec le terrain, seulement sur un seul chunk
2024-04-22 17:26:27 +02:00

23 lines
542 B
C++

#ifndef _PHYSICS_H_
#define _PHYSICS_H_
#include "object.h"
class Physics : public Object
{
public:
Physics();
explicit Physics(const Physics&); // Use explicit to avoid implicit conversion
~Physics();
XMVECTOR GetGravity() const; // Get the gravity value
void SetGravity(XMVECTOR gravity); // Define the gravity value
void ApplyGravity(Object*, float, float); // Apply gravity to an object
void ApplyForce(Object*, XMVECTOR);
bool IsColliding(Object*, Object*);
private:
XMVECTOR m_gravity;
};
#endif