mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'step-height' entity property
This commit is contained in:
parent
99106df230
commit
0f63fd64ed
5 changed files with 7 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ void PhysicsSolver::step(
|
|||
vel += gravity * dt * gravityScale;
|
||||
if (hitbox.type == BodyType::DYNAMIC) {
|
||||
colisionCalc(chunks, hitbox, vel, pos, half,
|
||||
(prevGrounded && gravityScale > 0.0f) ? 0.5f : 0.0f);
|
||||
(prevGrounded && gravityScale > 0.0f) ? hitbox.stepHeight : 0.0f);
|
||||
}
|
||||
|
||||
pos += vel * dt + gravity * gravityScale * dt * dt * 0.5f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue