fix: incomplete size transform support by entities
This commit is contained in:
@@ -52,6 +52,7 @@ struct Hitbox {
|
||||
glm::vec3 position;
|
||||
glm::vec3 halfsize;
|
||||
glm::vec3 velocity;
|
||||
glm::vec3 scale {1.0f, 1.0f, 1.0f};
|
||||
float linearDamping = 0.5;
|
||||
float friction = 1.0f;
|
||||
float verticalDamping = 1.0f;
|
||||
@@ -64,4 +65,8 @@ struct Hitbox {
|
||||
AABB getAABB() const {
|
||||
return AABB(position-halfsize, position+halfsize);
|
||||
}
|
||||
|
||||
glm::vec3 getHalfSize() const {
|
||||
return halfsize * scale;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user