mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add note on the reasoning for the visual position interpolation rate value in voxygen
This commit is contained in:
parent
dd6b5ffa38
commit
8f429d532a
@ -43,7 +43,11 @@ impl<'a> System<'a> for Sys {
|
||||
{
|
||||
// Update interpolation values, but don't interpolate far things or objects
|
||||
if i.pos.distance_squared(pos.0) < 64.0 * 64.0 && !matches!(body, Body::Object(_)) {
|
||||
i.pos = Lerp::lerp(i.pos, pos.0 + vel.0 * 0.03, 10.0 * dt.0);
|
||||
// Note, these values are specifically tuned for smoother motion with high
|
||||
// network latency or low network sampling rate and for smooth
|
||||
// block hopping (which is instantaneous)
|
||||
const POS_LERP_RATE_FACTOR: f32 = 10.0;
|
||||
i.pos = Lerp::lerp(i.pos, pos.0 + vel.0 * 0.03, POS_LERP_RATE_FACTOR * dt.0);
|
||||
i.ori = Ori::slerp(i.ori, *ori, base_ori_interp(body) * dt.0);
|
||||
} else {
|
||||
i.pos = pos.0;
|
||||
|
Loading…
Reference in New Issue
Block a user