mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
bring back pre-0.30 player controls
This commit is contained in:
parent
0ddd8cff4f
commit
1d2c8cf4b6
4 changed files with 18 additions and 23 deletions
|
|
@ -58,7 +58,6 @@ struct Hitbox {
|
|||
glm::vec3 velocity;
|
||||
glm::vec3 scale {1.0f, 1.0f, 1.0f};
|
||||
float linearDamping = 0.5;
|
||||
float friction = 1.0f;
|
||||
float verticalDamping = 1.0f;
|
||||
bool grounded = false;
|
||||
float gravityScale = 1.0f;
|
||||
|
|
@ -68,7 +67,10 @@ struct Hitbox {
|
|||
float elasticity = 0.0f;
|
||||
std::string material;
|
||||
std::string groundMaterial;
|
||||
|
||||
// FIXME: only one must survive
|
||||
glm::vec3 groundVelocity {};
|
||||
glm::vec3 actualGroundVelocity {};
|
||||
|
||||
glm::vec3 prevPosition {};
|
||||
glm::vec3 prevVelocity {};
|
||||
|
|
@ -94,4 +96,8 @@ struct Hitbox {
|
|||
prevPosition = vec;
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec3 getSurfaceVelocity() const {
|
||||
return velocity - actualGroundVelocity;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue