mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Fix formula used for acceleration (#12353)
This commit is contained in:
@@ -217,9 +217,10 @@ void Particle::step(float dtime)
|
||||
}
|
||||
m_pos = p_pos / BS;
|
||||
} else {
|
||||
// apply acceleration
|
||||
// apply velocity and acceleration to position
|
||||
m_pos += (m_velocity + m_acceleration * 0.5f * dtime) * dtime;
|
||||
// apply acceleration to velocity
|
||||
m_velocity += m_acceleration * dtime;
|
||||
m_pos += m_velocity * dtime;
|
||||
}
|
||||
|
||||
if (m_animation.type != TAT_NONE) {
|
||||
|
Reference in New Issue
Block a user