mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add mass, elasticity getters, setters to entity.rigidbody
This commit is contained in:
parent
1bba713502
commit
bd7f588800
4 changed files with 42 additions and 2 deletions
|
|
@ -316,9 +316,9 @@ void Entities::preparePhysics(float delta) {
|
|||
continue;
|
||||
}
|
||||
rigidbody.hitbox.mass = eid.def.bodyType == BodyType::DYNAMIC
|
||||
? eid.def.mass
|
||||
? rigidbody.mass
|
||||
: std::numeric_limits<float>::infinity();
|
||||
rigidbody.hitbox.elasticity = eid.def.elasticity;
|
||||
rigidbody.hitbox.elasticity = rigidbody.elasticity;
|
||||
hitboxes.emplace_back(&rigidbody.hitbox);
|
||||
if (!eid.def.solid) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue