mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
physics: step height
This commit is contained in:
parent
3183513e55
commit
9fd675895d
2 changed files with 41 additions and 17 deletions
|
|
@ -8,18 +8,24 @@ class Hitbox;
|
|||
class Chunks;
|
||||
|
||||
class PhysicsSolver {
|
||||
glm::vec3 gravity;
|
||||
glm::vec3 gravity;
|
||||
public:
|
||||
PhysicsSolver(glm::vec3 gravity);
|
||||
void step(Chunks* chunks,
|
||||
Hitbox* hitbox,
|
||||
float delta,
|
||||
uint substeps,
|
||||
bool shifting,
|
||||
float gravityScale,
|
||||
bool collisions);
|
||||
void colisionCalc(Chunks* chunks, Hitbox* hitbox, glm::vec3& vel, glm::vec3& pos, const glm::vec3 half);
|
||||
bool isBlockInside(int x, int y, int z, Hitbox* hitbox);
|
||||
PhysicsSolver(glm::vec3 gravity);
|
||||
void step(Chunks* chunks,
|
||||
Hitbox* hitbox,
|
||||
float delta,
|
||||
uint substeps,
|
||||
bool shifting,
|
||||
float gravityScale,
|
||||
bool collisions);
|
||||
void colisionCalc(
|
||||
Chunks* chunks,
|
||||
Hitbox* hitbox,
|
||||
glm::vec3& vel,
|
||||
glm::vec3& pos,
|
||||
const glm::vec3 half,
|
||||
float stepHeight);
|
||||
bool isBlockInside(int x, int y, int z, Hitbox* hitbox);
|
||||
};
|
||||
|
||||
#endif /* PHYSICS_PHYSICSSOLVER_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue