Fix self sync calculation
This commit is contained in:
parent
606eed9255
commit
b3b4a299bc
@ -1064,7 +1064,8 @@ impl Player {
|
||||
let server_pos = character.get_global_position();
|
||||
let client_pos: Vector3 = data.transform.location.into();
|
||||
|
||||
let max_distance = self.data.ping as f32 * character.dyn_bind().get_move_speed()
|
||||
let max_distance = (self.data.ping as f32 / 2000.)
|
||||
* character.dyn_bind().get_move_speed()
|
||||
+ character.dyn_bind().get_y_speed();
|
||||
|
||||
if client_pos.distance_to(server_pos) <= max_distance {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user