Skip to content

Commit

Permalink
fixed but still choppy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tebarem committed Dec 12, 2024
1 parent 13584c1 commit f54eab1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/hyperion/src/egress/sync_entity_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl Module for EntityStateSyncModule {
&mut (Prev, Yaw),
&mut (Prev, Pitch),
&mut Position,
&Velocity,
&mut Velocity,
&Yaw,
&Pitch,
)
Expand Down Expand Up @@ -354,7 +354,6 @@ impl Module for EntityStateSyncModule {
.send()
.unwrap();
}

},
);

Expand All @@ -368,7 +367,7 @@ impl Module for EntityStateSyncModule {
?&ConnectionId
)
.multi_threaded()
.kind::<flecs::pipeline::PreStore>()
.kind::<flecs::pipeline::OnUpdate>()
.with_enum_wildcard::<EntityKind>()
.each_iter(|it, row, (position, yaw, pitch, velocity, connection_id)| {
if let Some(_connection_id) = connection_id {
Expand All @@ -391,8 +390,8 @@ impl Module for EntityStateSyncModule {

// re calculate yaw and pitch based on velocity
let (new_yaw, new_pitch) = get_rotation_from_velocity(velocity.0);
*yaw = Yaw::new(new_yaw);
*pitch = Pitch::new(new_pitch);
/* *yaw = Yaw::new(new_yaw);
*pitch = Pitch::new(new_pitch); */

let center = **position;

Expand Down

0 comments on commit f54eab1

Please sign in to comment.